From: Andrew Waterman Date: Tue, 7 Sep 2010 23:04:57 +0000 (-0700) Subject: [xcc, sim] added slei/sleui in lieu of slti/sltiu X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c82197c5930d4bf103fe80a7ac877e22b22c4842;p=riscv-isa-sim.git [xcc, sim] added slei/sleui in lieu of slti/sltiu Rationale was that since we have the datapath for rc = (ra < rb), it's straightforward to also add rc = !(imm < rb) = (rb <= imm). --- diff --git a/riscv/execute.h b/riscv/execute.h index 15f90ef..69bdeb0 100644 --- a/riscv/execute.h +++ b/riscv/execute.h @@ -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 index 0000000..2f4fe29 --- /dev/null +++ b/riscv/insns/slei.h @@ -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 index 0000000..2519eb4 --- /dev/null +++ b/riscv/insns/sleiu.h @@ -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 index a5ef31e..0000000 --- a/riscv/insns/slti.h +++ /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 index a09f3ec..0000000 --- a/riscv/insns/sltiu.h +++ /dev/null @@ -1 +0,0 @@ -RA = cmp_trunc(RB) < cmp_trunc(SIMM);