[xcc, sim] added slei/sleui in lieu of slti/sltiu
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Tue, 7 Sep 2010 23:04:57 +0000 (16:04 -0700)
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Tue, 7 Sep 2010 23:04:57 +0000 (16:04 -0700)
Rationale was that since we have the datapath for rc = (ra < rb),
it's straightforward to also add rc = !(imm < rb) = (rb <= imm).

riscv/execute.h
riscv/insns/slei.h [new file with mode: 0644]
riscv/insns/sleiu.h [new file with mode: 0644]
riscv/insns/slti.h [deleted file]
riscv/insns/sltiu.h [deleted file]

index 15f90efcd67800172974b9c9d62e1c7c11fe845d..69bdeb05e042c1e483152e2b8b6347a1ca5e83ed 100644 (file)
@@ -480,12 +480,12 @@ switch((insn.bits >> 0x19) & 0x7f)
       }
       case 0x2:
       {
-        #include "insns/slti.h"
+        #include "insns/slei.h"
         break;
       }
       case 0x3:
       {
-        #include "insns/sltiu.h"
+        #include "insns/sleiu.h"
         break;
       }
       case 0x4:
diff --git a/riscv/insns/slei.h b/riscv/insns/slei.h
new file mode 100644 (file)
index 0000000..2f4fe29
--- /dev/null
@@ -0,0 +1 @@
+RA = !(sreg_t(cmp_trunc(SIMM)) < sreg_t(cmp_trunc(RB)));
diff --git a/riscv/insns/sleiu.h b/riscv/insns/sleiu.h
new file mode 100644 (file)
index 0000000..2519eb4
--- /dev/null
@@ -0,0 +1 @@
+RA = !(cmp_trunc(SIMM) < cmp_trunc(RB));
diff --git a/riscv/insns/slti.h b/riscv/insns/slti.h
deleted file mode 100644 (file)
index a5ef31e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RA = sreg_t(cmp_trunc(RB)) < sreg_t(cmp_trunc(SIMM));
diff --git a/riscv/insns/sltiu.h b/riscv/insns/sltiu.h
deleted file mode 100644 (file)
index a09f3ec..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RA = cmp_trunc(RB) < cmp_trunc(SIMM);