gcc/汇编程序无法识别aarch64 gicv3寄存器 [英] gcc/assembler does not recognize aarch64 gicv3 register(s)
问题描述
在安装了aarch64-linux-gnu-的Ubuntu 17.04上,编译以下汇编代码:
On Ubuntu 17.04, with aarch64-linux-gnu-as installed, compile the following assembly code:
# code.s
_start:
mrs x0,icc_igrpen0_el1
与
aarch64-linux-gnu-as code.s
出现以下错误:
as.s: Assembler messages:
as.s:3: Error: unknown or missing system register name at operand 2 -- `mrs x0,icc_igrpen0_el1'
但是,在ARMv8概要文件,cortext-a53 TRM和GICv3规范的文档中描述了icc_igrpen0_el1.
However, icc_igrpen0_el1 is described in documentation of ARMv8 profile,cortext-a53 TRM and GICv3 specification.
同样的错误适用于以ICC_开头的寄存器.为什么gnu汇编器无法识别那些ICC_ *寄存器?
And the same error applies to registers starts with ICC_.Why gnu assembler does not recognize those ICC_* registers?
推荐答案
显然,您应该使用带有寄存器定义的头文件作为宏,将它们映射到通用系统寄存器名称,也许像这样:
Apparently, you are supposed to use a header file with the register definitions as macros, mapping them to the generic system register names, perhaps like this:
#define ICC_IGRPEN0_EL1 S3_0_C12_C12_6
#define ICC_IGRPEN1_EL1 S3_0_C12_C12_7
#define ICC_IGRPEN1_EL3 S3_6_C12_C12_7
我不认为非通用名称会被添加到GAS专有名称中.
I don't think there is any expectation that the non-generic names will be added to GAS proper.
这篇关于gcc/汇编程序无法识别aarch64 gicv3寄存器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!