I am trying to access the ARMV8 system register icc_sre_el2 but get an unknown or missing system register error.
See below for the list of available registers for ARMV8
When using some other registers from the list the build is successful. But anything with icc_, ich_ prefixes produces a failure.
What do I need to do to fix this?
It seems we've missed these from binutils. For now you can work around it by using the encoding of the register.
The assembler supports a general encoding scheme `S<op0>_<op1>_<Cn>_<Cm>_<op2`
If you look on the page you sent for instance on https://developer.arm.com/docs/ddi0595/e/aarch64-system-registers/actlr_el2
You'll see the values for `op0` etc.
So again in that case these two are equivalent
mrs x4, s3_4_c1_c0_1, x4
mrs x4, ACTLR_EL2
We'll get these sorted as soon as possible in gas.
That said, your description is a bit confusing, icc_sre_el2 is an AArch64 register, did you mean ICC_MSRE since you're using an arm-none-eabi? In any case the same workaround exists, just use the right encoding.
View all questions in Arm Compilers forum