PATCH: i386 disassembler: Check PREFIX_REPNZ before PREFIX_DATA for prefix table

Sat Nov 11 00:43:00 GMT 2006

On Fri, 10 Nov 2006, H. J. Lu wrote:

> On Fri, Nov 10, 2006 at 11:56:51PM +0300, malc wrote:
>> On Thu, 9 Nov 2006, H. J. Lu wrote:
>>> When prefix user table is used, we check PREFIX_REPZ, PREFIX_DATA
>>> and PREFIX_REPNZ, in that order. This patch changes it to
>>> PREFIX_REPZ, PREFIX_REPNZ and PREFIX_DATA. There is no regression.
>> This might sound naive, but - why?
> PREFIX_REPZ and PREFIX_REPNZ are the same class prefixes. It doesn't
> make senses to check one before PREFIX_DATA and one after.

Oh, i have never seen reference to prefix "classes" in Intels nor AMDs
ISA documentation (perhaps i haven't paid enough attention though) maybe
these classes are binutils diasasm thing? In any case i was wondering this
for a while: suppose i have an interpreter (or disassembler for that
matter) and see following sequence of bytes:

0x0f 0x11 0xf3 0x66 ...

What will it be? `movss', `movupd' #UD? Does the first prefix takes
precedence or is there some sort of built in precedence rules (i.e.
not all prefixes are equal)?


More information about the Binutils mailing list