Reputation: 191
I am trying to generate the byte codes for instruction sequences by using gcc
and objdump
.
Here is what I write in file code.s
:
movq $0x1234567891234567,0x602308
So what I wanted to do here is putting a long data into an absolute address.
Then I typed in: gcc -c example.s
It gave me an error says: Error: operand size mismatch for
movq'.`
So what is going on here?
Upvotes: 1
Views: 4146
Reputation: 11
Immediate operands of movq are limited to 32-bit.You need to use movabsq
Upvotes: 1