This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Use flag_general_regs_only with -mgeneral-regs-only
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, "Koval, Julia" <julia dot koval at intel dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "vaalfreja at gmail dot com" <vaalfreja at gmail dot com>, "law at redhat dot com" <law at redhat dot com>, "Zamyatin, Igor" <igor dot zamyatin at intel dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Date: Tue, 24 May 2016 09:22:54 -0700
- Subject: Re: [PATCH] Use flag_general_regs_only with -mgeneral-regs-only
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOpjomeEMO+=8=XDyW+Q4SRVE1jPHL7xsvm5Ckqk3ySQcg at mail dot gmail dot com> <CAFULd4aksAjy1ejRu37U2abC5wxWSVUy4VsqzhNrtu7+gJ=VMw at mail dot gmail dot com> <CAMe9rOri+hx1E5RrPh30LNppNF77Y2r-C++cpGyKp7gk5ydTAQ at mail dot gmail dot com> <CAFULd4bnoiog=dUCcWG5M2h-rCfsYqdF55+0KSnPa-5X2c16rQ at mail dot gmail dot com>
On Tue, May 24, 2016 at 8:52 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, May 24, 2016 at 5:40 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>>> No, this is a flag, not a variable. Let's figure out how to extend
>>> target flags to more than 63 flags first.
>>
>> Extending target flags to more than 63 bits requires replacing
>> HOST_WIDE_INT with a bit vector. Since target flags is used in
>> TARGET_SUBTARGET_DEFAULT, change it to a bit vector is a
>> non-trivial change. On the other hand, -mgeneral-regs-only is a
>> command-line option which doesn't require support for
>> TARGET_SUBTARGET_DEFAULT, similar to other -m options like
>> -mmitigate-rop. Using flag_general_regs_only is an option.
>
> I have been informed that Intel people are looking into how to extend
> target flags to accommodate additional ISA flags. There is no point to
> hurry with an unoptimal solution. Perhaps you can coordinate your
> patch with their efforts?
iISA flags use x86_isa_flags, not target_flags. -mgeneral-regs-only
shouldn't use x86_isa_flags. It was my oversight to use target_flags
with -mgeneral-regs-only to begin with. I don't think using
flag_general_regs_only is not an optimal solution, which I should have
used in the first place. The x86 change for interrupt handler depends
on -mgeneral-regs-only.
--
H.J.