rv_add in lh/sh
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 14 Oct 2018 05:31:27 +0000 (06:31 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 14 Oct 2018 05:31:27 +0000 (06:31 +0100)
riscv/insns/lh.h
riscv/insns/lhu.h
riscv/insns/lwu.h
riscv/insns/sh.h

index 0d458e0ee1004337d7dd08953a8d8f126cb55a4f..0ac4b9a5b350f9e8d457d001ac69c411c41b7d37 100644 (file)
@@ -1 +1 @@
-WRITE_RD(MMU.load_int16(RS1 + insn.i_imm()));
+WRITE_RD(MMU.load_int16(rv_add(RS1, insn.i_imm())));
index 9d240702adc5c03077bf48d3ba2f5dd1d7d3161d..b428ffaa6ea2d1690bb86034e35ef19727380d88 100644 (file)
@@ -1 +1 @@
-WRITE_RD(MMU.load_uint16(RS1 + insn.i_imm()));
+WRITE_RD(MMU.load_uint16(rv_add(RS1, insn.i_imm())));
index dcc4d75bab8b4d0815fdb8468fd0505d4153f309..f0e46a2a02c7799054d1c08f8c85fa59cc6ae2b4 100644 (file)
@@ -1,2 +1,2 @@
 require_rv64;
-WRITE_RD(MMU.load_uint32(RS1 + insn.i_imm()));
+WRITE_RD(MMU.load_uint32(rv_add(RS1, insn.i_imm())));
index 22aa3a889e58db8294691bfb97b116fd567daba1..e216392ce733f34422ff23b047903e229514777a 100644 (file)
@@ -1 +1 @@
-MMU.store_uint16(RS1 + insn.s_imm(), RS2);
+MMU.store_uint16(rv_add(RS1, insn.s_imm()), RS2);