[PATCH 3/3] S/390: Implement -mnop-mcount

Andreas Krebbel krebbel@linux.ibm.com
Mon Jul 16 14:43:00 GMT 2018


On 07/16/2018 09:48 AM, Ilya Leoshkevich wrote:
> This is the counterpart of the i386 feature introduced by
> 39a5a6a4: Add direct support for Linux kernel __fentry__ patching.
> 
> On i386 the profiler call sequence always consists of 1 call
> instruction, so -mnop-mcount generates a single nop with the same
> length as a call. For S/390 longer sequences may be used in some
> cases, so -mnop-mcount generates the corresponding amount of nops.
> 
>         * gcc/config/s390/s390.c (s390_function_profiler): Generate
>         nops instead of profiler call sequences.
>         * gcc/config/s390/s390.opt: Add the new option.
>         * gcc/testsuite/gcc.target/s390/mnop-mcount-m31-fpic.c:
>         New testcase.
>         * gcc/testsuite/gcc.target/s390/mnop-mcount-m31-mzarch.c
>         New testcase.
>         * gcc/testsuite/gcc.target/s390/mnop-mcount-m31.c
>         New testcase.
>         * gcc/testsuite/gcc.target/s390/mnop-mcount-m64-mfentry.c
>         New testcase.
>         * gcc/testsuite/gcc.target/s390/mnop-mcount-m64.c
>         New testcase.

Applied. Thanks!

Andreas



More information about the Gcc-patches mailing list