From: Jacob Lifshay Date: Mon, 26 Sep 2022 21:50:34 +0000 (-0700) Subject: more cleanup after swapping RA/RB for pcdec. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=94a1b285ec30a82dfad9ddac37f668352db91ff8;p=openpower-isa.git more cleanup after swapping RA/RB for pcdec. --- diff --git a/openpower/isa/prefix_codes.mdwn b/openpower/isa/prefix_codes.mdwn index 20cdb9c3..88606e7b 100644 --- a/openpower/isa/prefix_codes.mdwn +++ b/openpower/isa/prefix_codes.mdwn @@ -9,12 +9,12 @@ VA2-Form Pseudo-code: tree[0:63] <- (RB) - rb_used <- 0b0 + ra_used <- 0b0 in_bits[0:63] <- (RC|0) if in_bits = 0 then in_bits[0:63] <- 1 final_in_bits <- in_bits - final_rb_used <- rb_used + final_ra_used <- ra_used output <- [0] * 64 out_byte <- 0 decoded[0:7] <- 1 @@ -22,9 +22,9 @@ Pseudo-code: do while out_byte < 8 in_bit <- in_bits[63] if in_bits = 1 then - if rb_used | (_RA = 0) then + if ra_used | (_RA = 0) then leave - rb_used <- 0b1 + ra_used <- 0b1 in_bit <- (RA)[63] in_bits <- 0b1 || (RA)[0:62] else @@ -34,7 +34,7 @@ Pseudo-code: if decoded len(rev_input_bits) - if expected_rb_used: + expected_ra_used = decoded_bits_len > len(rev_input_bits) + if expected_ra_used: expected_RS = (RA_val + 2 ** 64) >> decoded_bits_len RC_val = int("1" + rev_input_bits, 2) if expected_RS is None: @@ -90,7 +90,7 @@ class PrefixCodesCases(TestAccumulatorBase): e = ExpectedState(pc=4, int_regs=gprs) e.intregs[4] = expected_RT e.intregs[5] = expected_RS - e.crregs[0] = expected_rb_used * 8 + expected_EQ * 2 + expected_SO + e.crregs[0] = expected_ra_used * 8 + expected_EQ * 2 + expected_SO with self.subTest(supported_codes=supported_codes, input_bits=original_input_bits): self.add_case(Program(lst, False), gprs, expected=e,