summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGustavo Romero <gromero@linux.vnet.ibm.com>2019-06-17 17:24:58 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2019-06-19 20:05:07 +1000
commit8d0f1e05ab16c4bd628ddaefd20b94ffb36d799c (patch)
treead68cbd8bc6df8c0164ef352b344c0e8c27009e6 /tools
parent9c4e4c90ec24652921e31e9551fcaedc26eec86d (diff)
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')
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-vmxcopy.c2
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)