[compiler-rt] [compiler-rt] Implement __extendxftf2 and __trunctfxf2 for x86_64 (PR #66918)

Alexander Shaposhnikov via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 14:12:07 PDT 2023


================
@@ -39,6 +43,16 @@ static __inline int src_rep_t_clz(src_rep_t a) {
 #endif
 }
 
+#elif defined SRC_80
+typedef long double src_t;
+typedef __uint128_t src_rep_t;
+#define SRC_REP_C (__uint128_t)
+// sign bit, exponent and significand occupy the lower 80 bits.
+static const int srcBits = 80;
+// significand stores the integer bit.
+static const int srcSigBits = 64;
+static const int srcSigFracBits = 63;
----------------
alexander-shaposhnikov wrote:

@efriedma-quic - I'm working on giving it another try, but want to point out - that this would be essentially a rewrite of the existing template (so the changes will be quite invasive). Unfortunately, the current implementation of __extendXfYf2__ (even without any of my changes) is not that simple and doesn't use the model that you'd like to see.

https://github.com/llvm/llvm-project/pull/66918


More information about the llvm-commits mailing list