Cyan.F
Cyan.F

Reputation: 191

operand size mismatch for movq

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 formovq'.`

So what is going on here?

Upvotes: 1

Views: 4146

Answers (1)

guest
guest

Reputation: 11

Immediate operands of movq are limited to 32-bit.You need to use movabsq

Upvotes: 1

Related Questions