![](/img/trans.png)
[英]How to install the aarch64 toolchain for armv8 cortex-a53 on Debian?
[英]Assembly unknown mnemonic AArch64 ARMv8
我正在尝试使用几个为ARMv8 AArch64体系结构编写的汇编文件来编译项目(来自GitHub: link )。 当我尝试编译这些文件时,几乎每一行都会出现相同的错误,它以以下内容开头:
authenc_ac_gcm_low.S:汇编程序消息:
authenc_ac_gcm_low.S:80: Error: unknown mnemonic `ld1.16b' -- `ld1.16b {v0},[x1]'
authenc_ac_gcm_low.S:81: Error: unknown mnemonic `rbit.16b' -- `rbit.16b v0,v0'
authenc_ac_gcm_low.S:82: Error: unknown mnemonic `st1.16b' -- `st1.16b {v0},[x0]'
authenc_ac_gcm_low.S:90: Error: unknown mnemonic `ld1.16b' -- `ld1.16b {v24},[x0]'
authenc_ac_gcm_low.S:92: Error: unknown mnemonic `ld1.16b' -- `ld1.16b {v0,v1,v2,v3},[x1],#64'
authenc_ac_gcm_low.S:93: Error: unknown mnemonic `ld1.16b' -- `ld1.16b {v4,v5,v6,v7},[x1]'
代码的一小部分:(78至87行)
ac_gcm_convert_low:
_ac_gcm_convert_low:
ld1.16b {v0}, [x1]
rbit.16b v0, v0
st1.16b {v0}, [x0]
ret
ac_gcm_ghash_low:
_ac_gcm_ghash_low:
cbz x3, exit //this might be the only line it doesn't error
我将Linaro交叉编译器用于AArch64,为了进行编译,我使用了-mcpu = cortex-a53 + crypto标志; 不这样做会导致“没有这样的指令”错误。 我在Assembly方面的经验很少,很显然我在这里犯了一些错误,但我找不到它。 如何摆脱错误?
看起来这就是怪诞的Apple语法-GCC使用略微冗长的体系结构语法 ,其中大小说明符用于每个寄存器参数,而不是指令本身,例如
ld1 {v0.16b}, [x1]
rbit v0.16b, v0.16b
st1 {v0.16b}, [x0]
我不相信AArch64 binutils可以支持Apple语法,因此我认为可用的解决方案仅限于“手动修复代码”或“尝试使用Clang / LLVM”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.