[GCC 6] PATCH: Backport -mindirect-branch= patches

H.J. Lu hjl.tools@gmail.com
Mon Mar 19 17:08:00 GMT 2018


On Mon, Mar 19, 2018 at 10:00 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Mar 15, 2018 at 1:00 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Thu, Mar 15, 2018 at 12:54 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> On Thu, Mar 15, 2018 at 10:47 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> >> On Thu, Mar 15, 2018 at 9:03 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> >> >> > What is the reason for using different names for return and indirect thunks at first place?
>>>> >> >> >
>>>> >> >>
>>>> >> >> These 2 thunks are identical.  But one may want to provide an
>>>> >> >> alternate thunk only for
>>>> >> >> indirect branch and leaves return thunk alone.  You can't do that if
>>>> >> >> both have the same
>>>> >> >> name.
>>>> >> >
>>>> >> > Hmm, OK, what is the benefit to have two different thunks? It is just
>>>> >> > safety precaution so we could adjust one without adjusting the other in
>>>> >> > future?
>>>> >> >
>>>> >>
>>>> >> That is correct.
>>>> >
>>>> > Hmm, I guess the patch is OK. Things are slightly more flexible this way and
>>>> > duplicating thunk is not terribly expensive. One can always link with
>>>> > non-comdat+ alias.
>>>> >
>>>>
>>>> That is true.  OK to backport to GCC 7 after a few days?
>>> OK.  I suppose you are testing return thunks on some real environment, like GCC bootstrap :)
>>
>> Yes.
>>
>
> I checked my backport into GCC 7 branch.
>
> Here are GCC 6 patches to backport all -mindirect-branch= patches.
> OK for GCC 6.
>

Resend the patches compressed with xz.  Sorry if you get the patches twice.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-i386-Don-t-generate-alias-for-function-return-thunk.patch.xz
Type: application/x-xz
Size: 2348 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-i386-Move-struct-ix86_frame-to-machine_function.patch.xz
Type: application/x-xz
Size: 2604 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0001.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch.xz
Type: application/x-xz
Size: 4848 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0002.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-i386-Update-mfunction-return-for-return-with-pop.patch.xz
Type: application/x-xz
Size: 3908 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0003.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch.xz
Type: application/x-xz
Size: 748 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0004.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch.xz
Type: application/x-xz
Size: 1472 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0005.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch.xz
Type: application/x-xz
Size: 1960 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0006.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-x86-Add-V-register-operand-modifier.patch.xz
Type: application/x-xz
Size: 1840 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0007.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-x86-Add-mindirect-branch-register.patch.xz
Type: application/x-xz
Size: 5084 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0008.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-x86-Add-mfunction-return.patch.xz
Type: application/x-xz
Size: 7460 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0009.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-x86-Add-mindirect-branch.patch.xz
Type: application/x-xz
Size: 10248 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0010.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch.xz
Type: application/x-xz
Size: 1676 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0011.xz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch.xz
Type: application/x-xz
Size: 1096 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180319/c69f86af/attachment-0012.xz>


More information about the Gcc-patches mailing list