[PATCH] x86: conditionalize x87 instructions and registers

H.J. Lu hjl.tools@gmail.com
Fri Jul 24 14:56:00 GMT 2009


On Fri, Jul 24, 2009 at 7:26 AM, Jan Beulich<JBeulich@novell.com> wrote:
>>>> "H.J. Lu" <hjl.tools@gmail.com> 24.07.09 15:37 >>>
>>> +  if (r->reg_type.bitfield.floatreg
>>> +      && !cpu_arch_flags.bitfield.cpu8087
>>> +      && !cpu_arch_flags.bitfield.cpu287
>>> +      && !cpu_arch_flags.bitfield.cpu387)
>>> +    return (const reg_entry *) NULL;
>>> +
>>
>>I assume FISTTP  > 687 > 387 > 287 > 8087. If it is
>
> No, specifically not - feni/fdisi are 8087 *only* and fsetpm/frstpm are 287
> *only*. Thus only FISTTP > 687 > 387 (explaining why the code above
> doesn't check for 687 and FISTTP), which is also reflected in how the Cpu*
> masks are set up in opcodes/i386-gen.c (387 does not include 287, and
> 287 does not include 8087).
>
>>the case, please change it to
>>
>> if (r->reg_type.bitfield.floatreg  && !cpu_arch_flags.bitfield.cpu8087)
>>    return (const reg_entry *) NULL;
>>
>>OK with this change.
>
> OK with that explanation, but code unchanged?

I see.

I think those new options are also supported on command
line. Please add a new testcase with command line option,
update md_show_usag and doc/c-i386.texi. OK with those
changes.

Thanks.

-- 
H.J.



More information about the Binutils mailing list