This reverts commit
bf5406d4df625678bc6ec20ce1d48541541dba54.
We found a clever way to efficiently implement slti/sltiu despite the
reversed operands. The trick is because of the following fact:
(a < b) === !(b <= a) === !(b-1 < a)
So just turn off the carry-in when doing the subtraction for the comparison.
}
case 0x2:
{
- #include "insns/slei.h"
+ #include "insns/slti.h"
break;
}
case 0x3:
{
- #include "insns/sleiu.h"
+ #include "insns/sltiu.h"
break;
}
case 0x4:
+++ /dev/null
-RA = !(sreg_t(cmp_trunc(SIMM)) < sreg_t(cmp_trunc(RB)));
+++ /dev/null
-RA = !(cmp_trunc(SIMM) < cmp_trunc(RB));
--- /dev/null
+RA = sreg_t(cmp_trunc(RB)) < sreg_t(cmp_trunc(SIMM));
--- /dev/null
+RA = cmp_trunc(RB) < cmp_trunc(SIMM);