From 46852e76835542d3a4699159b0e56f983edf6eeb Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 16 Jun 2021 17:20:51 +0100 Subject: [PATCH] reorder arguments to FPMULADD32 to match pseudocode --- src/openpower/decoder/helpers.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openpower/decoder/helpers.py b/src/openpower/decoder/helpers.py index 7188f6cc..8b849fb8 100644 --- a/src/openpower/decoder/helpers.py +++ b/src/openpower/decoder/helpers.py @@ -289,21 +289,21 @@ def FPMUL32(FRA, FRB): return cvt -def FPMULADD32(FRA, FRB, FRC, addsign, mulsign): +def FPMULADD32(FRA, FRC, FRB, addsign, mulsign): from openpower.decoder.isafunctions.double2single import DOUBLE2SINGLE #return FPMUL64(FRA, FRB) #FRA = DOUBLE(SINGLE(FRA)) #FRB = DOUBLE(SINGLE(FRB)) if addsign == 1: - result = float(FRC) + result = float(FRB) elif addsign == -1: - result = -float(FRC) + result = -float(FRB) elif addsign == 0: result = 0.0 if mulsign == 1: - result += float(FRA) * float(FRB) + result += float(FRA) * float(FRC) elif mulsign == -1: - result -= float(FRA) * float(FRB) + result -= float(FRA) * float(FRC) log ("FPMULADD32", FRA, FRB, FRC, float(FRA), float(FRB), float(FRC), result) -- 2.30.2