[pk,sim,xcc] Renamed instructions to RISC-V spec
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Wed, 4 Aug 2010 03:48:02 +0000 (20:48 -0700)
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Wed, 4 Aug 2010 03:48:02 +0000 (20:48 -0700)
All word-sized arithmetic operations are now postfixed with 'w',
and all double-word-sized arithmetic operations are no longer
prefixed with 'd'.  mtc0/mfc0 are removed and replaced with
mfpcr/mtpcr/mwfpcr/mwtpcr.

63 files changed:
riscv/execute.h
riscv/insns/add.h
riscv/insns/addi.h
riscv/insns/addiw.h [new file with mode: 0644]
riscv/insns/addw.h [new file with mode: 0644]
riscv/insns/dadd.h [deleted file]
riscv/insns/daddi.h [deleted file]
riscv/insns/ddiv.h [deleted file]
riscv/insns/ddivu.h [deleted file]
riscv/insns/div.h
riscv/insns/divu.h
riscv/insns/divuw.h [new file with mode: 0644]
riscv/insns/divw.h [new file with mode: 0644]
riscv/insns/dmfc0.h [deleted file]
riscv/insns/dmtc0.h [deleted file]
riscv/insns/dmul.h [deleted file]
riscv/insns/dmulh.h [deleted file]
riscv/insns/dmulhu.h [deleted file]
riscv/insns/drem.h [deleted file]
riscv/insns/dremu.h [deleted file]
riscv/insns/dsll.h [deleted file]
riscv/insns/dsll32.h [deleted file]
riscv/insns/dsllv.h [deleted file]
riscv/insns/dsra.h [deleted file]
riscv/insns/dsra32.h [deleted file]
riscv/insns/dsrav.h [deleted file]
riscv/insns/dsrl.h [deleted file]
riscv/insns/dsrl32.h [deleted file]
riscv/insns/dsrlv.h [deleted file]
riscv/insns/dsub.h [deleted file]
riscv/insns/mfc0.h [deleted file]
riscv/insns/mfpcr.h [new file with mode: 0644]
riscv/insns/mtc0.h [deleted file]
riscv/insns/mtpcr.h [new file with mode: 0644]
riscv/insns/mul.h
riscv/insns/mulh.h
riscv/insns/mulhu.h
riscv/insns/mulhuw.h [new file with mode: 0644]
riscv/insns/mulhw.h [new file with mode: 0644]
riscv/insns/mulw.h [new file with mode: 0644]
riscv/insns/mwfpcr.h [new file with mode: 0644]
riscv/insns/mwtpcr.h [new file with mode: 0644]
riscv/insns/rem.h
riscv/insns/remu.h
riscv/insns/remuw.h [new file with mode: 0644]
riscv/insns/remw.h [new file with mode: 0644]
riscv/insns/sll.h
riscv/insns/sll32.h [new file with mode: 0644]
riscv/insns/sllv.h
riscv/insns/sllvw.h [new file with mode: 0644]
riscv/insns/sllw.h [new file with mode: 0644]
riscv/insns/sra.h
riscv/insns/sra32.h [new file with mode: 0644]
riscv/insns/srav.h
riscv/insns/sravw.h [new file with mode: 0644]
riscv/insns/sraw.h [new file with mode: 0644]
riscv/insns/srl.h
riscv/insns/srl32.h [new file with mode: 0644]
riscv/insns/srlv.h
riscv/insns/srlvw.h [new file with mode: 0644]
riscv/insns/srlw.h [new file with mode: 0644]
riscv/insns/sub.h
riscv/insns/subw.h [new file with mode: 0644]

index 54bf52d294e7544771f312dee2a045a39d21ba77..4715b7fc992a324be9b09b292fb91ab288a5b7dd 100644 (file)
@@ -585,7 +585,7 @@ switch((insn.bits >> 0x19) & 0x7f)
       }
       case 0x1:
       {
-        #include "insns/daddi.h"
+        #include "insns/addiw.h"
         break;
       }
       case 0x2:
