64-bit write() system call
Bob Plantz
plantz@cds1.net
Thu Mar 20 06:11:00 GMT 2008
On Wed, 2008-03-19 at 18:59 -0700, Brian Dessent wrote:
> The design of the x86_64 instruction set made some compromises for speed
> and for keeping the size of the instructions down, namely that there are
> very few instructions that take a full 64 bit operand... in fact
> 'movabs' is the only one. All the rest all take 32 bit operands and the
> address is calculated through either sign extension or as
> %rip-relative. This is actually not a big deal because these days most
I read that, but then how can I do the 64-bit immediate here:
11 0004 49BAEFCD movq $0x1234567890abcdef, %r10 # 64-bit
immediate
11 AB907856
11 3412
12 000e 41BB7856 movl $0x12345678, %r11d # 32-bit
immediate
12 3412
13 0014 6641BC34 movw $0x1234, %r12w # 16-bit
immediate
13 12
14 0019 41B512 movb $0x12, %r13b # 8-bit
immediate
Thank you for your quote from x86_64 ELF. It's making sense to me now. I
guess I jumped the gun a little when posing my question. I should've
read some more. But I was getting stuck in my research trying to figure
out what to read. You've helped me a great deal.
Bob
More information about the Gcc-help
mailing list