From dec4d30f8eb897ef4089df6fa5605cf7a5e35b30 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 9 Sep 2010 17:50:10 -0700 Subject: Revert "[xcc, sim] added slei/sleui in lieu of slti/sltiu" 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. --- opcodes | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'opcodes') diff --git a/opcodes b/opcodes index 97a7eef..96ea4a5 100644 --- a/opcodes +++ b/opcodes @@ -22,8 +22,8 @@ bleu 31..25=0x73 14..12=5 ra rb imm addi 31..25=0x74 14..12=0 ra rb imm addiw 31..25=0x74 14..12=1 ra rb imm -slei 31..25=0x74 14..12=2 ra rb imm -sleiu 31..25=0x74 14..12=3 ra rb imm +slti 31..25=0x74 14..12=2 ra rb imm +sltiu 31..25=0x74 14..12=3 ra rb imm andi 31..25=0x74 14..12=4 ra rb imm ori 31..25=0x74 14..12=5 ra rb imm xori 31..25=0x74 14..12=6 ra rb imm -- cgit v1.2.3