[PATCH] D31220: [builtins][ARM] Select correct code fragments when compiling for Thumb1/Thum2/ARM ISA
Weiming Zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 22 12:37:00 PDT 2017
weimingz added inline comments.
================
Comment at: lib/builtins/assembly.h:105
+#define USE_THUMB_1
+#endif
+#define DEFINE_CODE_MODE .thumb
----------------
compnerd wrote:
> Is there a reason to use this alternate macro rather than directly using `__thumb2__` and `__thumb__` and ordering the sources to prefer thumb2, thumb, arm?
Sort of. For example, to check if it is Thumb1 only, we need to do
#if defined(__thumb__) && !defined(__thumb2)
To check if it's on ARM mode, we need to do
#if defined(__arm__) && !defined(__thumb__) && !defined(__thumb2__)
So still nice to have an indirect macro.
https://reviews.llvm.org/D31220
More information about the llvm-commits
mailing list