This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR gas/5109: Extra REX byte generated in Intel mode


>--- gas/config/tc-i386.c.intel	2007-10-01 15:12:57.000000000 -0700
>+++ gas/config/tc-i386.c	2007-10-04 11:15:34.000000000 -0700
>@@ -3384,7 +3384,11 @@ process_suffix (void)
> 	}
>       else if (i.suffix == QWORD_MNEM_SUFFIX)
> 	{
>-	  if (!check_qword_reg ())
>+	  if (intel_syntax
>+	      && i.tm.opcode_modifier.ignoresize
>+	      && i.tm.opcode_modifier.no_qsuf)
>+	    i.suffix = 0;
>+	  else if (!check_qword_reg ())
> 	    return 0;
> 	}
>       else if (i.suffix == WORD_MNEM_SUFFIX)

Wouldn't this change allow nonsense like

	mov	es, qword ptr [rax]

? And wouldn't (if correct) a similar change be needed to prevent operand size
overrides to be emitted for dword operations in 16-bit mode?

Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]