This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

嵌入式汇编告警问题消除

描述:使用armclang的嵌入式汇编读入32位寄存器时告警消除
相关环境:
IDE: ARM DS5 Version: 2019.1 Build: 201910912
////////////////////////////////////////////////////////////
unsigned int freq;
__asm volatile("MRS %0,CNTFRQ_EL0":"=r"(freq));
////////////////////////////////////////////////////////////
由于CNTFRQ_EL0为32-bit宽度,希望将读出值存在freq变量中,但编译器告警如下:
value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths]
不知道如何消除