[llvm-commits] [PATCH][Review request] IEEE quad software emulation library call

Eli Friedman eli.friedman at gmail.com
Wed Nov 9 13:42:28 PST 2011


On Wed, Nov 9, 2011 at 1:19 PM, Hatanaka, Akira <ahatanaka at mips.com> wrote:
> This patch adds code needed for expanding basic IEEE quad operations (add,
> sub, etc.) into software emulation library calls.

-
RTLIB::FLOOR_F80,RTLIB::FLOOR_PPCF128),
+                                         RTLIB::FLOOR_F80,RTLIB::FLOOR_F128,
+                                         RTLIB::FLOOR_PPCF128),

Whitespace, here and a couple other places nearby.

+  // f128 type is really two f64's.
+  if (!isTypeLegal(MVT::f128)) {
+    NumRegistersForVT[MVT::f128] = 2*NumRegistersForVT[MVT::f64];
+    RegisterTypeForVT[MVT::f128] = MVT::f64;
+    TransformToType[MVT::f128] = MVT::f64;
+    ValueTypeActions.setTypeAction(MVT::f128, TypeExpandFloat);
+  }

This looks wrong; I'm pretty sure we should be softening these (to
i128), not splitting into two f64's.

What else, if anything, is actually needed to make an f128 add work?

-Eli



More information about the llvm-commits mailing list