]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Followup to VEX r2189 -- handling invalid opcode 00 specially.
authorFlorian Krohm <florian@eich-krohm.de>
Mon, 8 Aug 2011 23:47:23 +0000 (23:47 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Mon, 8 Aug 2011 23:47:23 +0000 (23:47 +0000)
Update golden log for testcase op_exception which no longer
complains about invalid opcode 00.
Add testcase op00.c

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11958

none/tests/s390x/Makefile.am
none/tests/s390x/op00.c [new file with mode: 0644]
none/tests/s390x/op00.stderr.exp [new file with mode: 0644]
none/tests/s390x/op00.vgtest [new file with mode: 0644]
none/tests/s390x/op_exception.stderr.exp

index 2ead0a3a15aeb87ca8922684e7a8d4bb03d71b2f..a7b25660c0a158d048c3558c55f6a5dffcc6098e 100644 (file)
@@ -5,7 +5,7 @@ dist_noinst_SCRIPTS = filter_stderr
 INSN_TESTS = clc clcle cvb cvd icm lpr tcxb lam_stam xc mvst add sub mul \
              and or xor insert div srst fold_And16 flogr sub_EI add_EI \
              and_EI or_EI xor_EI insert_EI mul_GE add_GE condloadstore \
-             op_exception fgx stck stckf stcke stfle
+             op_exception fgx stck stckf stcke stfle op00
 
 check_PROGRAMS = $(INSN_TESTS) \
                 ex_sig \
diff --git a/none/tests/s390x/op00.c b/none/tests/s390x/op00.c
new file mode 100644 (file)
index 0000000..ed243b0
--- /dev/null
@@ -0,0 +1,7 @@
+/* Test for invalid instruction 00. */
+int main(int argc, char *argv[])
+{
+  asm volatile (".hword 0\n");
+  return 0;
+}
+
diff --git a/none/tests/s390x/op00.stderr.exp b/none/tests/s390x/op00.stderr.exp
new file mode 100644 (file)
index 0000000..73d098c
--- /dev/null
@@ -0,0 +1,5 @@
+
+
+Process terminating with default action of signal 4 (SIGILL)
+   at 0x........: main (op00.c:5)
+
diff --git a/none/tests/s390x/op00.vgtest b/none/tests/s390x/op00.vgtest
new file mode 100644 (file)
index 0000000..948fb85
--- /dev/null
@@ -0,0 +1 @@
+prog: op00
index c76666888f86e785697d5c82d46ceb87b1caa840..24c6bf30f43da4d230be33f884202b93a8dbd1b9 100644 (file)
@@ -1,30 +1,4 @@
 
-vex s390->IR: unknown insn: 0000
-valgrind: Unrecognised instruction at address 0x.........
-   at 0x........: main (op_exception.c:23)
-Your program just tried to execute an instruction that Valgrind
-did not recognise.  There are two possible reasons for this.
-1. Your program has a bug and erroneously jumped to a non-code
-   location.  If you are running Memcheck and you just saw a
-   warning about a bad jump, it's probably your program's fault.
-2. The instruction is legitimate but Valgrind doesn't handle it,
-   i.e. it's Valgrind's fault.  If you think this is the case or
-   you are not sure, please let us know and we'll try to fix it.
-Either way, Valgrind will now raise a SIGILL signal which will
-probably kill your program.
-vex s390->IR: unknown insn: 0000
-valgrind: Unrecognised instruction at address 0x.........
-   at 0x........: main (op_exception.c:27)
-Your program just tried to execute an instruction that Valgrind
-did not recognise.  There are two possible reasons for this.
-1. Your program has a bug and erroneously jumped to a non-code
-   location.  If you are running Memcheck and you just saw a
-   warning about a bad jump, it's probably your program's fault.
-2. The instruction is legitimate but Valgrind doesn't handle it,
-   i.e. it's Valgrind's fault.  If you think this is the case or
-   you are not sure, please let us know and we'll try to fix it.
-Either way, Valgrind will now raise a SIGILL signal which will
-probably kill your program.
 vex s390->IR: unknown insn: FFFF FFFF FFFF
 valgrind: Unrecognised instruction at address 0x.........
    at 0x........: main (op_exception.c:30)
@@ -38,17 +12,4 @@ did not recognise.  There are two possible reasons for this.
    you are not sure, please let us know and we'll try to fix it.
 Either way, Valgrind will now raise a SIGILL signal which will
 probably kill your program.
-vex s390->IR: unknown insn: 0000
-valgrind: Unrecognised instruction at address 0x.........
-   at 0x........: main (op_exception.c:34)
-Your program just tried to execute an instruction that Valgrind
-did not recognise.  There are two possible reasons for this.
-1. Your program has a bug and erroneously jumped to a non-code
-   location.  If you are running Memcheck and you just saw a
-   warning about a bad jump, it's probably your program's fault.
-2. The instruction is legitimate but Valgrind doesn't handle it,
-   i.e. it's Valgrind's fault.  If you think this is the case or
-   you are not sure, please let us know and we'll try to fix it.
-Either way, Valgrind will now raise a SIGILL signal which will
-probably kill your program.