Author: Manuel Jacob <[email protected]>
Branch: llvm-translation-backend
Changeset: r80830:0db1c150ce78
Date: 2015-11-22 12:29 +0100
http://bitbucket.org/pypy/pypy/changeset/0db1c150ce78/

Log:    Pass HALFWORD instead of Signed to llop.combine_ushort().

        The first argument to the combine_ushort() llop is "expected" to be
        of type HALFWORD. I say "expected" because e.g. the docstring of
        CombinedSymbolic (to which the operation is folded) says it combines
        a half-word and a word. The LLVM backend relies on that.

diff --git a/rpython/jit/backend/llsupport/descr.py 
b/rpython/jit/backend/llsupport/descr.py
--- a/rpython/jit/backend/llsupport/descr.py
+++ b/rpython/jit/backend/llsupport/descr.py
@@ -1,5 +1,6 @@
 import py
 from rpython.rtyper.lltypesystem import lltype, rffi, llmemory
+from rpython.rtyper.lltypesystem.llgroup import r_halfword
 from rpython.rtyper.lltypesystem.lloperation import llop
 from rpython.jit.backend.llsupport import symbolic, support
 from rpython.jit.metainterp.history import AbstractDescr, getkind, FLOAT, INT
@@ -34,7 +35,7 @@
 
 class SizeDescr(AbstractDescr):
     size = 0      # help translation
-    tid = llop.combine_ushort(lltype.Signed, 0, 0)
+    tid = llop.combine_ushort(lltype.Signed, r_halfword(0), 0)
     vtable = lltype.nullptr(rclass.OBJECT_VTABLE)
     immutable_flag = False
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to