From 0a972b0d446c85894acbebd5c7ec3661abf5fbf7 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 5 Apr 2020 21:12:10 +0100 Subject: [PATCH] syntax corrections to bcd --- openpower/isa/bcd.mdwn | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/openpower/isa/bcd.mdwn b/openpower/isa/bcd.mdwn index 9b196a13b..d29ff5f55 100644 --- a/openpower/isa/bcd.mdwn +++ b/openpower/isa/bcd.mdwn @@ -1,4 +1,4 @@ -# Convert Declets To Binary Coded Decimal +# Convert Declets To Binary Coded Decimal X-Form @@ -6,9 +6,9 @@ X-Form do i = 0 to 1 n <- i * 32 - RA[n+0:n+7] <- 0 - RA[n+8:n+19 ] <- DPD_TO_BCD( (RS)[n+12:n+21] ) - RA[n+20:n+31] <- DPD_TO_BCD( (RS)[n+22:n+31] ) + RA[n+0:n+7] <- 0 + RA[n+8:n+19 ] <- DPD_TO_BCD ( (RS)[n+12:n+21] ) + RA[n+20:n+31] <- DPD_TO_BCD ( (RS)[n+22:n+31] ) Special Registers Altered: @@ -21,15 +21,18 @@ XO-Form * addg6s RT,RA,RB do i = 0 to 15 - dci <- carry_out(RA[4xi:63] + RB[4xi:63]) - c <- [dc[0]]*4 || [dc[1]]*4 || ... || [dc[15]]*4 + dci <- carry_out(RA[4*i:63] + RB[4*i:63]) + c <- ([dc[0]]*4 || [dc[1]]*4 || [dc[2]]*4 || [dc[3]]*4 || + [dc[4]]*4 || [dc[5]]*4 || [dc[6]]*4 || [dc[7]]*4 || + [dc[8]]*4 || [dc[9]]*4 || [dc[10]]*4 || [dc[11]]*4 || + [dc[12]]*4 || [dc[13]]*4 || [dc[14]]*4 || [dc[15]]*4) RT <- (¬c) & 0x6666_6666_6666_6666 Special Registers Altered: None -# Convert Binary Coded Decimal To Declets +# Convert Binary Coded Decimal To Declets X-Form @@ -37,9 +40,9 @@ X-Form do i = 0 to 1 n <- i * 32 - RA[n+0:n+11] <- 0 - RA[n+12:n+21] <- BCD_TO_DPD( (RS)[n+8:n+19] ) - RA[n+22:n+31] <- BCD_TO_DPD( (RS)[n+20:n+31] ) + RA[n+0:n+11] <- 0 + RA[n+12:n+21] <- BCD_TO_DPD ( (RS)[n+8:n+19] ) + RA[n+22:n+31] <- BCD_TO_DPD ( (RS)[n+20:n+31] ) Special Registers Altered: -- 2.30.2