On Mon, Mar 19, 2018 at 10:00 AM, H.J. Lu <hjl.to...@gmail.com> wrote: > On Thu, Mar 15, 2018 at 1:00 PM, H.J. Lu <hjl.to...@gmail.com> wrote: >> On Thu, Mar 15, 2018 at 12:54 PM, Jan Hubicka <hubi...@ucw.cz> wrote: >>>> On Thu, Mar 15, 2018 at 10:47 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >>>> >> On Thu, Mar 15, 2018 at 9:03 AM, Jan Hubicka <hubi...@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.
0013-i386-Don-t-generate-alias-for-function-return-thunk.patch.xz
Description: application/xz
0001-i386-Move-struct-ix86_frame-to-machine_function.patch.xz
Description: application/xz
0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch.xz
Description: application/xz
0011-i386-Update-mfunction-return-for-return-with-pop.patch.xz
Description: application/xz
0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch.xz
Description: application/xz
0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch.xz
Description: application/xz
0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch.xz
Description: application/xz
0007-x86-Add-V-register-operand-modifier.patch.xz
Description: application/xz
0006-x86-Add-mindirect-branch-register.patch.xz
Description: application/xz
0005-x86-Add-mfunction-return.patch.xz
Description: application/xz
0004-x86-Add-mindirect-branch.patch.xz
Description: application/xz
0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch.xz
Description: application/xz
0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch.xz
Description: application/xz