Hi Michael, On Tue, Oct 10, 2017 at 09:10:32PM +1100, Michael Ellerman wrote: > wei.guo.si...@gmail.com writes: > > > From: Simon Guo <wei.guo.si...@gmail.com> > > > > GCC 7 will take "r2" in clobber list as an error will 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__( > > ^~~ > > > > This patch fix the build error by removing "r2" out of clobber list. > > But do any of the blocks clobber r2? If so then it should be in the > clobber list.
I see none of them clobbers r2, and neither does those assembly functions which those blocks calls, like "loadvsx". For the change on tools/testing/selftests/powerpc/ptrace/Makefile, it can be ignored since I noticed recent commit a3c01050584da3 "selftests/powerpc: Force ptrace tests to build -fno-pie". Please let me know if you want a new v2 to remove that change on ptrace/Makefile. Thanks, - Simon