Commit 111d7f4a authored by Aurelien Jarno's avatar Aurelien Jarno Committed by Alexander Graf
Browse files

target-s390x: fix exception for invalid operation code



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: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
parent a1c7610a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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