add overload/redirection for WRITE_REG
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 15 Oct 2018 05:43:24 +0000 (06:43 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 15 Oct 2018 05:43:24 +0000 (06:43 +0100)
riscv/sv_insn_redirect.cc
riscv/sv_insn_redirect.h

index f329ebd1df8daf2b167fc6c216860cd308f3aaa1..1dd16d712516c039757cb07bc30bde2e71dbbb79 100644 (file)
@@ -35,6 +35,12 @@ void (sv_proc_t::WRITE_RD)(uint64_t value)
     WRITE_REG( _insn->rd(), value ); // XXX TODO: replace properly
 }
 
+void (sv_proc_t::WRITE_REG)(reg_t reg, uint64_t value)
+{
+    WRITE_REG( reg, value ); // XXX TODO: replace properly
+    //STATE.XPR.write(reg, value);
+}
+
 /*
 void (sv_proc_t::WRITE_RD)(int_fast64_t value)
 {
index 8052013de4cba3f398099278df609dc1d8c893e0..8942114d42201f8cae3c1685cdd02fb314c5dad9 100644 (file)
@@ -15,6 +15,7 @@
 #undef RVC_RS2
 #undef RVC_RS1S
 #undef RVC_RS2S
+//#undef WRITE_REG
 #undef WRITE_FRD
 #undef WRITE_RD
 #undef RVC_SP
@@ -48,6 +49,7 @@ public:
     //void (WRITE_RD)(int_fast64_t value); // XXX TODO investigate
     //void (WRITE_RD)(uint_fast64_t value); // XXX TODO investigate
     void (WRITE_RD)(uint64_t value); // XXX TODO investigate
+    void (WRITE_REG)(reg_t reg, uint64_t value);
     void (WRITE_FRD)(freg_t value);
     void (WRITE_FRD)(float64_t value);
     void (WRITE_FRD)(float32_t value);