diff --git a/qemu/target-sparc/cc_helper.c b/qemu/target-sparc/cc_helper.c index 35dab732..66ec0e61 100644 --- a/qemu/target-sparc/cc_helper.c +++ b/qemu/target-sparc/cc_helper.c @@ -20,6 +20,11 @@ #include "cpu.h" #include "exec/helper-proto.h" +static uint32_t compute_null(CPUSPARCState *env) +{ + return 0; +} + static uint32_t compute_all_flags(CPUSPARCState *env) { return env->psr & PSR_ICC; @@ -433,6 +438,7 @@ typedef struct CCTable { static const CCTable icc_table[CC_OP_NB] = { /* CC_OP_DYNAMIC should never happen */ + [CC_OP_DYNAMIC] = { compute_null, compute_null }, [CC_OP_FLAGS] = { compute_all_flags, compute_C_flags }, [CC_OP_DIV] = { compute_all_div, compute_C_div }, [CC_OP_ADD] = { compute_all_add, compute_C_add }, @@ -449,6 +455,7 @@ static const CCTable icc_table[CC_OP_NB] = { #ifdef TARGET_SPARC64 static const CCTable xcc_table[CC_OP_NB] = { /* CC_OP_DYNAMIC should never happen */ + [CC_OP_DYNAMIC] = { compute_null, compute_null }, [CC_OP_FLAGS] = { compute_all_flags_xcc, compute_C_flags_xcc }, [CC_OP_DIV] = { compute_all_logic_xcc, compute_C_logic }, [CC_OP_ADD] = { compute_all_add_xcc, compute_C_add_xcc }, diff --git a/tests/regress/sparc_jump_to_zero.c b/tests/regress/sparc_jump_to_zero.c index ecef159a..99148f2f 100644 --- a/tests/regress/sparc_jump_to_zero.c +++ b/tests/regress/sparc_jump_to_zero.c @@ -7,7 +7,7 @@ #define MEMORY_SIZE 2 * 1024 * 1024 #define MEMORY_PERMISSIONS UC_PROT_ALL -#define BINARY_CODE "\x02\xbc" +#define BINARY_CODE "\x02\xbc\x00\x00" int main(int argc, char **argv, char **envp) { uc_engine *uc;