[PATCH] Introduce arm_acle.h supporting existing LLVM builtin intrinsics

Tim Northover t.p.northover at gmail.com
Thu Jun 26 23:29:11 PDT 2014

On 27 June 2014 06:56, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> Ah, I had forgotten about the fact that ACLE itself specifies the arm_acle.h header.
> ================
> Comment at: lib/Headers/arm_acle.h:78
> @@ +77,3 @@
> +#if __ARM_32BIT_STATE
> +#define __ssat(x, y) __builtin_arm_ssat(x, y)
> +#define __usat(x, y) __builtin_arm_usat(x, y)
> ----------------
> Why are these macros and the others static inline functions?

That's because the second argument must be an integer constant
expression, which Clang checks at compile-time. There are various
similar cases in arm_neon.h, and they do need macros as far as I know.



More information about the cfe-commits mailing list