diff options
author | Simon Guo <wei.guo.simon@gmail.com> | 2017-09-01 05:17:14 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-12-11 05:03:37 +0300 |
commit | f36dbfe1a504b85c7b3bf89fdd99991afbaa0f74 (patch) | |
tree | c29d7f1d0fd5515ee5398bcde8c5afe8aab36633 /tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c | |
parent | 608c0d8804ef3ca4cda8ec6ad914e47deb283d7b (diff) | |
download | linux-f36dbfe1a504b85c7b3bf89fdd99991afbaa0f74.tar.xz |
selftests/powerpc: Fix build errors in powerpc ptrace selftests
GCC 7 will take "r2" in clobber list as an error and it will get
following build errors for powerpc ptrace selftests even with -fno-pic
option:
ptrace-tm-vsx.c: In function ‘tm_vsx’:
ptrace-tm-vsx.c:42:2: error: PIC register clobbered by ‘r2’ in ‘asm’
asm __volatile__(
^~~
make[1]: *** [ptrace-tm-vsx] Error 1
ptrace-tm-spd-vsx.c: In function ‘tm_spd_vsx’:
ptrace-tm-spd-vsx.c:55:2: error: PIC register clobbered by ‘r2’ in ‘asm’
asm __volatile__(
^~~
make[1]: *** [ptrace-tm-spd-vsx] Error 1
ptrace-tm-spr.c: In function ‘tm_spr’:
ptrace-tm-spr.c:46:2: error: PIC register clobbered by ‘r2’ in ‘asm’
asm __volatile__(
^~~
Fix the build error by removing "r2" from the clobber list. None of
these asm blocks actually clobber r2.
Reported-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c')
-rw-r--r-- | tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c index 94e57cb89769..51427a2465f6 100644 --- a/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c +++ b/tools/testing/selftests/powerpc/ptrace/ptrace-tm-spr.c @@ -76,8 +76,7 @@ trans: : [tfhar] "=r" (tfhar), [res] "=r" (result), [texasr] "=r" (texasr), [cptr1] "=r" (cptr1) : [sprn_texasr] "i" (SPRN_TEXASR) - : "memory", "r0", "r1", "r2", "r3", "r4", - "r8", "r9", "r10", "r11", "r31" + : "memory", "r0", "r8", "r31" ); /* There are 2 32bit instructions before tbegin. */ |