aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlie Halip <[email protected]>2021-11-17 19:48:21 +0200
committerHeiko Carstens <[email protected]>2021-11-25 13:38:31 +0100
commit53ae7230918154d1f4281d7aa3aae9650436eadf (patch)
tree88e0db85941c0c2ac500cc05c08f1181cd0c8667
parent136057256686de39cc3a07c2e39ef6bc43003ff6 (diff)
s390/test_unwind: use raw opcode instead of invalid instruction
Building with clang & LLVM_IAS=1 leads to an error: arch/s390/lib/test_unwind.c:179:4: error: invalid register pair " mvcl %%r1,%%r1\n" ^ The test creates an invalid instruction that would trap at runtime, but the LLVM inline assembler tries to validate it at compile time too. Use the raw instruction opcode instead. Reported-by: Nick Desaulniers <[email protected]> Signed-off-by: Ilie Halip <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Suggested-by: Ulrich Weigand <[email protected]> Link: https://github.com/ClangBuiltLinux/linux/issues/1421 Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> [[email protected]: use illegal opcode, and update comment] Signed-off-by: Heiko Carstens <[email protected]>
-rw-r--r--arch/s390/lib/test_unwind.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/lib/test_unwind.c b/arch/s390/lib/test_unwind.c
index cfc5f5557c06..bc7973359ae2 100644
--- a/arch/s390/lib/test_unwind.c
+++ b/arch/s390/lib/test_unwind.c
@@ -173,10 +173,11 @@ static noinline int unwindme_func4(struct unwindme *u)
}
/*
- * trigger specification exception
+ * Trigger operation exception; use insn notation to bypass
+ * llvm's integrated assembler sanity checks.
*/
asm volatile(
- " mvcl %%r1,%%r1\n"
+ " .insn e,0x0000\n" /* illegal opcode */
"0: nopr %%r7\n"
EX_TABLE(0b, 0b)
:);