On Sun, Mar 4, 2012 at 11:01 PM, H.J. Lu <hjl.to...@gmail.com> wrote:
>> @@ -13637,7 +13665,8 @@ ix86_print_operand (FILE *file, rtx x, int code) >> gcc_unreachable (); >> } >> >> - ix86_print_operand (file, x, 0); >> + ix86_print_operand (file, x, >> + TARGET_64BIT && REG_P (x) ? 'q' : 0); >> return; >> >> This is too big hammer. You output everything in DImode, so even if >> the address is in fact in SImode, you output it in DImode with an >> addr32 prefix. >> > > "%A" is only used in "jmp\t%A0" and there is no "jmp *%eax" instruction in > 64bit mode, only "jmp *%rax": > > [hjl@gnu-4 tmp]$ cat j.s > jmp *%eax > jmp *%rax > [hjl@gnu-4 tmp]$ gcc -c j.s > j.s: Assembler messages: > j.s:1: Error: operand type mismatch for `jmp' > [hjl@gnu-4 tmp]$ > > It is OK for x32 since the upper 32bits are zero when we are loading "%eax". Just zero_extend register in wrong mode to DImode in indirect_jump and tablejump expanders. If above is true, then gcc will remove this extension automatically. Uros.