From 55163c2d1f5487e4d5213b256652527843ce002b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 31 Jul 2021 19:38:07 +0100 Subject: [PATCH] add SINGLE function to double2single, to replace manually-created version --- openpower/isafunctions/double2single.mdwn | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/openpower/isafunctions/double2single.mdwn b/openpower/isafunctions/double2single.mdwn index 31686e4d..28e48e29 100644 --- a/openpower/isafunctions/double2single.mdwn +++ b/openpower/isafunctions/double2single.mdwn @@ -139,3 +139,35 @@ Round to Single-Precision instruction. return result + + + def SINGLE(WORD): + exp <- [0] * 11 + frac <- [0] * 53 + sign <- 0b0 + # Normalized Operand + if (WORD[1:8] >u 0) & (WORD[1:8]