gcc/汇编程序无法识别 aarch64 gicv3 寄存器 [英] gcc/assembler does not recognize aarch64 gicv3 register(s)

查看:39
本文介绍了gcc/汇编程序无法识别 aarch64 gicv3 寄存器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Ubuntu 17.04 上,安装 aarch64-linux-gnu-as,编译以下汇编代码:

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'

但是,icc_igrpen0_el1 在 ARMv8 配置文件、cortext-a53 TRM 和 GICv3 规范的文档中有所描述.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