[pypy-commit] pypy math-improvements: Review the low-level parts. Fixes some details
arigo
pypy.commits at gmail.com
Fri Dec 7 04:34:53 EST 2018
Author: Armin Rigo <arigo at tunes.org>
Branch: math-improvements
Changeset: r95436:ecb5ca585871
Date: 2018-12-07 11:34 +0200
http://bitbucket.org/pypy/pypy/changeset/ecb5ca585871/
Log: Review the low-level parts. Fixes some details
diff --git a/rpython/rtyper/lltypesystem/lloperation.py b/rpython/rtyper/lltypesystem/lloperation.py
--- a/rpython/rtyper/lltypesystem/lloperation.py
+++ b/rpython/rtyper/lltypesystem/lloperation.py
@@ -325,8 +325,6 @@
'lllong_xor': LLOp(canfold=True),
'ulllong_is_true': LLOp(canfold=True),
- 'ulllong_neg': LLOp(canfold=True),
- 'ulllong_abs': LLOp(canfold=True),
'ulllong_invert': LLOp(canfold=True),
'ulllong_add': LLOp(canfold=True),
diff --git a/rpython/rtyper/lltypesystem/rffi.py b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -538,9 +538,8 @@
if name.startswith('unsigned'):
name = 'u' + name[9:]
signed = False
- elif name.startswith('__u'):
- signed = False
- elif name == 'size_t' or name.startswith('uint'):
+ elif (name == 'size_t' or name.startswith('uint')
+ or name.startswith('__uint')):
signed = False
else:
signed = True
diff --git a/rpython/rtyper/rint.py b/rpython/rtyper/rint.py
--- a/rpython/rtyper/rint.py
+++ b/rpython/rtyper/rint.py
@@ -188,7 +188,7 @@
signedlonglonglong_repr = getintegerrepr(SignedLongLongLong, 'lllong_')
unsigned_repr = getintegerrepr(Unsigned, 'uint_')
unsignedlonglong_repr = getintegerrepr(UnsignedLongLong, 'ullong_')
-signedlonglonglong_repr = getintegerrepr(UnsignedLongLongLong, 'ulllong_')
+unsignedlonglonglong_repr = getintegerrepr(UnsignedLongLongLong, 'ulllong_')
class __extend__(pairtype(IntegerRepr, IntegerRepr)):
@@ -565,7 +565,7 @@
@jit.dont_look_inside
def ll_ulllong_py_mod(x, y):
- return llop.ullong_mod(UnsignedLongLongLong, x, y)
+ return llop.ulllong_mod(UnsignedLongLongLong, x, y)
def ll_ulllong_py_mod_zer(x, y):
if y == 0:
diff --git a/rpython/translator/c/src/int.h b/rpython/translator/c/src/int.h
--- a/rpython/translator/c/src/int.h
+++ b/rpython/translator/c/src/int.h
@@ -258,18 +258,18 @@
#define OP_ULLONG_OR OP_LLONG_OR
#define OP_ULLONG_XOR OP_LLONG_XOR
-#define OP_ULLLONG_IS_TRUE OP_LLONG_IS_TRUE
-#define OP_ULLLONG_INVERT OP_LLONG_INVERT
-#define OP_ULLLONG_ADD OP_LLONG_ADD
-#define OP_ULLLONG_SUB OP_LLONG_SUB
-#define OP_ULLLONG_MUL OP_LLONG_MUL
-#define OP_ULLLONG_LT OP_LLONG_LT
-#define OP_ULLLONG_LE OP_LLONG_LE
-#define OP_ULLLONG_EQ OP_LLONG_EQ
-#define OP_ULLLONG_NE OP_LLONG_NE
-#define OP_ULLLONG_GT OP_LLONG_GT
-#define OP_ULLLONG_GE OP_LLONG_GE
-#define OP_ULLLONG_AND OP_LLONG_AND
-#define OP_ULLLONG_OR OP_LLONG_OR
-#define OP_ULLLONG_XOR OP_LLONG_XOR
+#define OP_ULLLONG_IS_TRUE OP_LLLONG_IS_TRUE
+#define OP_ULLLONG_INVERT OP_LLLONG_INVERT
+#define OP_ULLLONG_ADD OP_LLLONG_ADD
+#define OP_ULLLONG_SUB OP_LLLONG_SUB
+#define OP_ULLLONG_MUL OP_LLLONG_MUL
+#define OP_ULLLONG_LT OP_LLLONG_LT
+#define OP_ULLLONG_LE OP_LLLONG_LE
+#define OP_ULLLONG_EQ OP_LLLONG_EQ
+#define OP_ULLLONG_NE OP_LLLONG_NE
+#define OP_ULLLONG_GT OP_LLLONG_GT
+#define OP_ULLLONG_GE OP_LLLONG_GE
+#define OP_ULLLONG_AND OP_LLLONG_AND
+#define OP_ULLLONG_OR OP_LLLONG_OR
+#define OP_ULLLONG_XOR OP_LLLONG_XOR
More information about the pypy-commit
mailing list