From 50eb051ab3b916aab443ea3484a02b00e5a143d0 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Tue, 1 Nov 2022 22:16:52 +0300 Subject: [PATCH] bitmanip.mdwn: avoid overflow for m variable --- openpower/isa/bitmanip.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openpower/isa/bitmanip.mdwn b/openpower/isa/bitmanip.mdwn index 5d404488..9c12c69e 100644 --- a/openpower/isa/bitmanip.mdwn +++ b/openpower/isa/bitmanip.mdwn @@ -111,7 +111,7 @@ Z23-Form Pseudo-code: n <- (RB) - m <- sm + 1 + m <- ((0b0 || sm) + 1) RT <- (n[m:XLEN-1] || [0]*m) + (RA) Special Registers Altered: @@ -128,7 +128,7 @@ Z23-Form Pseudo-code: n <- ([0]*(XLEN/2)) || (RB)[XLEN/2:XLEN-1] - m <- sm + 1 + m <- ((0b0 || sm) + 1) RT <- (n[m:XLEN-1] || [0]*m) + (RA) Special Registers Altered: -- 2.30.2