replace | operator with rv_or
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 14 Oct 2018 04:45:40 +0000 (05:45 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 14 Oct 2018 04:45:40 +0000 (05:45 +0100)
riscv/insns/or.h
riscv/insns/ori.h
riscv/sv_insn_redirect.cc
riscv/sv_insn_redirect.h

index 3f2fffc22e2a2ca0ae6663c79f31d27f5cf94ffb..631644a325af3b7910e7d2195590748ee8be9820 100644 (file)
@@ -1 +1 @@
-WRITE_RD(RS1 | RS2);
+WRITE_RD(rv_or(RS1, RS2));
index 6403c39b5b476fa98948a6aa44dbbbdb1b430a74..6369ae52f1151c7cb01196463b6468248abb4f20 100644 (file)
@@ -1 +1 @@
-WRITE_RD(insn.i_imm() | RS1);
+WRITE_RD(rv_or(insn.i_imm(), RS1));
index 34ee0ca0f852c415982f16476df4c726831068c2..475f86e1070bdb92c29e71b48028ac4708f184d7 100644 (file)
@@ -247,3 +247,8 @@ reg_t sv_proc_t::rv_and(reg_t lhs, reg_t rhs)
     return lhs & rhs;
 }
 
+reg_t sv_proc_t::rv_or(reg_t lhs, reg_t rhs)
+{
+    return lhs | rhs;
+}
+
index 71b98018fb1351bbffab0c1b9523294bb4c67c55..3f133beac7c7ab675e4faca259bc5ee844cb696a 100644 (file)
@@ -100,6 +100,7 @@ public:
     sreg_t rv_div(sreg_t lhs, sreg_t rhs);
     reg_t rv_mul(reg_t lhs, reg_t rhs);
     reg_t rv_and(reg_t lhs, reg_t rhs);
+    reg_t rv_or(reg_t lhs, reg_t rhs);
 
 #include "sv_insn_decl.h"
 };