From 8bd302d4376ce7859f617cc6fc528e4e454811aa Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Mon, 7 Aug 2023 16:04:00 -0700 Subject: [PATCH] split out instructions from openpower/isa/av.mdwn --- openpower/isa/av.mdwn | 258 ++--------------------------- openpower/isa/av/absdacs.mdwn | 14 ++ openpower/isa/av/absdacs_code.mdwn | 3 + openpower/isa/av/absdacu.mdwn | 14 ++ openpower/isa/av/absdacu_code.mdwn | 3 + openpower/isa/av/absds.mdwn | 14 ++ openpower/isa/av/absds_code.mdwn | 2 + openpower/isa/av/absdu.mdwn | 14 ++ openpower/isa/av/absdu_code.mdwn | 2 + openpower/isa/av/avgadd.mdwn | 14 ++ openpower/isa/av/avgadd_code.mdwn | 6 + openpower/isa/av/bmask.mdwn | 13 ++ openpower/isa/av/bmask_code.mdwn | 23 +++ openpower/isa/av/cprop.mdwn | 14 ++ openpower/isa/av/cprop_code.mdwn | 4 + openpower/isa/av/fishmv.mdwn | 13 ++ openpower/isa/av/fishmv_code.mdwn | 3 + openpower/isa/av/fmvis.mdwn | 13 ++ openpower/isa/av/fmvis_code.mdwn | 3 + openpower/isa/av/minmax..mdwn | 13 ++ openpower/isa/av/minmax._code.mdwn | 30 ++++ openpower/isa/av/minmax.mdwn | 13 ++ openpower/isa/av/minmax_code.mdwn | 30 ++++ 23 files changed, 269 insertions(+), 247 deletions(-) create mode 100644 openpower/isa/av/absdacs.mdwn create mode 100644 openpower/isa/av/absdacs_code.mdwn create mode 100644 openpower/isa/av/absdacu.mdwn create mode 100644 openpower/isa/av/absdacu_code.mdwn create mode 100644 openpower/isa/av/absds.mdwn create mode 100644 openpower/isa/av/absds_code.mdwn create mode 100644 openpower/isa/av/absdu.mdwn create mode 100644 openpower/isa/av/absdu_code.mdwn create mode 100644 openpower/isa/av/avgadd.mdwn create mode 100644 openpower/isa/av/avgadd_code.mdwn create mode 100644 openpower/isa/av/bmask.mdwn create mode 100644 openpower/isa/av/bmask_code.mdwn create mode 100644 openpower/isa/av/cprop.mdwn create mode 100644 openpower/isa/av/cprop_code.mdwn create mode 100644 openpower/isa/av/fishmv.mdwn create mode 100644 openpower/isa/av/fishmv_code.mdwn create mode 100644 openpower/isa/av/fmvis.mdwn create mode 100644 openpower/isa/av/fmvis_code.mdwn create mode 100644 openpower/isa/av/minmax..mdwn create mode 100644 openpower/isa/av/minmax._code.mdwn create mode 100644 openpower/isa/av/minmax.mdwn create mode 100644 openpower/isa/av/minmax_code.mdwn diff --git a/openpower/isa/av.mdwn b/openpower/isa/av.mdwn index 94c3e1c8..22fac067 100644 --- a/openpower/isa/av.mdwn +++ b/openpower/isa/av.mdwn @@ -2,260 +2,24 @@ -# DRAFT Minimum/Maximum (Rc=1) +[[!inline pagenames="openpower/isa/av/minmax." raw="yes"]] -MM-Form +[[!inline pagenames="openpower/isa/av/minmax" raw="yes"]] -* minmax. RT,RA,RB,MMM (Rc=1) +[[!inline pagenames="openpower/isa/av/avgadd" raw="yes"]] -Pseudo-code: +[[!inline pagenames="openpower/isa/av/absds" raw="yes"]] - a <- (RA|0) - b <- (RB) - if MMM[0] then # word mode - # shift left by XLEN/2 to make the dword comparison - # do word comparison of the original inputs - a <- a[XLEN/2:XLEN-1] || [0] * XLEN/2 - b <- b[XLEN/2:XLEN-1] || [0] * XLEN/2 - if MMM[1] then # signed mode - # invert sign bits to make the unsigned comparison - # do signed comparison of the original inputs - a[0] <- ¬a[0] - b[0] <- ¬b[0] - # if Rc = 1 then store the result of comparing a and b to CR0 - if Rc = 1 then - if a u b then - CR0 <- 0b010 || XER[SO] - if MMM[2] then # max mode - # swap a and b to make the less than comparison do - # greater than comparison of the original inputs - t <- a - a <- b - b <- t - # store the entire selected source (even in word mode) - # if Rc = 1 then store the result of comparing a and b to CR0 - if a u b then - # CR0 <- 0b010 || XER[SO] - if MMM[2] then # max mode - # swap a and b to make the less than comparison do - # greater than comparison of the original inputs - t <- a - a <- b - b <- t - # store the entire selected source (even in word mode) - # if Rc = 1 then store the result of comparing a and b to CR0 - if a u b then + CR0 <- 0b010 || XER[SO] + if MMM[2] then # max mode + # swap a and b to make the less than comparison do + # greater than comparison of the original inputs + t <- a + a <- b + b <- t + # store the entire selected source (even in word mode) + # if Rc = 1 then store the result of comparing a and b to CR0 + if a u b then + # CR0 <- 0b010 || XER[SO] + if MMM[2] then # max mode + # swap a and b to make the less than comparison do + # greater than comparison of the original inputs + t <- a + a <- b + b <- t + # store the entire selected source (even in word mode) + # if Rc = 1 then store the result of comparing a and b to CR0 + if a