From a9c455170460478310de1f68c1642b610e894250 Mon Sep 17 00:00:00 2001 From: Tariq Kurd Date: Mon, 8 Jan 2024 11:59:54 +0000 Subject: [PATCH] remap cincoffsetimm to op-imm-32 and make cincoffset with rs2=x0 decode as cmove --- unratified/rv64_cheri | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/unratified/rv64_cheri b/unratified/rv64_cheri index 5ade1bd5..dec08bec 100644 --- a/unratified/rv64_cheri +++ b/unratified/rv64_cheri @@ -1,12 +1,14 @@ lc rd rs1 imm12 14..12=4 6..2=0x03 1..0=3 sc imm12hi rs1 rs2 imm12lo 14..12=4 6..2=0x08 1..0=3 -#6-bit immediate fits, should hopefully be enough? -cincoffsetimm rd rs1 imm6 31..26=1 14..12=1 6..2=0x04 1..0=3 +#need to ADDIW +cincoffsetimm rd rs1 imm12 14..12=2 6..2=0x06 1..0=3 #5-bit immediate and 25 says whether to shift it -csetboundsimm rd rs1 imm5 31..26=1 14..12=5 6..2=0x04 1..0=3 +csetboundsimm rd rs1 imm5 31..26=1 14..12=5 6..2=0x04 1..0=3 -cincoffset rd rs1 rs2 31..25=6 14..12=0 6..2=0x0C 1..0=3 +#if rs2=x0 decode as cmove +cincoffset rd rs1 rs2 31..25=6 14..12=0 6..2=0x06 1..0=3 +cmove rd rs1 24..20=0 31..25=6 14..12=0 6..2=0x06 1..0=3 csetaddr rd rs1 rs2 31..25=6 14..12=1 6..2=0x0C 1..0=3 candperm rd rs1 rs2 31..25=6 14..12=2 6..2=0x0C 1..0=3 csethigh rd rs1 rs2 31..25=6 14..12=3 6..2=0x0C 1..0=3 @@ -19,7 +21,6 @@ csetboundsinexact rd rs1 rs2 31..25=7 14..12=1 6..2=0x0C 1..0=3 cgettag rd rs1 31..25=8 24..20=0 14..12=0 6..2=0x0C 1..0=3 cgetperm rd rs1 31..25=8 24..20=1 14..12=0 6..2=0x0C 1..0=3 -cmove rd rs1 31..25=8 24..20=2 14..12=0 6..2=0x0C 1..0=3 csetmode rd rs1 31..25=8 24..20=3 14..12=0 6..2=0x0C 1..0=3 cgethigh rd rs1 31..25=8 24..20=4 14..12=0 6..2=0x0C 1..0=3 cgetbase rd rs1 31..25=8 24..20=5 14..12=0 6..2=0x0C 1..0=3