提交 1df0ebed 编写于 作者: Z Zihao Yu

engine,rv64,rtl-basic: fix 4-byte rtl_lm()

* we should use the signed-load for 32-bit ISA
上级 c62c8925
......@@ -242,7 +242,11 @@ make_rtl(lm, rtlreg_t *dest, const rtlreg_t* addr, const sword_t imm, int len) {
switch (len) {
case 1: rv64_lbu(idx_dest, tmp0, imm & 0xfff); break;
case 2: rv64_lhu(idx_dest, tmp0, imm & 0xfff); break;
#ifdef ISA64
case 4: rv64_lwu(idx_dest, tmp0, imm & 0xfff); break;
#else
case 4: rv64_lw (idx_dest, tmp0, imm & 0xfff); break;
#endif
case 8: rv64_ld (idx_dest, tmp0, imm & 0xfff); break;
default: assert(0);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册