[llvm-branch-commits] [SPARC][IAS] Add definitions for UA 2007 instructions (PR #138401)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun May 4 09:24:39 PDT 2025
================
@@ -19,3 +25,16 @@ def ALLCLEAN : InstSP<(outs), (ins), "allclean", []> {
let Inst{18-0} = 0;
}
} // Predicates = [HasUA2005]
+
+// UltraSPARC Architecture 2007 Instructions
+let Predicates = [HasUA2007] in {
+def FMADDS : FourOp<"fmadds", 0b110111, 0b0001, FPRegs>;
+def FMADDD : FourOp<"fmaddd", 0b110111, 0b0010, DFPRegs>;
+def FMSUBS : FourOp<"fmsubs", 0b110111, 0b0101, FPRegs>;
+def FMSUBD : FourOp<"fmsubd", 0b110111, 0b0110, DFPRegs>;
+
+def FNMADDS : FourOp<"fnmadds", 0b110111, 0b1101, FPRegs>;
+def FNMADDD : FourOp<"fnmaddd", 0b110111, 0b1110, DFPRegs>;
+def FNMSUBS : FourOp<"fnmsubs", 0b110111, 0b1001, FPRegs>;
+def FNMSUBD : FourOp<"fnmsubd", 0b110111, 0b1010, DFPRegs>;
+} // Predicates = [HasUA2007]
----------------
koachan wrote:
I basically go by how Sun/Oracle classifies the extensions, meaning that basically anything introduced in an ISA revision that isn't a VIS instruction go here.
In case of FMAf, it sits in the weird spot in that it's introduced between VIS2 and VIS3, and since Sun doesn't classify it as a VIS instruction, that's also the approach I took here.
This also goes for the one in the other PR, I suppose for crypto it makes sense to separate it out since it is tagged separately in the documentations, but for all others I think it's tidier if it's kept in this file?
https://github.com/llvm/llvm-project/pull/138401
More information about the llvm-branch-commits
mailing list