we need a list of the full suite of Scalar instructions to be proposed to the OPF ISA WG, along with a list of priorities. this milestone covers the initial research work, including generating a CSV-to-markdown-table generator program that can create different priority listings: by RFC, by EXT2xx, by EXT0xx, etc.
made a start on a CSV file https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=2c5bdcca43b4a91c6fcaf294da7475465cfabef3 columns (so far): instruction, rfc, priority, vectorisable, prefixable, primary, page
https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=2af32465bfd9db84980891ebeb71ac0275d58a4c added transcendentals, made a start on the priorities, based on the page https://libre-soc.org/openpower/transcendentals/
please add a comment to the csv defining if 100 priority is really high priority must be done first, or really low priority done last.
(In reply to Jacob Lifshay from comment #3) > please add a comment to the csv defining if 100 priority is really high > priority must be done first, or really low priority done last. nm, misread the columns. high/med/low is used for priority.
please do define "prefixable", does that mean it can go in ext2xx or does that mean it can have a svp64 prefix or something else?
(In reply to Jacob Lifshay from comment #5) > please do define "prefixable", does that mean it can go in ext2xx or does > that mean it can have a svp64 prefix or something else? i've been meaning to put some definitions in, "prefixable" refers to PO1 and i've changed the heading column to reflect that. related: https://libre-soc.org/openpower/sv/po9_encoding/
turns out the fpow instruction isn't super high priority for 3D, the following is sufficient: pow(b, x) = exp2(x * log2(b)) I also did some misc cleanups and implemented recursive [[!inline]] support (which it turns out we need since ls010 uses svp64/appendix which in turn uses preduce.py) https://git.libre-soc.org/?p=libreriscv.git;a=shortlog;h=789d7892bb20f292c31394b7997e5dd9124a06c6 commit 789d7892bb20f292c31394b7997e5dd9124a06c6 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 23:09:02 2023 -0700 adjust priorities -- all inverse trig functions can be expressed in terms of atan2[pi] commit d5f837fe00e4f3c9efaeca49fdbb29a0c11fe0df Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 23:07:08 2023 -0700 add notes on pow's use in 3D graphics commit 9b6f2fbcd321a48d31d89942c64c9f6ff9c4e9c3 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 23:06:17 2023 -0700 assign fmod/fremainder to ZftransExt -- seems good enough to me commit a67c976f69b56b46bd0ff9849f9a691b31e4f4bf Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 23:04:47 2023 -0700 add fmin/max and mark as high priority commit c17c44a5f18d573d7cd2f988c6fcb16a3f7df9af Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 23:02:22 2023 -0700 mark integer min/max as high priority since vector reduce min/max is common. commit 260dff6846d231f8249b85fb933d59cee5f1bd71 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 22:11:42 2023 -0700 clean up makefile and support recursive [[!inline]] commit 930a3f161b826374ceae5a0683fe799e33044995 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 22:11:30 2023 -0700 spelling fix commit 1e465da52acc21f3c30994aa1d4eaa878c645a3a Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 22:10:04 2023 -0700 add .gitignore for new intermediate files commit b51d4b382d733df660ddc875085546c5f0b876c9 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Mon Apr 10 21:20:06 2023 -0700 fix spelling and formatting
(In reply to Jacob Lifshay from comment #7) > turns out the fpow instruction isn't super high priority for 3D, the > following is sufficient: > pow(b, x) = exp2(x * log2(b)) ... and bit-level accuracy isn't absolute (or is it? what's the Khronos Group ULP for fpow?) > I also did some misc cleanups and implemented recursive [[!inline]] support > (which it turns out we need since ls010 uses svp64/appendix which in turn > uses preduce.py) briilliant
(In reply to Luke Kenneth Casson Leighton from comment #8) > (In reply to Jacob Lifshay from comment #7) > > turns out the fpow instruction isn't super high priority for 3D, the > > following is sufficient: > > pow(b, x) = exp2(x * log2(b)) > > ... and bit-level accuracy isn't absolute (or is it? what's the > Khronos Group ULP for fpow?) the spec literally says: the accuracy is "Inherited from exp2(y × log2(x))"
https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=0be9acb5598025ce680f2f2cd2b7c37be3f9e495 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Thu Apr 20 18:37:09 2023 -0700 fix int/fp mv/cvt in optable.csv https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=8ed4acf7c47737f5536486930c7ddf4831d8c9d8 Author: Jacob Lifshay <programmerjake@gmail.com> Date: Thu Apr 20 18:26:31 2023 -0700 adjust optable.csv -- [f]minmax[s][.] need 6 XO bits and merge all the fminmax variants
initial version completed