This patch implements clang support for the ACLE special register intrinsics in section 10.1, __arm_{w,r}sr{,p,64}.
This includes arm_acle.h definitions with builtins and codegen to support these, the intrinsics are implemented by generating read/write_register calls which get appropriately lowered in the backend based on the register string provided. SemaChecking is also implemented to fault invalid parameters, however SemaChecking currently only supports checking in when the register string is in an encoded form, e.g. "cp1:2:c3:c4:5", that the encoding is valid. Otherwise, checking just assumes that the string is a special register value, e.g. "CPSR"; this means that if the register value passed is not a valid special register value, it passes checking and reports an error in the backend when attempting to lower the read/write_register intrinsic. I would like to have more checking on these values in the frontend to provide more useful diagnostics but couldn't think of a clean and nice way of doing it.
IsAArch64 in a generic function doesn't make sense. Is64Bit may make some sense, but I'd prefer if you pass what you really need.
In this case, I believe it's more about the types. So just receive what (input/output) types you need, and let the caller decide which types to pass.