[macruby-changes] [2158] MacRuby/branches/experimental/compiler.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Mon Aug 3 05:16:04 PDT 2009
Revision: 2158
http://trac.macosforge.org/projects/ruby/changeset/2158
Author: vincent.isambart at gmail.com
Date: 2009-08-03 05:16:03 -0700 (Mon, 03 Aug 2009)
Log Message:
-----------
floating point should now work on 32 bits
Modified Paths:
--------------
MacRuby/branches/experimental/compiler.cpp
Modified: MacRuby/branches/experimental/compiler.cpp
===================================================================
--- MacRuby/branches/experimental/compiler.cpp 2009-08-03 11:29:49 UTC (rev 2157)
+++ MacRuby/branches/experimental/compiler.cpp 2009-08-03 12:16:03 UTC (rev 2158)
@@ -1945,7 +1945,12 @@
bb = is_float_bb;
Value *is_float_val = BinaryOperator::CreateXor(val, threeVal, "", bb);
+#if __LP64__
is_float_val = new BitCastInst(is_float_val, Type::DoubleTy, "", bb);
+#else
+ is_float_val = new BitCastInst(is_float_val, Type::FloatTy, "", bb);
+ is_float_val = new FPExtInst(is_float_val, Type::DoubleTy, "", bb);
+#endif
BranchInst::Create(merge_bb, bb);
bb = isnt_float_bb;
@@ -2288,6 +2293,9 @@
if (!result_is_predicate) {
// Box the float.
+#if !__LP64__
+ flp_op_res = new FPTruncInst(flp_op_res, Type::FloatTy, "", bb);
+#endif
flp_op_res = new BitCastInst(flp_op_res, RubyObjTy, "", bb);
flp_op_res = BinaryOperator::CreateOr(flp_op_res, threeVal,
"", bb);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090803/df9ebe25/attachment.html>
More information about the macruby-changes
mailing list