[sim] Bug fixes in shifts, plus a new test case
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Thu, 5 Aug 2010 03:28:47 +0000 (20:28 -0700)
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Thu, 5 Aug 2010 03:28:47 +0000 (20:28 -0700)
riscv/insns/srav.h
riscv/insns/srlvw.h
riscv/insns/srlw.h

index ec6fee88a0b2c8532a1706d7339925d5d39996ec..e01fcd58ebbf8623cc314f463946bfae6dfe9a90 100644 (file)
@@ -1,2 +1,2 @@
 require64;
-RC = RB >> (RA & 0x3F);
+RC = sreg_t(RB) >> (RA & 0x3F);
index 7e1755ffc468931077dc791bae0101a9986d9bfb..c523b59dbe1bc55a3d0cd367ce0db3dc3ad8cc97 100644 (file)
@@ -1 +1 @@
-RC = sext32(RB >> (RA & 0x1F));
+RC = sext32((uint32_t)RB >> (RA & 0x1F));
index 0537a1cc5e6e9d2b903d0cd8f28bbb9d104e8265..9e41c8c00851a552faaa78f34cacd4d38e437622 100644 (file)
@@ -1 +1 @@
-RC = sext32(RB >> SHAMT);
+RC = sext32((uint32_t)RB >> SHAMT);