News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Annoyances of 64 bit

Started by rags, March 28, 2012, 04:58:46 AM

Previous topic - Next topic

rags

Anyone have any idea why Intel or AMD thought it would be a good idea to sign extend an immediate
32 bit operand when using an AND?
For example:

mov rax, 0f1f2f3f4f5f6f7f8h
and rax, 0FF000000h

assembles as:

mov    rax, 0f1f2f3f4f5f6f7f8h
and     rax,0FFFFFFFFFF000000h

When all I want is the 4th byte of the low dword.
I know I can use the eax register to get the value I want, but is there a performance hit when switching
between the 32bit and 64bit registers?
And not being able to use immediate values greater than 32 bits, without first moving them into a register
is a real PITA.
God made Man, but the monkey applied the glue -DEVO