英文:
Is "add Xn, Xn, SP" valid in ARM64?
问题
"add x1, x1, sp" 有问题,但以下语句可以正确组装: "add x1, sp, x1"。谢谢!
英文:
I have problems assembling add x1, x1, sp
. From what I have read that should be possible in AArch64?
The following assembles correctly add x1, sp, x1
Thanks!
答案1
得分: 3
"add x1, x1, sp" 不是可编码的AArch64指令。add
指令的允许标量变体如下:
- ADD <Wd|WSP>, <Wn|WSP>,
{, {# }} - ADD <Xd|SP>, <Xn|SP>,
{, {# }} - ADD <Wd|WSP>, <Wn|WSP>, #
{, } - ADD <Xd|SP>, <Xn|SP>, #
{, } - ADD
, , {, # } - ADD
, , {, # }
注意,对于这些变体中,都不允许将SP
用作第三个操作数。
英文:
Indeed, add x1, x1, sp
is not an encodable AArch64 instruction. The permitted scalar variants of the add
instruction are:
ADD <Wd|WSP>, <Wn|WSP>, <Wm>{, <extend> {#<amount>}}
ADD <Xd|SP>, <Xn|SP>, <R><m>{, <extend> {#<amount>}}
ADD <Wd|WSP>, <Wn|WSP>, #<imm>{, <shift>}
ADD <Xd|SP>, <Xn|SP>, #<imm>{, <shift>}
ADD <Wd>, <Wn>, <Wm>{, <shift> #<amount>}
ADD <Xd>, <Xn>, <Xm>{, <shift> #<amount>}
Observe how for none of these variants SP
is permitted as the third operand.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论