From 5be5938b00a48f4e49c23fe94d63de9861283ae1 Mon Sep 17 00:00:00 2001 From: lkcl Date: Wed, 23 Jun 2021 13:35:34 +0100 Subject: [PATCH] --- openpower/sv/ldst.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openpower/sv/ldst.mdwn b/openpower/sv/ldst.mdwn index fd3fbed41..4b106928e 100644 --- a/openpower/sv/ldst.mdwn +++ b/openpower/sv/ldst.mdwn @@ -88,7 +88,8 @@ with the pseudocode below, the immediate can be used to give unit stride or elem if (RT.isvec) j++; # reverses the bitorder up to "width" bits - def bitrev(val, width): + def bitrev(val, VL): + width = log2(VL) result = 0 for _ in range(width): result = (result << 1) | (val & 1) -- 2.30.2