负载从64位地址转换成其它寄存器比RAX [英] Load from a 64-bit address into other register than rax
问题描述
在64位,从64位绝对地址(也就是废弃一个64位立即)加载可以通过
On x64, loading from a 64-bit absolute address (that is, dereferencing a 64-bit immediate) can be done by
movabs addr64, %rax
然而,当目标寄存器比 RAX
任何其他汇编器给出错误消息,为movabs操作数大小不匹配
。我缺少什么?
However, when the destination register is any other than rax
the assembler gives an error message saying operand size mismatch for movabs
. What am I missing?
推荐答案
没有办法。它只能从AREG加载
No way. It can only load from Areg
MOVABS对于MOV运code构成气体运code名称MOV AREG,
[Offs64]和MOV [Offs64],AREG。在YASM的NASM语法模式,还可以
说MOV AX,[XXX四字]得到这个表单。 YASM的天然气语法模式
接受MOVABS(用于气体兼容性)。 注意这种形式仅与有效
AREG(AL / AX / EAX / RAX)作为源/目的寄存器。*
MOVABS is the GAS opcode name for the MOV opcode forms "MOV Areg, [Offs64]" and "MOV [Offs64], Areg". In Yasm's NASM syntax mode, you can get this form by saying "MOV AX, [qword xxx]". Yasm's GAS syntax mode accepts MOVABS (for GAS compatibility). Note this form is only valid with Areg (AL/AX/EAX/RAX) as the source/destination register.*
http://cvs.tortall.net/pipermail/ YASM-的devel / 2006年三月/ 000579.html
这篇关于负载从64位地址转换成其它寄存器比RAX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!