reallocate fptrans to fit all new ops
authorJacob Lifshay <programmerjake@gmail.com>
Sat, 10 Sep 2022 02:17:31 +0000 (19:17 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Sat, 10 Sep 2022 02:17:31 +0000 (19:17 -0700)
openpower/power_trans_ops.mdwn

index d7108107d8521600c875dd53d8d75170bc786880..7b5563c42afd48fce1e5ebb33e2a7db7e5d0e2fc 100644 (file)
@@ -10,27 +10,27 @@ Entries whose mnemonic ends in `s` are only in PO=59.
 Entries whose mnemonic doesn't end in `s` are only in PO=63.
 Entries whose mnemonic ends in `(s)` are in both PO=59 and PO=63.
 
-| XO LSB half &#x2192;<br> XO MSB half &#x2193; | 01100                                             | 01101                                             | 01110                                               | 01111                                              |
-|-----------------------------------------------|---------------------------------------------------|---------------------------------------------------|-----------------------------------------------------|----------------------------------------------------|
-| 10000                                         |                                                   | <small>`10000 01101`</small><br>fsinpi(s) (draft) | <small>`10000 01110`</small><br>fatan2pi(s) (draft) | <small>`10000 01111`</small><br>fasinpi(s) (draft) |
-| 10001                                         | <small>`10001 01100`</small><br>fcospi(s) (draft) | <small>`10001 01101`</small><br>ftanpi(s) (draft) | <small>`10001 01110`</small><br>facospi(s) (draft)  | <small>`10001 01111`</small><br>fatanpi(s) (draft) |
-| 10010                                         | <small>`10010 01100`</small><br>frsqrt(s) (draft) | <small>`10010 01101`</small><br>fsin(s) (draft)   | <small>`10010 01110`</small><br>fatan2(s) (draft)   | <small>`10010 01111`</small><br>fasin(s) (draft)   |
-| 10011                                         | <small>`10011 01100`</small><br>fcos(s) (draft)   | <small>`10011 01101`</small><br>ftan(s) (draft)   | <small>`10011 01110`</small><br>facos(s) (draft)    | <small>`10011 01111`</small><br>fatan(s) (draft)   |
-| 10100                                         | <small>`10100 01100`</small><br>frecip(s) (draft) | <small>`10100 01101`</small><br>fsinh(s) (draft)  | <small>`10100 01110`</small><br>fhypot(s) (draft)   | <small>`10100 01111`</small><br>fasinh(s) (draft)  |
-| 10101                                         | <small>`10101 01100`</small><br>fcosh(s) (draft)  | <small>`10101 01101`</small><br>ftanh(s) (draft)  | <small>`10101 01110`</small><br>facosh(s) (draft)   | <small>`10101 01111`</small><br>fatanh(s) (draft)  |
-| 10110                                         | <small>`10110 01100`</small><br>fcbrt(s) (draft)  |                                                   |                                                     |                                                    |
-| 10111                                         |                                                   |                                                   |                                                     |                                                    |
-
-| XO LSB half &#x2192;<br> XO MSB half &#x2193; | 01100                                              | 01101                                              | 01110                                               | 01111                                              |
-|-----------------------------------------------|----------------------------------------------------|----------------------------------------------------|-----------------------------------------------------|----------------------------------------------------|
-| 11000                                         | <small>`11000 01100`</small><br>fexp2m1(s) (draft) | <small>`11000 01101`</small><br>flog2p1(s) (draft) |                                                     |                                                    |
-| 11001                                         | <small>`11001 01100`</small><br>fexpm1(s) (draft)  | <small>`11001 01101`</small><br>flogp1(s) (draft)  | <small>`11001 01110`</small><br>(fctid)             | <small>`11001 01111`</small><br>(fctidz)           |
-| 11010                                         | <small>`11010 01100`</small><br>fexp10m1(s) (draft)| <small>`11010 01101`</small><br>flog10p1(s) (draft)| <small>`11010 01110`</small><br>(fcfid(s))          |                                                    |
-| 11011                                         | <small>`11011 01100`</small><br>fpown(s) (draft)   | <small>`11011 01101`</small><br>frootn(s) (draft)  |                                                     |                                                    |
-| 11100                                         | <small>`11100 01100`</small><br>fexp2(s) (draft)   | <small>`11100 01101`</small><br>flog2(s) (draft)   |                                                     |                                                    |
-| 11101                                         | <small>`11101 01100`</small><br>fexp(s) (draft)    | <small>`11101 01101`</small><br>flog(s) (draft)    | <small>`11101 01110`</small><br>(fctidu)            | <small>`11101 01111`</small><br>(fctiduz)          |
-| 11110                                         | <small>`11110 01100`</small><br>fexp10(s) (draft)  | <small>`11110 01101`</small><br>flog10(s) (draft)  | <small>`11110 01110`</small><br>(fcfidu(s))         |                                                    |
-| 11111                                         | <small>`11111 01100`</small><br>fpowr(s) (draft)   | <small>`11111 01101`</small><br>fpow(s) (draft)    |                                                     |                                                    |
+| XO LSB half &#x2192;<br> XO MSB half &#x2193; | 01100                                                | 01101                                             | 01110                                                | 01111                                              |
+|-----------------------------------------------|------------------------------------------------------|---------------------------------------------------|------------------------------------------------------|----------------------------------------------------|
+| 10000                                         | <small>`10000 01100`</small><br>fcbrt(s) (draft)     | <small>`10000 01101`</small><br>fsinpi(s) (draft) | <small>`10000 01110`</small><br>fatan2pi(s) (draft)  | <small>`10000 01111`</small><br>fasinpi(s) (draft) |
+| 10001                                         | <small>`10001 01100`</small><br>fcospi(s) (draft)    | <small>`10001 01101`</small><br>ftanpi(s) (draft) | <small>`10001 01110`</small><br>facospi(s) (draft)   | <small>`10001 01111`</small><br>fatanpi(s) (draft) |
+| 10010                                         | <small>`10010 01100`</small><br>frsqrt(s) (draft)    | <small>`10010 01101`</small><br>fsin(s) (draft)   | <small>`10010 01110`</small><br>fatan2(s) (draft)    | <small>`10010 01111`</small><br>fasin(s) (draft)   |
+| 10011                                         | <small>`10011 01100`</small><br>fcos(s) (draft)      | <small>`10011 01101`</small><br>ftan(s) (draft)   | <small>`10011 01110`</small><br>facos(s) (draft)     | <small>`10011 01111`</small><br>fatan(s) (draft)   |
+| 10100                                         | <small>`10100 01100`</small><br>frecip(s) (draft)    | <small>`10100 01101`</small><br>fsinh(s) (draft)  | <small>`10100 01110`</small><br>fhypot(s) (draft)    | <small>`10100 01111`</small><br>fasinh(s) (draft)  |
+| 10101                                         | <small>`10101 01100`</small><br>fcosh(s) (draft)     | <small>`10101 01101`</small><br>ftanh(s) (draft)  | <small>`10101 01110`</small><br>facosh(s) (draft)    | <small>`10101 01111`</small><br>fatanh(s) (draft)  |
+| 10110                                         | <small>`10110 01100`</small><br>fminnum08(s) (draft) | <small>`10110 01101`</small><br>fmin19(s) (draft) | <small>`10110 01110`</small><br>fminnum19(s) (draft) | <small>`10110 01111`</small><br>fminc(s) (draft)   |
+| 10111                                         | <small>`10111 01100`</small><br>fmaxnum08(s) (draft) | <small>`10111 01101`</small><br>fmax19(s) (draft) | <small>`10111 01110`</small><br>fmaxnum19(s) (draft) | <small>`10111 01111`</small><br>fmaxc(s) (draft)   |
+
+| XO LSB half &#x2192;<br> XO MSB half &#x2193; | 01100                                              | 01101                                              | 01110                                                   | 01111                                                   |
+|-----------------------------------------------|----------------------------------------------------|----------------------------------------------------|---------------------------------------------------------|---------------------------------------------------------|
+| 11000                                         | <small>`11000 01100`</small><br>fexp2m1(s) (draft) | <small>`11000 01101`</small><br>flog2p1(s) (draft) | <small>`11000 01110`</small><br>fminmagnum08(s) (draft) | <small>`11000 01111`</small><br>fmaxmagnum08(s) (draft) |
+| 11001                                         | <small>`11001 01100`</small><br>fexpm1(s) (draft)  | <small>`11001 01101`</small><br>flogp1(s) (draft)  | <small>`11001 01110`</small><br>(fctid)                 | <small>`11001 01111`</small><br>(fctidz)                |
+| 11010                                         | <small>`11010 01100`</small><br>fexp10m1(s) (draft)| <small>`11010 01101`</small><br>flog10p1(s) (draft)| <small>`11010 01110`</small><br>(fcfid(s))              | <small>`11010 01111`</small><br>fmod(s) (draft)         |
+| 11011                                         | <small>`11011 01100`</small><br>fpown(s) (draft)   | <small>`11011 01101`</small><br>frootn(s) (draft)  | <small>`11011 01110`</small><br>fminmag19(s) (draft)    | <small>`11011 01111`</small><br>fmaxmag19(s) (draft)    |
+| 11100                                         | <small>`11100 01100`</small><br>fexp2(s) (draft)   | <small>`11100 01101`</small><br>flog2(s) (draft)   | <small>`11100 01110`</small><br>fminmagnum19(s) (draft) | <small>`11100 01111`</small><br>fmaxmagnum19(s) (draft) |
+| 11101                                         | <small>`11101 01100`</small><br>fexp(s) (draft)    | <small>`11101 01101`</small><br>flog(s) (draft)    | <small>`11101 01110`</small><br>(fctidu)                | <small>`11101 01111`</small><br>(fctiduz)               |
+| 11110                                         | <small>`11110 01100`</small><br>fexp10(s) (draft)  | <small>`11110 01101`</small><br>flog10(s) (draft)  | <small>`11110 01110`</small><br>(fcfidu(s))             | <small>`11110 01111`</small><br>fremainder(s) (draft)   |
+| 11111                                         | <small>`11111 01100`</small><br>fpowr(s) (draft)   | <small>`11111 01101`</small><br>fpow(s) (draft)    | <small>`11111 01110`</small><br>fminmagc(s) (draft)     | <small>`11111 01111`</small><br>fmaxmagc(s) (draft)     |
 
 # DRAFT List of 2-arg opcodes
 
@@ -53,6 +53,24 @@ Recommended 10-bit XO assignments:
 | fpowr(s)        | x<sup>y</sup> (x >= 0)                  | 11111 01100     | FRB         |
 | frootn(s)       | <sup>n</sup>&#x221A;x (n &in; &#x2124;) | 11011 01101     | RB          |
 | fhypot(s)       | &#x221A;(x<sup>2</sup> + y<sup>2</sup>) | 10100 01110     | FRB         |
+| fminnum08(s)    | IEEE 754-2008 minNum                    | 10110 01100     | FRB         |
+| fmaxnum08(s)    | IEEE 754-2008 maxNum                    | 10111 01100     | FRB         |
+| fmin19(s)       | IEEE 754-2019 minimum                   | 10110 01101     | FRB         |
+| fmax19(s)       | IEEE 754-2019 maximum                   | 10111 01101     | FRB         |
+| fminnum19(s)    | IEEE 754-2019 minimumNumber             | 10110 01110     | FRB         |
+| fmaxnum19(s)    | IEEE 754-2019 maximumNumber             | 10111 01110     | FRB         |
+| fminc(s)        | C ternary-op minimum                    | 10110 01111     | FRB         |
+| fmaxc(s)        | C ternary-op maximum                    | 10111 01111     | FRB         |
+| fminmagnum08(s) | IEEE 754-2008 minNumMag                 | 11000 01110     | FRB         |
+| fmaxmagnum08(s) | IEEE 754-2008 maxNumMag                 | 11000 01111     | FRB         |
+| fminmag19(s)    | IEEE 754-2019 minimumMagnitude          | 11011 01110     | FRB         |
+| fmaxmag19(s)    | IEEE 754-2019 maximumMagnitude          | 11011 01111     | FRB         |
+| fminmagnum19(s) | IEEE 754-2019 minimumMagnitudeNumber    | 11100 01110     | FRB         |
+| fmaxmagnum19(s) | IEEE 754-2019 maximumMagnitudeNumber    | 11100 01111     | FRB         |
+| fminmagc(s)     | C ternary-op minimum magnitude          | 11111 01110     | FRB         |
+| fmaxmagc(s)     | C ternary-op maximum magnitude          | 11111 01111     | FRB         |
+| fmod(s)         | modulus                                 | 11010 01111     | FRB         |
+| fremainder(s)   | IEEE 754 remainder                      | 11110 01111     | FRB         |
 
 # DRAFT List of 1-arg transcendental opcodes
 
@@ -75,7 +93,7 @@ Recommended 10-bit XO assignments:
 | opcode     | Description              | Major 59 and 63 |
 |------------|--------------------------|-----------------|
 | frsqrt(s)  | 1 / &#x221A;x            | 10010 01100     |
-| fcbrt(s)   | &#x221B;x                | 10110 01100     |
+| fcbrt(s)   | &#x221B;x                | 10000 01100     |
 | frecip(s)  | 1 / x                    | 10100 01100     |
 | fexp2m1(s) | 2<sup>x</sup> - 1        | 11000 01100     |
 | flog2p1(s) | log<sub>2</sub> (x + 1)  | 11000 01101     |