From: Andrew Waterman Date: Wed, 30 Mar 2011 10:37:32 +0000 (-0700) Subject: [xcc] fixed bug in amo{maxu,minu}.w X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb6cb4b2ee5b179540852fe6736cfc4c0b63b999;p=riscv-isa-sim.git [xcc] fixed bug in amo{maxu,minu}.w --- diff --git a/riscv/insns/amomaxu_w.h b/riscv/insns/amomaxu_w.h index f7b0b7f..075847d 100644 --- a/riscv/insns/amomaxu_w.h +++ b/riscv/insns/amomaxu_w.h @@ -1,3 +1,3 @@ uint32_t v = mmu.load_int32(RS1); mmu.store_uint32(RS1, std::max(uint32_t(RS2),v)); -RD = v; +RD = (int32_t)v; diff --git a/riscv/insns/amominu_w.h b/riscv/insns/amominu_w.h index 2e9fd17..d8d6377 100644 --- a/riscv/insns/amominu_w.h +++ b/riscv/insns/amominu_w.h @@ -1,3 +1,3 @@ uint32_t v = mmu.load_int32(RS1); mmu.store_uint32(RS1, std::min(uint32_t(RS2),v)); -RD = v; +RD = (int32_t)v;