From b3588e5696c11ad427a9f359777a5eb4f5183903 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 11 Jul 2020 11:23:45 +0100 Subject: [PATCH] overflow test MSBs not LSBs --- openpower/isa/fixedarith.mdwn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openpower/isa/fixedarith.mdwn b/openpower/isa/fixedarith.mdwn index 75bf9faa0..1931c72ec 100644 --- a/openpower/isa/fixedarith.mdwn +++ b/openpower/isa/fixedarith.mdwn @@ -350,8 +350,8 @@ Pseudo-code: prod[0:63] <- MULS((RA)[32:63], (RB)[32:63]) RT <- prod - overflow <- ((prod[32:63] != 0x0000_0000) & - (prod[32:63] != 0xffff_ffff)) + overflow <- ((prod[0:31] != 0x0000_0000) & + (prod[0:31] != 0xffff_ffff)) Special Registers Altered: @@ -564,6 +564,8 @@ Pseudo-code: prod[0:127] <- MULS((RA), (RB)) RT <- prod[64:127] + overflow <- ((prod[0:63] != 0x0000_0000_0000_0000) & + (prod[0:63] != 0xffff_ffff_ffff_ffff)) Special Registers Altered: -- 2.30.2