[xcc] fixed bug in amo{maxu,minu}.w
authorAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>
Wed, 30 Mar 2011 10:37:32 +0000 (03:37 -0700)
committerAndrew Waterman <waterman@s144.Millennium.Berkeley.EDU>
Wed, 30 Mar 2011 10:37:32 +0000 (03:37 -0700)
riscv/insns/amomaxu_w.h
riscv/insns/amominu_w.h

index f7b0b7ff98319082d29b81e8766103bf6f7301f9..075847d9114caa4ebaf825f504f456d5f51d99e7 100644 (file)
@@ -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;
index 2e9fd17d0f5bee3dbce17feaac0bccddcb4c3cee..d8d637702383742b1b06956ba914b3bc3d72a965 100644 (file)
@@ -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;