[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    [PATCH] D36111: [COFF, ARM64] Add MS builtins __dmb, __dsb, __isb
From:       Mandeep Singh Grang via Phabricator via cfe-commits <cfe-commits () lists ! llvm ! org>
Date:       2017-07-31 21:04:48
Message-ID: a890b80773eb1739b89356b7b1f6ad02 () localhost ! localdomain
[Download RAW message or body]

mgrang added inline comments.


================
Comment at: include/clang/Basic/BuiltinsAArch64.def:49
 // Memory barrier
+BUILTIN(__dmb, "vUi", "nc")
+BUILTIN(__dsb, "vUi", "nc")
----------------
mstorsjo wrote:
> mgrang wrote:
> > mstorsjo wrote:
> > > Shouldn't these be limited to MSVC mode only? Have a look at `BuiltinsARM.def`, \
> > > where there's cases like `LANGBUILTIN(__dmb, "vUi", "nc", ALL_MS_LANGUAGES)` \
> > > instead.
> > I do see LANGBUILTIN in BuiltinsARM.def however it is defined as follows:
> > 
> > ```
> > #   define LANGBUILTIN(ID, TYPE, ATTRS, BUILTIN_LANG) BUILTIN(ID, TYPE, ATTRS)
> > ```
> > 
> > So it seems the BUILTIN_LANG is never really used. Moreover, using LANGBUILTIN in \
> > BuiltinsAArch64.def I run into compilation error like this: ```
> > BuiltinsAArch64.def:65:12: error: expected '= constant-expression' or end of \
> > enumerator definition LANGBUILTIN(__dmb, "vUi", "nc", ALL_MS_LANGUAGES)
> > ```
> That's only the fallback definition of `LANGBUILTIN`. The `.def` file is included \
> multiple times in different contexts. Have a look at e.g. \
> `lib/Basic/Targets/ARM.cpp` and look for `BuiltinsARM.def` there, and you'll find a \
> different implementation of `LANGBUILTIN`.
Got it! Thanks Martin. I will push an update.


https://reviews.llvm.org/D36111



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic