diff mbox

Fix pr67963

Message ID CAMe9rOpC8-Jo_muo9_ogmck_wyM2FfxCpgeJts2ndA5m+GOdOg@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu Oct. 14, 2015, 3:17 p.m. UTC
On Wed, Oct 14, 2015 at 8:15 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Oct 14, 2015 at 8:08 AM, Yulia Koval <vaalfreja@gmail.com> wrote:
>> Hi,
>>
>> This patch fixes the issue:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67963
>>
>>   gcc/config/i386/i386.c (ix86_option_override_internal) Disable
>>     80387 mask if lakemont target is set.
>>
>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>> index 4c25c9e..db722aa 100644
>> --- a/gcc/config/i386/i386.c
>> +++ b/gcc/config/i386/i386.c
>> @@ -4943,6 +4943,12 @@ ix86_option_override_internal (bool main_args_p,
>>   break;
>>        }
>>
>> +  if (!strcmp (opts->x_ix86_arch_string, "lakemont"))
>> +    {
>> +      opts->x_target_flags &= ~MASK_80387;
>> +      opts_set->x_target_flags |= MASK_80387;
>> +    }
>> +
>>    if (TARGET_X32 && (opts->x_ix86_isa_flags & OPTION_MASK_ISA_MPX))
>>      error ("Intel MPX does not support x32");
>>
>> Ok for trunk?
>
> We should add a bit to "struct pta" to indicate availability of
> 80387 ISA and turn it off for lakemount if 90387 ISA hasn't be
> turned on explicitly.

Something like


> We also need some testcases.
>
> --
> H.J.

Comments

Uros Bizjak Oct. 15, 2015, 7:53 a.m. UTC | #1
On Wed, Oct 14, 2015 at 5:17 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, Oct 14, 2015 at 8:15 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Wed, Oct 14, 2015 at 8:08 AM, Yulia Koval <vaalfreja@gmail.com> wrote:
>>> Hi,
>>>
>>> This patch fixes the issue:
>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67963
>>>
>>>   gcc/config/i386/i386.c (ix86_option_override_internal) Disable
>>>     80387 mask if lakemont target is set.
>>>
>>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>>> index 4c25c9e..db722aa 100644
>>> --- a/gcc/config/i386/i386.c
>>> +++ b/gcc/config/i386/i386.c
>>> @@ -4943,6 +4943,12 @@ ix86_option_override_internal (bool main_args_p,
>>>   break;
>>>        }
>>>
>>> +  if (!strcmp (opts->x_ix86_arch_string, "lakemont"))
>>> +    {
>>> +      opts->x_target_flags &= ~MASK_80387;
>>> +      opts_set->x_target_flags |= MASK_80387;
>>> +    }
>>> +
>>>    if (TARGET_X32 && (opts->x_ix86_isa_flags & OPTION_MASK_ISA_MPX))
>>>      error ("Intel MPX does not support x32");
>>>
>>> Ok for trunk?
>>
>> We should add a bit to "struct pta" to indicate availability of
>> 80387 ISA and turn it off for lakemount if 90387 ISA hasn't be
>> turned on explicitly.
>
> Something like

Hm, I don't think introducing another flag is a good idea.

Better move -m80387 (together with -msof-float and -mhard-float) to
ISA flags and add corresponding PTA_80387 define.

Uros.
diff mbox

Patch

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a2314e7..1cea58e 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4348,6 +4348,7 @@  ix86_option_override_internal (bool main_args_p,
       const enum processor_type processor;
       const enum attr_cpu schedule;
       const unsigned HOST_WIDE_INT flags;
+      const unsigned HOST_WIDE_INT mask;
     }
   const processor_alias_table[] =
     {