From: Jacob Lifshay Date: Mon, 7 Aug 2023 23:04:00 +0000 (-0700) Subject: split out instructions from openpower/isa/fpmove.mdwn X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=659d026e0888e0e82759d8a1d19c4513a4091be9;p=openpower-isa.git split out instructions from openpower/isa/fpmove.mdwn --- diff --git a/openpower/isa/fpmove.mdwn b/openpower/isa/fpmove.mdwn index cc628294..3445eed1 100644 --- a/openpower/isa/fpmove.mdwn +++ b/openpower/isa/fpmove.mdwn @@ -2,135 +2,20 @@ -# Floating Move Register +[[!inline pagenames="openpower/isa/fpmove/fmr" raw="yes"]] -X-Form +[[!inline pagenames="openpower/isa/fpmove/fabs" raw="yes"]] -* fmr FRT,FRB (Rc=0) -* fmr. FRT,FRB (Rc=1) +[[!inline pagenames="openpower/isa/fpmove/fnabs" raw="yes"]] -Pseudo-code: +[[!inline pagenames="openpower/isa/fpmove/fneg" raw="yes"]] - FRT <- FRB[0:63] +[[!inline pagenames="openpower/isa/fpmove/fcpsgn" raw="yes"]] -Special Registers Altered: +[[!inline pagenames="openpower/isa/fpmove/mffpr" raw="yes"]] - CR1 (if Rc=1) +[[!inline pagenames="openpower/isa/fpmove/mffprs" raw="yes"]] -# Floating Absolute Value Register +[[!inline pagenames="openpower/isa/fpmove/mtfpr" raw="yes"]] -X-Form - -* fabs FRT,FRB (Rc=0) -* fabs. FRT,FRB (Rc=1) - -Pseudo-code: - - FRT <- 0b0 || FRB[1:63] - -Special Registers Altered: - - CR1 (if Rc=1) - -# Floating Negative Absolute Value Register - -X-Form - -* fnabs FRT,FRB (Rc=0) -* fnabs. FRT,FRB (Rc=1) - -Pseudo-code: - - FRT <- 0b1 || FRB[1:63] - -Special Registers Altered: - - CR1 (if Rc=1) - -# Floating Negate Register - -X-Form - -* fneg FRT,FRB (Rc=0) -* fneg. FRT,FRB (Rc=1) - -Pseudo-code: - - FRT <- ¬FRB[0] || FRB[1:63] - -Special Registers Altered: - - CR1 (if Rc=1) - -# Floating Copy Sign Register - -X-Form - -* fcpsgn FRT,FRA,FRB (Rc=0) -* fcpsgn. FRT,FRA,FRB (Rc=1) - -Pseudo-code: - - FRT <- FRA[0] || FRB[1:63] - -Special Registers Altered: - - CR1 (if Rc=1) - -# [DRAFT] Floating Move To GPR - -X-Form - -* mffpr RT,FRB (Rc=0) -* mffpr. RT,FRB (Rc=1) - -Pseudo-code: - - RT <- (FRB) - -Special Registers Altered: - - CR0 (if Rc=1) - -# [DRAFT] Floating Move To GPR Single - -X-Form - -* mffprs RT,FRB (Rc=0) -* mffprs. RT,FRB (Rc=1) - -Pseudo-code: - - RT <- [0] * (XLEN/2) || SINGLE((FRB)) # SINGLE since that's what stfs uses - -Special Registers Altered: - - CR0 (if Rc=1) - -# [DRAFT] Floating Move From GPR - -X-Form - -* mtfpr FRT,RB - -Pseudo-code: - - FRT <- (RB) - -Special Registers Altered: - - None - -# [DRAFT] Floating Move From GPR Single - -X-Form - -* mtfprs FRT,RB - -Pseudo-code: - - FRT <- DOUBLE((RB)[XLEN/2:XLEN-1]) # DOUBLE since that's what lfs uses - -Special Registers Altered: - - None +[[!inline pagenames="openpower/isa/fpmove/mtfprs" raw="yes"]] diff --git a/openpower/isa/fpmove/fabs.mdwn b/openpower/isa/fpmove/fabs.mdwn new file mode 100644 index 00000000..6849363c --- /dev/null +++ b/openpower/isa/fpmove/fabs.mdwn @@ -0,0 +1,14 @@ +# Floating Absolute Value Register + +X-Form + +* fabs FRT,FRB (Rc=0) +* fabs. FRT,FRB (Rc=1) + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/fabs_code" raw="yes"]] + +Special Registers Altered: + + CR1 (if Rc=1) diff --git a/openpower/isa/fpmove/fabs_code.mdwn b/openpower/isa/fpmove/fabs_code.mdwn new file mode 100644 index 00000000..99fa3dec --- /dev/null +++ b/openpower/isa/fpmove/fabs_code.mdwn @@ -0,0 +1 @@ + FRT <- 0b0 || FRB[1:63] diff --git a/openpower/isa/fpmove/fcpsgn.mdwn b/openpower/isa/fpmove/fcpsgn.mdwn new file mode 100644 index 00000000..6acf9952 --- /dev/null +++ b/openpower/isa/fpmove/fcpsgn.mdwn @@ -0,0 +1,14 @@ +# Floating Copy Sign Register + +X-Form + +* fcpsgn FRT,FRA,FRB (Rc=0) +* fcpsgn. FRT,FRA,FRB (Rc=1) + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/fcpsgn_code" raw="yes"]] + +Special Registers Altered: + + CR1 (if Rc=1) diff --git a/openpower/isa/fpmove/fcpsgn_code.mdwn b/openpower/isa/fpmove/fcpsgn_code.mdwn new file mode 100644 index 00000000..fabb4c18 --- /dev/null +++ b/openpower/isa/fpmove/fcpsgn_code.mdwn @@ -0,0 +1 @@ + FRT <- FRA[0] || FRB[1:63] diff --git a/openpower/isa/fpmove/fmr.mdwn b/openpower/isa/fpmove/fmr.mdwn new file mode 100644 index 00000000..8c0487ac --- /dev/null +++ b/openpower/isa/fpmove/fmr.mdwn @@ -0,0 +1,14 @@ +# Floating Move Register + +X-Form + +* fmr FRT,FRB (Rc=0) +* fmr. FRT,FRB (Rc=1) + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/fmr_code" raw="yes"]] + +Special Registers Altered: + + CR1 (if Rc=1) diff --git a/openpower/isa/fpmove/fmr_code.mdwn b/openpower/isa/fpmove/fmr_code.mdwn new file mode 100644 index 00000000..6a67e8bd --- /dev/null +++ b/openpower/isa/fpmove/fmr_code.mdwn @@ -0,0 +1 @@ + FRT <- FRB[0:63] diff --git a/openpower/isa/fpmove/fnabs.mdwn b/openpower/isa/fpmove/fnabs.mdwn new file mode 100644 index 00000000..ac28a394 --- /dev/null +++ b/openpower/isa/fpmove/fnabs.mdwn @@ -0,0 +1,14 @@ +# Floating Negative Absolute Value Register + +X-Form + +* fnabs FRT,FRB (Rc=0) +* fnabs. FRT,FRB (Rc=1) + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/fnabs_code" raw="yes"]] + +Special Registers Altered: + + CR1 (if Rc=1) diff --git a/openpower/isa/fpmove/fnabs_code.mdwn b/openpower/isa/fpmove/fnabs_code.mdwn new file mode 100644 index 00000000..1a73e7c3 --- /dev/null +++ b/openpower/isa/fpmove/fnabs_code.mdwn @@ -0,0 +1 @@ + FRT <- 0b1 || FRB[1:63] diff --git a/openpower/isa/fpmove/fneg.mdwn b/openpower/isa/fpmove/fneg.mdwn new file mode 100644 index 00000000..2d9724f8 --- /dev/null +++ b/openpower/isa/fpmove/fneg.mdwn @@ -0,0 +1,14 @@ +# Floating Negate Register + +X-Form + +* fneg FRT,FRB (Rc=0) +* fneg. FRT,FRB (Rc=1) + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/fneg_code" raw="yes"]] + +Special Registers Altered: + + CR1 (if Rc=1) diff --git a/openpower/isa/fpmove/fneg_code.mdwn b/openpower/isa/fpmove/fneg_code.mdwn new file mode 100644 index 00000000..448020af --- /dev/null +++ b/openpower/isa/fpmove/fneg_code.mdwn @@ -0,0 +1 @@ + FRT <- ¬FRB[0] || FRB[1:63] diff --git a/openpower/isa/fpmove/mffpr.mdwn b/openpower/isa/fpmove/mffpr.mdwn new file mode 100644 index 00000000..373456f7 --- /dev/null +++ b/openpower/isa/fpmove/mffpr.mdwn @@ -0,0 +1,14 @@ +# [DRAFT] Floating Move To GPR + +X-Form + +* mffpr RT,FRB (Rc=0) +* mffpr. RT,FRB (Rc=1) + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/mffpr_code" raw="yes"]] + +Special Registers Altered: + + CR0 (if Rc=1) diff --git a/openpower/isa/fpmove/mffpr_code.mdwn b/openpower/isa/fpmove/mffpr_code.mdwn new file mode 100644 index 00000000..c15a8eb5 --- /dev/null +++ b/openpower/isa/fpmove/mffpr_code.mdwn @@ -0,0 +1 @@ + RT <- (FRB) diff --git a/openpower/isa/fpmove/mffprs.mdwn b/openpower/isa/fpmove/mffprs.mdwn new file mode 100644 index 00000000..1f853c91 --- /dev/null +++ b/openpower/isa/fpmove/mffprs.mdwn @@ -0,0 +1,14 @@ +# [DRAFT] Floating Move To GPR Single + +X-Form + +* mffprs RT,FRB (Rc=0) +* mffprs. RT,FRB (Rc=1) + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/mffprs_code" raw="yes"]] + +Special Registers Altered: + + CR0 (if Rc=1) diff --git a/openpower/isa/fpmove/mffprs_code.mdwn b/openpower/isa/fpmove/mffprs_code.mdwn new file mode 100644 index 00000000..80413f45 --- /dev/null +++ b/openpower/isa/fpmove/mffprs_code.mdwn @@ -0,0 +1 @@ + RT <- [0] * (XLEN/2) || SINGLE((FRB)) # SINGLE since that's what stfs uses diff --git a/openpower/isa/fpmove/mtfpr.mdwn b/openpower/isa/fpmove/mtfpr.mdwn new file mode 100644 index 00000000..fd59be70 --- /dev/null +++ b/openpower/isa/fpmove/mtfpr.mdwn @@ -0,0 +1,13 @@ +# [DRAFT] Floating Move From GPR + +X-Form + +* mtfpr FRT,RB + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/mtfpr_code" raw="yes"]] + +Special Registers Altered: + + None diff --git a/openpower/isa/fpmove/mtfpr_code.mdwn b/openpower/isa/fpmove/mtfpr_code.mdwn new file mode 100644 index 00000000..d7341903 --- /dev/null +++ b/openpower/isa/fpmove/mtfpr_code.mdwn @@ -0,0 +1 @@ + FRT <- (RB) diff --git a/openpower/isa/fpmove/mtfprs.mdwn b/openpower/isa/fpmove/mtfprs.mdwn new file mode 100644 index 00000000..f53a2811 --- /dev/null +++ b/openpower/isa/fpmove/mtfprs.mdwn @@ -0,0 +1,13 @@ +# [DRAFT] Floating Move From GPR Single + +X-Form + +* mtfprs FRT,RB + +Pseudo-code: + +[[!inline pagenames="openpower/isa/fpmove/mtfprs_code" raw="yes"]] + +Special Registers Altered: + + None diff --git a/openpower/isa/fpmove/mtfprs_code.mdwn b/openpower/isa/fpmove/mtfprs_code.mdwn new file mode 100644 index 00000000..55c29e68 --- /dev/null +++ b/openpower/isa/fpmove/mtfprs_code.mdwn @@ -0,0 +1 @@ + FRT <- DOUBLE((RB)[XLEN/2:XLEN-1]) # DOUBLE since that's what lfs uses