[PATCH] [ARM/AArch64] Add ACLE special register intrinsics (10.1)

Tim Northover t.p.northover at gmail.com
Thu Nov 13 15:15:01 PST 2014


Hi Bradley,

We usually try to avoid using inline assembly for intrinsics, even if it does mean an extra LLVM patch. In this case, it would be better to do more thorough analysis anyway to avoid rather dodgy diagnostics like:

    $ cat tmp.c
    unsigned rsr() {
      return __builtin_arm_rsr("21:2:3:4:5");
    }
    $ clang -c tmp.c -arch arm64
    <inline asm>:1:10: error: expected readable system register
            mrs x8, S21_2_C3_C4_5

(Or possibly worse if someone is using -fno-integrated-as).

Cheers.

Tim.

http://reviews.llvm.org/D6247






More information about the cfe-commits mailing list