[pypy-svn] r13953 - pypy/dist/pypy/translator/c

arigo at codespeak.net arigo at codespeak.net
Sun Jun 26 15:38:46 CEST 2005


Author: arigo
Date: Sun Jun 26 15:38:44 2005
New Revision: 13953

Modified:
   pypy/dist/pypy/translator/c/int_include.h
Log:
More integer operations in the C back-end.


Modified: pypy/dist/pypy/translator/c/int_include.h
==============================================================================
--- pypy/dist/pypy/translator/c/int_include.h	(original)
+++ pypy/dist/pypy/translator/c/int_include.h	Sun Jun 26 15:38:44 2005
@@ -135,6 +135,12 @@
 	if ((long)(y)) { OP_INT_MOD_OVF(x,y,r,err) } \
 	else FAIL_ZER(err, "integer modulo")
 
+/* bit operations */
+
+#define OP_INT_AND(x,y,r,err)     r = (long)(x) & (long)(y);
+#define OP_INT_OR( x,y,r,err)     r = (long)(x) | (long)(y);
+#define OP_INT_XOR(x,y,r,err)     r = (long)(x) ^ (long)(y);
+
 /*** conversions ***/
 
 #define OP_CAST_BOOL_TO_INT(x,r,err)    r = (long)(x);



More information about the Pypy-commit mailing list