From 59132de54a44e3bb32b62828d9957b5780a05bb0 Mon Sep 17 00:00:00 2001 From: lkcl Date: Tue, 18 Apr 2023 09:21:01 +0100 Subject: [PATCH] --- openpower/sv/rfc/ls005.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/openpower/sv/rfc/ls005.mdwn b/openpower/sv/rfc/ls005.mdwn index c4e817202..b2981600c 100644 --- a/openpower/sv/rfc/ls005.mdwn +++ b/openpower/sv/rfc/ls005.mdwn @@ -205,6 +205,29 @@ Therefore a little more thought is required. Should this simply be UNDEFINED behaviour when XLEN=8/16 and L=1? When XLEN=16, L=0 the instruction is still valid. Would it be costly at the Decoder? +## Trap Word Immediate + +Like FP Single operations there also exist operations at "half of regfile width" +in the Integer realm. They are discernable with the designation `Word` in their +title. + +``` + a <- EXTS((RA)[XLEN/2:XLEN-1]) + if (a < EXTS(SI)) & TO[0] then TRAP + if (a > EXTS(SI)) & TO[1] then TRAP + if (a = EXTS(SI)) & TO[2] then TRAP + if (a u EXTS(SI)) & TO[4] then TRAP +``` + +Here, EXTS receives **half** of the bits of its input register operand, RA. +Note this is **not** "32 bit because a Word is 32-bit". The definition +"Trap Word Immediate" has to be replaced with "Trap Half-register-width Immediate" +but this is very clumsy. + +When XLEN=8 "half register width" is clearly 4 bit, thus the LSB nibble is tested, +but still sign-extended for comparison +against the 16-bit signed immediate. \newpage{} -- 2.30.2