diff options
Diffstat (limited to 'sim/common/cgen-trace.c')
-rw-r--r-- | sim/common/cgen-trace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c index 9b7d1faf5d4..db852d5306c 100644 --- a/sim/common/cgen-trace.c +++ b/sim/common/cgen-trace.c @@ -380,12 +380,12 @@ sim_cgen_disassemble_insn (SIM_CPU *cpu, const CGEN_INSN *insn, length = sim_core_read_buffer (sd, cpu, read_map, &insn_buf, pc, insn_length); - switch (min (CGEN_BASE_INSN_SIZE, insn_length)) + switch (min (cd->base_insn_bitsize, insn_bit_length)) { case 0 : return; /* fake insn, typically "compile" (aka "invalid") */ - case 1 : insn_value = insn_buf.bytes[0]; break; - case 2 : insn_value = T2H_2 (insn_buf.shorts[0]); break; - case 4 : insn_value = T2H_4 (insn_buf.words[0]); break; + case 8 : insn_value = insn_buf.bytes[0]; break; + case 16 : insn_value = T2H_2 (insn_buf.shorts[0]); break; + case 32 : insn_value = T2H_4 (insn_buf.words[0]); break; default: abort (); } |