@@ -714,14 +714,14 @@ switch((insn.bits >> 0x19) & 0x7f)
           #include "insns/srlv.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xea004020)
+        if((insn.bits & 0xfe007fe0) == 0xea004060)
         {
-          #include "insns/sllv.h"
+          #include "insns/srav.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xea004060)
+        if((insn.bits & 0xfe007fe0) == 0xea004020)
         {
-          #include "insns/srav.h"
+          #include "insns/sllv.h"
           break;
         }
         #include "insns/unimp.h"
@@ -766,14 +766,14 @@ switch((insn.bits >> 0x19) & 0x7f)
     {
       case 0x0:
       {
-        if((insn.bits & 0xfe007fe0) == 0xec000020)
+        if((insn.bits & 0xfe007fe0) == 0xec000000)
         {
-          #include "insns/dsub.h"
+          #include "insns/addw.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xec000000)
+        if((insn.bits & 0xfe007fe0) == 0xec000020)
         {
-          #include "insns/dadd.h"
+          #include "insns/subw.h"
           break;
         }
         #include "insns/unimp.h"
@@ -782,56 +782,56 @@ switch((insn.bits >> 0x19) & 0x7f)
       {
         if((insn.bits & 0xfe007fe0) == 0xec0010e0)
         {
-          #include "insns/dremu.h"
+          #include "insns/remuw.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xec001080)
+        if((insn.bits & 0xfe007fe0) == 0xec0010a0)
         {
-          #include "insns/ddiv.h"
+          #include "insns/divuw.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xec0010c0)
+        if((insn.bits & 0xfe007fe0) == 0xec001060)
         {
-          #include "insns/drem.h"
+          #include "insns/mulhuw.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xec001060)
+        if((insn.bits & 0xfe007fe0) == 0xec001000)
         {
-          #include "insns/dmulhu.h"
+          #include "insns/mulw.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xec001000)
+        if((insn.bits & 0xfe007fe0) == 0xec0010c0)
         {
-          #include "insns/dmul.h"
+          #include "insns/remw.h"
           break;
         }
         if((insn.bits & 0xfe007fe0) == 0xec001040)
         {
-          #include "insns/dmulh.h"
+          #include "insns/mulhw.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xec0010a0)
+        if((insn.bits & 0xfe007fe0) == 0xec001080)
         {
-          #include "insns/ddivu.h"
+          #include "insns/divw.h"
           break;
         }
         #include "insns/unimp.h"
       }
       case 0x4:
       {
-        if((insn.bits & 0xfe007fe0) == 0xec004020)
+        if((insn.bits & 0xfe007fe0) == 0xec004060)
         {
-          #include "insns/dsllv.h"
+          #include "insns/sravw.h"
           break;
         }
-        if((insn.bits & 0xfe007fe0) == 0xec004060)
+        if((insn.bits & 0xfe007fe0) == 0xec004020)
         {
-          #include "insns/dsrav.h"
+          #include "insns/sllvw.h"
           break;
         }
         if((insn.bits & 0xfe007fe0) == 0xec004040)
         {
-          #include "insns/dsrlv.h"
+          #include "insns/srlvw.h"
           break;
         }
         #include "insns/unimp.h"
@@ -840,26 +840,26 @@ switch((insn.bits >> 0x19) & 0x7f)
       {
         if((insn.bits & 0xfff07c00) == 0xec005000)
         {
-          #include "insns/dsll.h"
+          #include "insns/sllw.h"
           break;
         }
         if((insn.bits & 0xfff07c00) == 0xec005400)
         {
-          #include "insns/dsll32.h"
+          #include "insns/sll32.h"
           break;
         }
         #include "insns/unimp.h"
       }
       case 0x6:
       {
-        if((insn.bits & 0xfff07c00) == 0xec006400)
+        if((insn.bits & 0xfff07c00) == 0xec006000)
         {
-          #include "insns/dsrl32.h"
+          #include "insns/srlw.h"
           break;
         }
-        if((insn.bits & 0xfff07c00) == 0xec006000)
+        if((insn.bits & 0xfff07c00) == 0xec006400)
         {
-          #include "insns/dsrl.h"
+          #include "insns/srl32.h"
           break;
         }
         #include "insns/unimp.h"
@@ -868,12 +868,12 @@ switch((insn.bits >> 0x19) & 0x7f)
       {
         if((insn.bits & 0xfff07c00) == 0xec007400)
         {
-          #include "insns/dsra32.h"
+          #include "insns/sra32.h"
           break;
         }
         if((insn.bits & 0xfff07c00) == 0xec007000)
         {
-          #include "insns/dsra.h"
+          #include "insns/sraw.h"
           break;
         }
         #include "insns/unimp.h"
@@ -1101,7 +1101,7 @@ switch((insn.bits >> 0x19) & 0x7f)
       {
         if((insn.bits & 0xfe007fff) == 0xfc004000)
         {
-          #include "insns/mfc0.h"
+          #include "insns/mfpcr.h"
           break;
         }
         #include "insns/unimp.h"
@@ -1110,7 +1110,7 @@ switch((insn.bits >> 0x19) & 0x7f)
       {
         if((insn.bits & 0xfe007fff) == 0xfc005000)
         {
-          #include "insns/dmfc0.h"
+          #include "insns/mwfpcr.h"
           break;
         }
         #include "insns/unimp.h"
@@ -1119,7 +1119,7 @@ switch((insn.bits >> 0x19) & 0x7f)
       {
         if((insn.bits & 0xfe007fff) == 0xfc006000)
         {
-          #include "insns/mtc0.h"
+          #include "insns/mtpcr.h"
           break;
         }
         #include "insns/unimp.h"
@@ -1128,7 +1128,7 @@ switch((insn.bits >> 0x19) & 0x7f)
       {
         if((insn.bits & 0xfe007fff) == 0xfc007000)
         {
-          #include "insns/dmtc0.h"
+          #include "insns/mwtpcr.h"
           break;
         }
         #include "insns/unimp.h"
index bfbc48568ddbf707f67c57f718022f31b370199c..746cd80678ca0b19b35cd2bb48c69feb2d1a65d9 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32(RA + RB);
-
+require64;
+RC = RA + RB;
index 6935ccadea8c0c76ce4f2cdff22232ef7e1631ae..b6b208dc7af74fec1be93eba21b026555a0b2cf1 100644 (file)
@@ -1 +1,2 @@
-RA = sext32(SIMM + RB);
+require64;
+RA = SIMM + RB;
diff --git a/riscv/insns/addiw.h b/riscv/insns/addiw.h
new file mode 100644 (file)
index 0000000..6935cca
--- /dev/null
@@ -0,0 +1 @@
+RA = sext32(SIMM + RB);
diff --git a/riscv/insns/addw.h b/riscv/insns/addw.h
new file mode 100644 (file)
index 0000000..bfbc485
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32(RA + RB);
+
diff --git a/riscv/insns/dadd.h b/riscv/insns/dadd.h
deleted file mode 100644 (file)
index 746cd80..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RA + RB;
diff --git a/riscv/insns/daddi.h b/riscv/insns/daddi.h
deleted file mode 100644 (file)
index b6b208d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RA = SIMM + RB;
diff --git a/riscv/insns/ddiv.h b/riscv/insns/ddiv.h
deleted file mode 100644 (file)
index f0c2d2b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = sreg_t(RA) / sreg_t(RB);
diff --git a/riscv/insns/ddivu.h b/riscv/insns/ddivu.h
deleted file mode 100644 (file)
index a4e3f4f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RA / RB;
index e595c85af0c8af441552ac7fa3a7c9d84d4721a8..f0c2d2be5742a9ec67ee1384adc0383bf203e6a3 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32(int32_t(RA)/int32_t(RB));
-
+require64;
+RC = sreg_t(RA) / sreg_t(RB);
index 68f96a5d0768bf48451c93ee5ef99c2e78f27701..a4e3f4f27355d4ad4434a3a29114af762bc04618 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32(uint32_t(RA)/uint32_t(RB));
-
+require64;
+RC = RA / RB;
diff --git a/riscv/insns/divuw.h b/riscv/insns/divuw.h
new file mode 100644 (file)
index 0000000..68f96a5
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32(uint32_t(RA)/uint32_t(RB));
+
diff --git a/riscv/insns/divw.h b/riscv/insns/divw.h
new file mode 100644 (file)
index 0000000..e595c85
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32(int32_t(RA)/int32_t(RB));
+
diff --git a/riscv/insns/dmfc0.h b/riscv/insns/dmfc0.h
deleted file mode 100644 (file)
index 7808458..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-require_supervisor;
-require64;
-
-switch(insn.rtype.rb)
-{
-  case 0:
-    RA = sr;
-    break;
-  case 1:
-    RA = epc;
-    break;
-  case 2:
-    RA = badvaddr;
-    break;
-  case 3:
-    RA = ebase;
-    break;
-
-  case 8:
-    RA = MEMSIZE >> 12;
-    break;
-
-  case 17:
-    RA = sim->get_fromhost();
-    break;
-
-  default:
-    RA = -1;
-}
diff --git a/riscv/insns/dmtc0.h b/riscv/insns/dmtc0.h
deleted file mode 100644 (file)
index 67195a6..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-require_supervisor;
-require64;
-
-switch(insn.rtype.rb)
-{
-  case 0:
-    set_sr(RA);
-    break;
-  case 1:
-    epc = RA;
-    break;
-  case 3:
-    ebase = RA & ~0xFFF;
-    break;
-
-  case 16:
-    sim->set_tohost(RA);
-    break;
-}
diff --git a/riscv/insns/dmul.h b/riscv/insns/dmul.h
deleted file mode 100644 (file)
index 9c81285..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RA * RB;
diff --git a/riscv/insns/dmulh.h b/riscv/insns/dmulh.h
deleted file mode 100644 (file)
index 2d7ca4c..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-require64;
-int64_t rb = RA;
-int64_t ra = RB;
-RC = (int128_t(rb) * int128_t(ra)) >> 64;
diff --git a/riscv/insns/dmulhu.h b/riscv/insns/dmulhu.h
deleted file mode 100644 (file)
index 45e9704..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = (uint128_t(RA) * uint128_t(RB)) >> 64;
diff --git a/riscv/insns/drem.h b/riscv/insns/drem.h
deleted file mode 100644 (file)
index dfece43..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = sreg_t(RA) % sreg_t(RB);
diff --git a/riscv/insns/dremu.h b/riscv/insns/dremu.h
deleted file mode 100644 (file)
index e8ee6b1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RA % RB;
diff --git a/riscv/insns/dsll.h b/riscv/insns/dsll.h
deleted file mode 100644 (file)
index a07e038..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RB << SHAMT;
diff --git a/riscv/insns/dsll32.h b/riscv/insns/dsll32.h
deleted file mode 100644 (file)
index cfd9ba3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RB << (32+SHAMT);
diff --git a/riscv/insns/dsllv.h b/riscv/insns/dsllv.h
deleted file mode 100644 (file)
index 7e81e6b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RB << (RA & 0x3F);
diff --git a/riscv/insns/dsra.h b/riscv/insns/dsra.h
deleted file mode 100644 (file)
index 19118f0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = sreg_t(RB) >> SHAMT;
diff --git a/riscv/insns/dsra32.h b/riscv/insns/dsra32.h
deleted file mode 100644 (file)
index 001e3bd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = sreg_t(RB) >> (32+SHAMT);
diff --git a/riscv/insns/dsrav.h b/riscv/insns/dsrav.h
deleted file mode 100644 (file)
index ec6fee8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RB >> (RA & 0x3F);
diff --git a/riscv/insns/dsrl.h b/riscv/insns/dsrl.h
deleted file mode 100644 (file)
index 47426b1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RB >> SHAMT;
diff --git a/riscv/insns/dsrl32.h b/riscv/insns/dsrl32.h
deleted file mode 100644 (file)
index 5d52dea..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RB >> (32+SHAMT);
diff --git a/riscv/insns/dsrlv.h b/riscv/insns/dsrlv.h
deleted file mode 100644 (file)
index ec6fee8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RB >> (RA & 0x3F);
diff --git a/riscv/insns/dsub.h b/riscv/insns/dsub.h
deleted file mode 100644 (file)
index e7ac407..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-require64;
-RC = RA - RB;
diff --git a/riscv/insns/mfc0.h b/riscv/insns/mfc0.h
deleted file mode 100644 (file)
index 8a0a84a..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-require_supervisor;
-
-switch(insn.rtype.rb)
-{
-  case 0:
-    RA = sext32(sr);
-    break;
-  case 1:
-    RA = sext32(epc);
-    break;
-  case 2:
-    RA = sext32(badvaddr);
-    break;
-  case 3:
-    RA = sext32(ebase);
-    break;
-
-  case 8:
-    RA = sext32(MEMSIZE >> 12);
-    break;
-
-  case 17:
-    RA = sext32(sim->get_fromhost());
-    break;
-
-  default:
-    RA = -1;
-}
diff --git a/riscv/insns/mfpcr.h b/riscv/insns/mfpcr.h
new file mode 100644 (file)
index 0000000..7808458
--- /dev/null
@@ -0,0 +1,29 @@
+require_supervisor;
+require64;
+
+switch(insn.rtype.rb)
+{
+  case 0:
+    RA = sr;
+    break;
+  case 1:
+    RA = epc;
+    break;
+  case 2:
+    RA = badvaddr;
+    break;
+  case 3:
+    RA = ebase;
+    break;
+
+  case 8:
+    RA = MEMSIZE >> 12;
+    break;
+
+  case 17:
+    RA = sim->get_fromhost();
+    break;
+
+  default:
+    RA = -1;
+}
diff --git a/riscv/insns/mtc0.h b/riscv/insns/mtc0.h
deleted file mode 100644 (file)
index ca593df..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-require_supervisor;
-
-switch(insn.rtype.rb)
-{
-  case 0:
-    set_sr(sext32(RA));
-    break;
-  case 1:
-    epc = sext32(RA);
-    break;
-  case 3:
-    ebase = sext32(RA & ~0xFFF);
-    break;
-
-  case 16:
-    sim->set_tohost(sext32(RA));
-    break;
-}
diff --git a/riscv/insns/mtpcr.h b/riscv/insns/mtpcr.h
new file mode 100644 (file)
index 0000000..67195a6
--- /dev/null
@@ -0,0 +1,19 @@
+require_supervisor;
+require64;
+
+switch(insn.rtype.rb)
+{
+  case 0:
+    set_sr(RA);
+    break;
+  case 1:
+    epc = RA;
+    break;
+  case 3:
+    ebase = RA & ~0xFFF;
+    break;
+
+  case 16:
+    sim->set_tohost(RA);
+    break;
+}
index d999172c37efcdc8321e6053161ac5918f6ee3e0..9c81285022b4746fcf57329f5a1b82260f7b25e0 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32(RA * RB);
-
+require64;
+RC = RA * RB;
index 90a17be019e35341a1c57ca1a3d361b23917955e..2d7ca4ceacdf8315a5b9d58e676c54cb7d1380e8 100644 (file)
@@ -1,2 +1,4 @@
-RC = sext32((sreg_t(RA) * sreg_t(RB)) >> 32);
-
+require64;
+int64_t rb = RA;
+int64_t ra = RB;
+RC = (int128_t(rb) * int128_t(ra)) >> 64;
index 9f3de3ff630351c141e45e278c2a413af2f7f297..45e970405c2152d707f7770081c65196b1a888cd 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32((RA * RB) >> 32);
-
+require64;
+RC = (uint128_t(RA) * uint128_t(RB)) >> 64;
diff --git a/riscv/insns/mulhuw.h b/riscv/insns/mulhuw.h
new file mode 100644 (file)
index 0000000..9f3de3f
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32((RA * RB) >> 32);
+
diff --git a/riscv/insns/mulhw.h b/riscv/insns/mulhw.h
new file mode 100644 (file)
index 0000000..90a17be
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32((sreg_t(RA) * sreg_t(RB)) >> 32);
+
diff --git a/riscv/insns/mulw.h b/riscv/insns/mulw.h
new file mode 100644 (file)
index 0000000..d999172
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32(RA * RB);
+
diff --git a/riscv/insns/mwfpcr.h b/riscv/insns/mwfpcr.h
new file mode 100644 (file)
index 0000000..8a0a84a
--- /dev/null
@@ -0,0 +1,28 @@
+require_supervisor;
+
+switch(insn.rtype.rb)
+{
+  case 0:
+    RA = sext32(sr);
+    break;
+  case 1:
+    RA = sext32(epc);
+    break;
+  case 2:
+    RA = sext32(badvaddr);
+    break;
+  case 3:
+    RA = sext32(ebase);
+    break;
+
+  case 8:
+    RA = sext32(MEMSIZE >> 12);
+    break;
+
+  case 17:
+    RA = sext32(sim->get_fromhost());
+    break;
+
+  default:
+    RA = -1;
+}
diff --git a/riscv/insns/mwtpcr.h b/riscv/insns/mwtpcr.h
new file mode 100644 (file)
index 0000000..ca593df
--- /dev/null
@@ -0,0 +1,18 @@
+require_supervisor;
+
+switch(insn.rtype.rb)
+{
+  case 0:
+    set_sr(sext32(RA));
+    break;
+  case 1:
+    epc = sext32(RA);
+    break;
+  case 3:
+    ebase = sext32(RA & ~0xFFF);
+    break;
+
+  case 16:
+    sim->set_tohost(sext32(RA));
+    break;
+}
index 1bb3051d9692d4d3d7d70fd4bf508cd06225ab0c..dfece4377300350c02b537ded1279db759b6edce 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32(int32_t(RA) % int32_t(RB));
-
+require64;
+RC = sreg_t(RA) % sreg_t(RB);
index d028488e9d059cc7baa0ee81b97223cf39ac19a9..e8ee6b1a3ee711c1b4f3268fa3237ea2fd885e90 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32(uint32_t(RA) % uint32_t(RB));
-
+require64;
+RC = RA % RB;
diff --git a/riscv/insns/remuw.h b/riscv/insns/remuw.h
new file mode 100644 (file)
index 0000000..d028488
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32(uint32_t(RA) % uint32_t(RB));
+
diff --git a/riscv/insns/remw.h b/riscv/insns/remw.h
new file mode 100644 (file)
index 0000000..1bb3051
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32(int32_t(RA) % int32_t(RB));
+
index 67e6809cafd3169a866da9d38e1eba56de6c174a..a07e038cbbfee5d84e89474a1ec68506def0e288 100644 (file)
@@ -1 +1,2 @@
-RC = sext32(RB << SHAMT);
+require64;
+RC = RB << SHAMT;
diff --git a/riscv/insns/sll32.h b/riscv/insns/sll32.h
new file mode 100644 (file)
index 0000000..cfd9ba3
--- /dev/null
@@ -0,0 +1,2 @@
+require64;
+RC = RB << (32+SHAMT);
index f694a2ff3ce019a24881f8d528c200f08107ecfe..7e81e6b68b45a278591a6bd73ebb0e5c8613b3de 100644 (file)
@@ -1 +1,2 @@
-RC = sext32(RB << (RA & 0x1F));
+require64;
+RC = RB << (RA & 0x3F);
diff --git a/riscv/insns/sllvw.h b/riscv/insns/sllvw.h
new file mode 100644 (file)
index 0000000..f694a2f
--- /dev/null
@@ -0,0 +1 @@
+RC = sext32(RB << (RA & 0x1F));
diff --git a/riscv/insns/sllw.h b/riscv/insns/sllw.h
new file mode 100644 (file)
index 0000000..67e6809
--- /dev/null
@@ -0,0 +1 @@
+RC = sext32(RB << SHAMT);
index c2decb99b2e64148540c9a12c17f6021b433721c..19118f09236ddde51753cc6b4d17b2bbbe90331f 100644 (file)
@@ -1 +1,2 @@
-RC = sext32(sreg_t(RB) >> SHAMT);
+require64;
+RC = sreg_t(RB) >> SHAMT;
diff --git a/riscv/insns/sra32.h b/riscv/insns/sra32.h
new file mode 100644 (file)
index 0000000..001e3bd
--- /dev/null
@@ -0,0 +1,2 @@
+require64;
+RC = sreg_t(RB) >> (32+SHAMT);
index 8e9aa8825f14dd27ffccb400ad539282fa940ea0..ec6fee88a0b2c8532a1706d7339925d5d39996ec 100644 (file)
@@ -1 +1,2 @@
-RC = sext32(sreg_t(RB) >> (RA & 0x1F));
+require64;
+RC = RB >> (RA & 0x3F);
diff --git a/riscv/insns/sravw.h b/riscv/insns/sravw.h
new file mode 100644 (file)
index 0000000..8e9aa88
--- /dev/null
@@ -0,0 +1 @@
+RC = sext32(sreg_t(RB) >> (RA & 0x1F));
diff --git a/riscv/insns/sraw.h b/riscv/insns/sraw.h
new file mode 100644 (file)
index 0000000..c2decb9
--- /dev/null
@@ -0,0 +1 @@
+RC = sext32(sreg_t(RB) >> SHAMT);
index 0537a1cc5e6e9d2b903d0cd8f28bbb9d104e8265..47426b132bcfb1c5f585f70918b942706c778564 100644 (file)
@@ -1 +1,2 @@
-RC = sext32(RB >> SHAMT);
+require64;
+RC = RB >> SHAMT;
diff --git a/riscv/insns/srl32.h b/riscv/insns/srl32.h
new file mode 100644 (file)
index 0000000..5d52dea
--- /dev/null
@@ -0,0 +1,2 @@
+require64;
+RC = RB >> (32+SHAMT);
index 7e1755ffc468931077dc791bae0101a9986d9bfb..ec6fee88a0b2c8532a1706d7339925d5d39996ec 100644 (file)
@@ -1 +1,2 @@
-RC = sext32(RB >> (RA & 0x1F));
+require64;
+RC = RB >> (RA & 0x3F);
diff --git a/riscv/insns/srlvw.h b/riscv/insns/srlvw.h
new file mode 100644 (file)
index 0000000..7e1755f
--- /dev/null
@@ -0,0 +1 @@
+RC = sext32(RB >> (RA & 0x1F));
diff --git a/riscv/insns/srlw.h b/riscv/insns/srlw.h
new file mode 100644 (file)
index 0000000..0537a1c
--- /dev/null
@@ -0,0 +1 @@
+RC = sext32(RB >> SHAMT);
index 60bcf27befc5603c0f4a1c19fbfeebba539f0292..e7ac407639435d582f7aa08ad9b08a27e0d19e54 100644 (file)
@@ -1,2 +1,2 @@
-RC = sext32(RA - RB);
-
+require64;
+RC = RA - RB;
diff --git a/riscv/insns/subw.h b/riscv/insns/subw.h
new file mode 100644 (file)
index 0000000..60bcf27
--- /dev/null
@@ -0,0 +1,2 @@
+RC = sext32(RA - RB);
+