[PATCH] D53115: [COFF, ARM64] Add _ReadStatusReg and_WriteStatusReg intrinsics

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 10 18:19:06 PDT 2018


efriedma added inline comments.


================
Comment at: lib/Sema/SemaChecking.cpp:1754
+  // argument here. Any constant would be converted to a register of
+  // the form S1_2_C3_C4_5. Let the hardware throw an exception for incorrect
+  // registers. This matches MSVC behavior.
----------------
I agree we shouldn't try to figure out whether the register is valid, but we probably want a range check anyway: if the value is greater than 0x7FFF, it can't be encoded.


https://reviews.llvm.org/D53115





More information about the cfe-commits mailing list