From: Luke Kenneth Casson Leighton Date: Wed, 15 Jul 2020 14:54:27 +0000 (+0100) Subject: overflow detection in mullw and mulld off-by-one X-Git-Tag: convert-csv-opcode-to-binary~2342 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9ec3591cba034c799df52ffbc3f1dda423bc4f98;p=libreriscv.git overflow detection in mullw and mulld off-by-one --- diff --git a/openpower/isa/fixedarith.mdwn b/openpower/isa/fixedarith.mdwn index 1931c72ec..5f556607e 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[0:31] != 0x0000_0000) & - (prod[0:31] != 0xffff_ffff)) + overflow <- ((prod[0:32] != 0x0_0000_0000) & + (prod[0:32] != 0x1_ffff_ffff)) Special Registers Altered: @@ -564,8 +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)) + overflow <- ((prod[0:64] != 0x0_0000_0000_0000_0000) & + (prod[0:64] != 0x1_ffff_ffff_ffff_ffff)) Special Registers Altered: