I'm trying to compile the following assembly...
movq $0x3534373536383235, 0x000000000055638f8
movq $0x55638f8, %rdi
retq
The first line throws the error Error: operand size mismatch for 'movq'
Which doesn't make sense to me, because they are both 8 byte numbers.
I did a little research and movabsq
was recommended, like so...
movabsq $0x3534373536383235, 0x000000000055638f8
movq $0x55638f8, %rdi
retq
But this throws the error: Error: operand size mismatch for 'movabs'
What am I missing?
Here's the entire error from my mac
level3.s:1:27: error: invalid operand for instruction
movq $0x3534373536383235, 0x000000000055638f8
^~~~~~~~~~~~~~~~~~~
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…