Add --disable-dtb option to suppress writing the DTB to memory
[riscv-isa-sim.git] / riscv / decode.h
index 8fc8ada1b269cad40ecf04203a5fac245aec0584..9634f57ab6c634d2f90552387bb4936263d8313b 100644 (file)
@@ -211,11 +211,17 @@ private:
        STATE.pc = __npc; \
      } while(0)
 
+#define wfi() \
+  do { set_pc_and_serialize(npc); \
+       npc = PC_SERIALIZE_WFI; \
+     } while(0)
+
 #define serialize() set_pc_and_serialize(npc)
 
 /* 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 */