diff options
author | Gustavo Romero <gromero@linux.vnet.ibm.com> | 2019-06-17 17:24:58 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2019-06-19 20:05:07 +1000 |
commit | 8d0f1e05ab16c4bd628ddaefd20b94ffb36d799c (patch) | |
tree | ad68cbd8bc6df8c0164ef352b344c0e8c27009e6 /tools/testing/selftests/powerpc/tm | |
parent | 9c4e4c90ec24652921e31e9551fcaedc26eec86d (diff) | |
download | linux-8d0f1e05ab16c4bd628ddaefd20b94ffb36d799c.tar.gz linux-8d0f1e05ab16c4bd628ddaefd20b94ffb36d799c.tar.bz2 linux-8d0f1e05ab16c4bd628ddaefd20b94ffb36d799c.zip |
selftests/powerpc: Fix earlyclobber in tm-vmxcopy
In some cases, compiler can allocate the same register for operand 'res'
and 'vecoutptr', resulting in segfault at 'stxvd2x 40,0,%[vecoutptr]'
because base register will contain 1, yielding a false-positive.
This is because output 'res' must be marked as an earlyclobber operand so
it may not overlap an input operand ('vecoutptr').
Signed-off-by: Gustavo Romero <gromero@linux.vnet.ibm.com>
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc/tm')
-rw-r--r-- | tools/testing/selftests/powerpc/tm/tm-vmxcopy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/powerpc/tm/tm-vmxcopy.c b/tools/testing/selftests/powerpc/tm/tm-vmxcopy.c index fe52811584ae..0815f06f3590 100644 --- a/tools/testing/selftests/powerpc/tm/tm-vmxcopy.c +++ b/tools/testing/selftests/powerpc/tm/tm-vmxcopy.c @@ -79,7 +79,7 @@ int test_vmxcopy() "5:;" "stxvd2x 40,0,%[vecoutptr];" - : [res]"=r"(aborted) + : [res]"=&r"(aborted) : [vecinptr]"r"(&vecin), [vecoutptr]"r"(&vecout), [map]"r"(a) |