Re: [PATCH] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]

2022-08-10 Thread Kewen.Lin via Gcc-patches
on 2022/8/10 05:10, Segher Boessenkool wrote: > Hi! > > On Tue, Aug 09, 2022 at 08:51:59PM +0800, Kewen.Lin wrote: >> on 2022/8/9 18:35, Segher Boessenkool wrote: +/* As ELFv2 ABI shows, the allowable bytes past the global entry + point are 0, 4, 8, 16, 32 and 64. Considering

Re: [PATCH] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]

2022-08-09 Thread Segher Boessenkool
Hi! On Tue, Aug 09, 2022 at 08:51:59PM +0800, Kewen.Lin wrote: > on 2022/8/9 18:35, Segher Boessenkool wrote: > >> +/* As ELFv2 ABI shows, the allowable bytes past the global entry > >> + point are 0, 4, 8, 16, 32 and 64. Considering there are two > >> + non-prefixed instructions

Re: [PATCH] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]

2022-08-09 Thread Kewen.Lin via Gcc-patches
Hi Segher, Thanks for the review comments! on 2022/8/9 18:35, Segher Boessenkool wrote: > Hi! > >> + /* As ELFv2 ABI shows, the allowable bytes past the global entry >> + point are 0, 4, 8, 16, 32 and 64. Considering there are two >> + non-prefixed instructions for global e

Re: [PATCH] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]

2022-08-09 Thread Segher Boessenkool
Hi! > + /* As ELFv2 ABI shows, the allowable bytes past the global entry > + point are 0, 4, 8, 16, 32 and 64. Considering there are two > + non-prefixed instructions for global entry (8 bytes), the count > + for patchable NOPs before local entry would be 2, 6 and

[PATCH] rs6000: Rework ELFv2 support for -fpatchable-function-entry* [PR99888]

2022-08-08 Thread Kewen.Lin via Gcc-patches
Hi, As PR99888 and its related show, the current support for -fpatchable-function-entry on powerpc ELFv2 doesn't work well with global entry existence. For example, with one command line option -fpatchable-function-entry=3,2, it got below w/o this patch: .LPFE1: nop nop