From 6484c99953ceeff206a5888c148b9412be1b5656 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 1 Nov 2022 13:53:27 +0000 Subject: [PATCH] corrections to shadd/uw after reverting to switch --- openpower/isa/bitmanip.mdwn | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/openpower/isa/bitmanip.mdwn b/openpower/isa/bitmanip.mdwn index 89515ec9..94fd48ba 100644 --- a/openpower/isa/bitmanip.mdwn +++ b/openpower/isa/bitmanip.mdwn @@ -112,11 +112,10 @@ Pseudo-code: n <- (RB) switch (sm) - case (0): sum[0:XLEN-1] = (n[0:XLEN-1-1] || [0]*1) + (RA) - case (1): sum[0:XLEN-1] = (n[0:XLEN-2-1] || [0]*2) + (RA) - case (2): sum[0:XLEN-1] = (n[0:XLEN-3-1] || [0]*3) + (RA) - default: sum[0:XLEN-1] = (n[0:XLEN-4-1] || [0]*4) + (RA) - RT <- sum + case (0): RT <- (n[1:XLEN-1] || [0]*1) + (RA) + case (1): RT <- (n[2:XLEN-1] || [0]*2) + (RA) + case (2): RT <- (n[3:XLEN-1] || [0]*3) + (RA) + case (3): RT <- (n[4:XLEN-1] || [0]*4) + (RA) Special Registers Altered: @@ -133,11 +132,10 @@ Pseudo-code: n <- ([0]*(XLEN/2)) || (RB)[XLEN/2:XLEN-1] switch (sm) - case (0): sum[0:XLEN-1] = (n[0:XLEN-1-1] || [0]*1) + (RA) - case (1): sum[0:XLEN-1] = (n[0:XLEN-2-1] || [0]*2) + (RA) - case (2): sum[0:XLEN-1] = (n[0:XLEN-3-1] || [0]*3) + (RA) - default: sum[0:XLEN-1] = (n[0:XLEN-4-1] || [0]*4) + (RA) - RT <- sum + case (0): RT <- (n[1:XLEN-1] || [0]*1) + (RA) + case (1): RT <- (n[2:XLEN-1] || [0]*2) + (RA) + case (2): RT <- (n[3:XLEN-1] || [0]*3) + (RA) + case (3): RT <- (n[4:XLEN-1] || [0]*4) + (RA) Special Registers Altered: -- 2.30.2