Author: Armin Rigo <ar...@tunes.org>
Branch: optresult-unroll
Changeset: r79474:b0cde222530f
Date: 2015-09-06 12:37 +0200
http://bitbucket.org/pypy/pypy/changeset/b0cde222530f/

Log:    32bit: fix fix fix

diff --git a/rpython/jit/backend/test/runner_test.py 
b/rpython/jit/backend/test/runner_test.py
--- a/rpython/jit/backend/test/runner_test.py
+++ b/rpython/jit/backend/test/runner_test.py
@@ -1664,6 +1664,8 @@
                     expectedtype = 'int'
                 got = self.execute_operation(opnum, inputargs,
                                              expectedtype)
+                if not isinstance(expected, bool):
+                    got = longlong.getrealfloat(got)
                 if isnan(expected):
                     ok = isnan(got)
                 elif isinf(expected):
@@ -1765,9 +1767,9 @@
             wait_a_bit()
             res2 = self.execute_operation(rop.CALL_I, [funcbox], 'int', 
calldescr)
         else:
-            res1 = self.execute_operation(rop.CALL_I, 
[funcbox],'float',calldescr)
+            res1 = self.execute_operation(rop.CALL_F, 
[funcbox],'float',calldescr)
             wait_a_bit()
-            res2 = self.execute_operation(rop.CALL_I, 
[funcbox],'float',calldescr)
+            res2 = self.execute_operation(rop.CALL_F, 
[funcbox],'float',calldescr)
         assert res1 < res2 < res1 + 2**32
 
 
@@ -4008,9 +4010,10 @@
         calldescr = self.cpu.calldescrof(FUNC, FUNC.ARGS, FUNC.RESULT,
                                          EffectInfo.MOST_GENERAL)
         funcbox = self.get_funcbox(self.cpu, f)
-        res = self.execute_operation(rop.CALL, [funcbox, BoxFloat(value)],
+        res = self.execute_operation(rop.CALL_F,
+                                     [funcbox, InputArgFloat(value)],
                                      'float', descr=calldescr)
-        assert res.getfloatstorage() == expected
+        assert res == expected
 
     def test_singlefloat_result_of_call_direct(self):
         if not self.cpu.supports_singlefloats:
diff --git a/rpython/jit/backend/x86/test/test_runner.py 
b/rpython/jit/backend/x86/test/test_runner.py
--- a/rpython/jit/backend/x86/test/test_runner.py
+++ b/rpython/jit/backend/x86/test/test_runner.py
@@ -481,10 +481,6 @@
             funcbox = ConstInt(rawstart)
             i1 = InputArgInt()
             i2 = InputArgInt()
-            i3 = InputArgInt()
-            i4 = InputArgInt()
-            i5 = InputArgInt()
-            i6 = InputArgInt()
             c = ConstInt(-1)
             faildescr = BasicFailDescr(1)
             cz = ConstInt(0)
@@ -493,29 +489,35 @@
             # then we are going to get our stack emptied unexpectedly by
             # several repeated calls
             ops = [
-            ResOperation(rop.CALL_RELEASE_GIL,
+            ResOperation(rop.CALL_RELEASE_GIL_I,
                          [cz, funcbox, i1, c, c, c, c, c, c, c, c, i2],
-                         i3, descr=calldescr),
-            ResOperation(rop.GUARD_NOT_FORCED, [], None, descr=faildescr),
+                         descr=calldescr),
+            ResOperation(rop.GUARD_NOT_FORCED, [], descr=faildescr),
 
-            ResOperation(rop.CALL_RELEASE_GIL,
+            ResOperation(rop.CALL_RELEASE_GIL_I,
                          [cz, funcbox, i1, c, c, c, c, c, c, c, c, i2],
-                         i4, descr=calldescr),
-            ResOperation(rop.GUARD_NOT_FORCED, [], None, descr=faildescr),
+                         descr=calldescr),
+            ResOperation(rop.GUARD_NOT_FORCED, [], descr=faildescr),
 
-            ResOperation(rop.CALL_RELEASE_GIL,
+            ResOperation(rop.CALL_RELEASE_GIL_I,
                          [cz, funcbox, i1, c, c, c, c, c, c, c, c, i2],
-                         i5, descr=calldescr),
-            ResOperation(rop.GUARD_NOT_FORCED, [], None, descr=faildescr),
+                         descr=calldescr),
+            ResOperation(rop.GUARD_NOT_FORCED, [], descr=faildescr),
 
-            ResOperation(rop.CALL_RELEASE_GIL,
+            ResOperation(rop.CALL_RELEASE_GIL_I,
                          [cz, funcbox, i1, c, c, c, c, c, c, c, c, i2],
-                         i6, descr=calldescr),
-            ResOperation(rop.GUARD_NOT_FORCED, [], None, descr=faildescr),
+                         descr=calldescr),
+            ResOperation(rop.GUARD_NOT_FORCED, [], descr=faildescr),
+            ]
+            i3 = ops[0]
+            i4 = ops[2]
+            i5 = ops[4]
+            i6 = ops[6]
 
-            ResOperation(rop.GUARD_FALSE, [i3], None,
+            ops += [
+            ResOperation(rop.GUARD_FALSE, [i3],
                          descr=BasicFailDescr(0)),
-            ResOperation(rop.FINISH, [], None,
+            ResOperation(rop.FINISH, [],
                          descr=BasicFinalDescr(1))
             ]
             ops[-2].setfailargs([i3, i4, i5, i6])
diff --git a/rpython/jit/metainterp/resoperation.py 
b/rpython/jit/metainterp/resoperation.py
--- a/rpython/jit/metainterp/resoperation.py
+++ b/rpython/jit/metainterp/resoperation.py
@@ -706,7 +706,7 @@
     'CAST_INT_TO_FLOAT/1/f',          # need some messy code in the backend
     'CAST_FLOAT_TO_SINGLEFLOAT/1/i',
     'CAST_SINGLEFLOAT_TO_FLOAT/1/f',
-    'CONVERT_FLOAT_BYTES_TO_LONGLONG/1/i',
+    'CONVERT_FLOAT_BYTES_TO_LONGLONG/1/' + ('i' if longlong.is_64_bit else 
'f'),
     'CONVERT_LONGLONG_BYTES_TO_FLOAT/1/f',
     #
     'INT_LT/2b/i',
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to