]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target-s390x: fix exception for invalid operation code
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 3 Jun 2015 21:09:41 +0000 (23:09 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 4 Jun 2015 23:37:58 +0000 (01:37 +0200)
When an operation code is not recognized (ie invalid instruction) an
operation exception should be generated instead of a specification
exception. The latter is for valid opcode, with invalid operands or
modifiers.

This give a very basic GDB support in the guest, as it uses the invalid
opcode 0x0001 to generate a trap.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x/translate.c

index d508bc2b54fc944888da2cebeef41e1ccc08429d..c7ebd21ec8e804d074b9aa697993806911c9941e 100644 (file)
@@ -320,7 +320,7 @@ static void gen_program_exception(DisasContext *s, int code)
 
 static inline void gen_illegal_opcode(DisasContext *s)
 {
-    gen_program_exception(s, PGM_SPECIFICATION);
+    gen_program_exception(s, PGM_OPERATION);
 }
 
 #ifndef CONFIG_USER_ONLY