From a0e4e3494219dab44bbcc5fd7627dc9a72cd69b3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 14 May 2021 16:49:24 +0100 Subject: [PATCH] add fpload.mdwn for FP simulation --- openpower/isa/fpload.mdwn | 169 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 openpower/isa/fpload.mdwn diff --git a/openpower/isa/fpload.mdwn b/openpower/isa/fpload.mdwn new file mode 100644 index 00000000..0fa97aa6 --- /dev/null +++ b/openpower/isa/fpload.mdwn @@ -0,0 +1,169 @@ + + + + +# Load Floating-Point Single + +D-Form + +* lfs FRT,D(RA) + +Pseudo-code: + + if RA = 0 then b <- 0 + else b <- (RA) + EA <- b + EXTS(D) + FRT <- DOUBLE(MEM(EA, 4)) + +Special Registers Altered: + + None + +# Load Floating-Point Single Indexed + +X-Form + +* lfsx FRT,RA,RB + +Pseudo-code: + + if RA = 0 then b <- 0 + else b <- (RA) + EA <- b + (RB) + FRT <- DOUBLE(MEM(EA, 4)) + +Special Registers Altered: + + None + +# Load Floating-Point Single with Update + +D-Form + +* lfsu FRT,D(RA) + +Pseudo-code: + + EA <- (RA) + EXTS(D) + FRT <- DOUBLE(MEM(EA, 4)) + RA <- EA + +Special Registers Altered: + + None + +# Load Floating-Point Single with Update Indexed + +X-Form + +* lfsux FRT,RA,RB + +Pseudo-code: + + EA <- (RA) + (RB) + FRT <- DOUBLE(MEM(EA, 4)) + RA <- EA + +Special Registers Altered: + + None + +# Load Floating-Point Double + +D-Form + +* lfd FRT,D(RA) + +Pseudo-code: + + if RA = 0 then b <- 0 + else b <- (RA) + EA <- b + EXTS(D) + FRT <- MEM(EA, 8) + +Special Registers Altered: + + None + +# Load Floating-Point Double Indexed + +X-Form + +* lfdx FRT,RA,RB + +Pseudo-code: + + if RA = 0 then b <- 0 + else b <- (RA) + EA <- b + (RB) + FRT <- MEM(EA, 8) + +Special Registers Altered: + + None + +# Load Floating-Point Double with Update + +D-Form + +* lfdu FRT,D(RA) + +Pseudo-code: + + EA <- (RA) + EXTS(D) + FRT <- MEM(EA, 8) + RA <- EA + +Special Registers Altered: + + None + +# Load Floating-Point Double with Update Indexed + +X-Form + +* lfdux FRT,RA,RB + +Pseudo-code: + + EA <- (RA) + (RB) + FRT <- MEM(EA, 8) + RA <- EA + +Special Registers Altered: + + None + +# Load Floating-Point as Integer Word Algebraic Indexed + +X-Form + +* lfiwax FRT,RA,RB + +Pseudo-code: + + if RA = 0 then b <- 0 + else b <- (RA) + EA <- b + (RB) + FRT <- EXTS(MEM(EA, 4)) + +Special Registers Altered: + + None + +# Load Floating-Point as Integer Word Zero Indexed + +X-Form + +* lfiwax FRT,RA,RB + +Pseudo-code: + + if RA = 0 then b <- 0 + else b <- (RA) + EA <- b + (RB) + FRT <- [0]*32 || MEM(EA, 4) + +Special Registers Altered: + + None -- 2.30.2