Browse Source

Remove the now-unused PC_SERIALIZE_WFI

When WFI was changed to throw a C++ exception, the special-npc
signaling became obsolete.
pull/1023/head
Kip Walker 4 years ago
committed by Andrew Waterman
parent
commit
7e9da99668
  1. 2
      riscv/decode.h
  2. 1
      riscv/execute.cc

2
riscv/decode.h

@ -316,7 +316,6 @@ class wait_for_interrupt_t {};
#define wfi() \
do { set_pc_and_serialize(npc); \
npc = PC_SERIALIZE_WFI; \
throw wait_for_interrupt_t(); \
} while (0)
@ -325,7 +324,6 @@ class wait_for_interrupt_t {};
/* Sentinel PC values to serialize simulator pipeline */
#define PC_SERIALIZE_BEFORE 3
#define PC_SERIALIZE_AFTER 5
#define PC_SERIALIZE_WFI 7
#define invalid_pc(pc) ((pc) & 1)
/* Convenience wrappers to simplify softfloat code sequences */

1
riscv/execute.cc

@ -242,7 +242,6 @@ void processor_t::step(size_t n)
switch (pc) { \
case PC_SERIALIZE_BEFORE: state.serialized = true; break; \
case PC_SERIALIZE_AFTER: ++instret; break; \
case PC_SERIALIZE_WFI: n = ++instret; break; \
default: abort(); \
} \
pc = state.pc; \

Loading…
Cancel
Save