[pypy-svn] r22438 - in pypy/dist/pypy/translator/llvm: . module
ericvrp at codespeak.net
ericvrp at codespeak.net
Thu Jan 19 14:00:03 CET 2006
Author: ericvrp
Date: Thu Jan 19 13:59:54 2006
New Revision: 22438
Modified:
pypy/dist/pypy/translator/llvm/extfuncnode.py
pypy/dist/pypy/translator/llvm/module/support.py
pypy/dist/pypy/translator/llvm/opwriter.py
Log:
small fixes for ia64
Modified: pypy/dist/pypy/translator/llvm/extfuncnode.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/extfuncnode.py (original)
+++ pypy/dist/pypy/translator/llvm/extfuncnode.py Thu Jan 19 13:59:54 2006
@@ -14,6 +14,7 @@
"%LL_os_isatty" : ExtFuncSig("int", None),
"%LL_stack_too_big" : ExtFuncSig("int", None),
"%LL_os_lseek" : ExtFuncSig("int", None),
+ "%LL_os_write" : ExtFuncSig(None, ["int", None]),
"%LL_thread_acquirelock" : ExtFuncSig("int", [None, "int"]),
"%LL_thread_start" : ExtFuncSig(None, ["sbyte*", "sbyte*"]),
}
Modified: pypy/dist/pypy/translator/llvm/module/support.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/module/support.py (original)
+++ pypy/dist/pypy/translator/llvm/module/support.py Thu Jan 19 13:59:54 2006
@@ -41,16 +41,16 @@
ret %RPyString* %rpy
}
-internal fastcc int %pypyop_int_abs(int %x) {
+internal fastcc WORD %pypyop_int_abs(WORD %x) {
block0:
- %cond1 = setge int %x, 0
+ %cond1 = setge WORD %x, 0
br bool %cond1, label %return_block, label %block1
block1:
- %x2 = sub int 0, %x
+ %x2 = sub WORD 0, %x
br label %return_block
return_block:
- %result = phi int [%x, %block0], [%x2, %block1]
- ret int %result
+ %result = phi WORD [%x, %block0], [%x2, %block1]
+ ret WORD %result
}
internal fastcc long %pypyop_llong_abs(long %x) {
Modified: pypy/dist/pypy/translator/llvm/opwriter.py
==============================================================================
--- pypy/dist/pypy/translator/llvm/opwriter.py (original)
+++ pypy/dist/pypy/translator/llvm/opwriter.py Thu Jan 19 13:59:54 2006
@@ -192,8 +192,9 @@
opr.argrefs[0], -1)
def uint_invert(self, opr):
+ from sys import maxint
self.codewriter.binaryop("xor", opr.retref, opr.argtypes[0],
- opr.argrefs[0], str((1L<<32) - 1))
+ opr.argrefs[0], str(maxint*2+1))
def binaryop(self, opr):
assert len(opr.argrefs) == 2
More information about the Pypy-commit
mailing list