Author: David Schneider <[email protected]>
Branch: ppc-jit-backend
Changeset: r56428:7e7dd3888cb5
Date: 2012-07-24 09:48 -0700
http://bitbucket.org/pypy/pypy/changeset/7e7dd3888cb5/
Log: (edelsohn, bivab): use a word sized datatype for packing the number
and calculating the offset, so it works on little and big endian
diff --git a/pypy/jit/backend/test/runner_test.py
b/pypy/jit/backend/test/runner_test.py
--- a/pypy/jit/backend/test/runner_test.py
+++ b/pypy/jit/backend/test/runner_test.py
@@ -2185,7 +2185,7 @@
funcbox = self.get_funcbox(self.cpu, func_ptr)
class WriteBarrierDescr(AbstractDescr):
jit_wb_if_flag = 4096
- jit_wb_if_flag_byteofs = struct.pack("i", 4096).index('\x10')
+ jit_wb_if_flag_byteofs = struct.pack("l", 4096).index('\x10')
jit_wb_if_flag_singlebyte = 0x10
def get_write_barrier_fn(self, cpu):
return funcbox.getint()
@@ -2221,7 +2221,7 @@
funcbox = self.get_funcbox(self.cpu, func_ptr)
class WriteBarrierDescr(AbstractDescr):
jit_wb_if_flag = 4096
- jit_wb_if_flag_byteofs = struct.pack("i", 4096).index('\x10')
+ jit_wb_if_flag_byteofs = struct.pack("l", 4096).index('\x10')
jit_wb_if_flag_singlebyte = 0x10
jit_wb_cards_set = 0 # <= without card marking
def get_write_barrier_fn(self, cpu):
@@ -2268,10 +2268,10 @@
funcbox = self.get_funcbox(self.cpu, func_ptr)
class WriteBarrierDescr(AbstractDescr):
jit_wb_if_flag = 4096
- jit_wb_if_flag_byteofs = struct.pack("i", 4096).index('\x10')
+ jit_wb_if_flag_byteofs = struct.pack("l", 4096).index('\x10')
jit_wb_if_flag_singlebyte = 0x10
jit_wb_cards_set = 32768
- jit_wb_cards_set_byteofs = struct.pack("i", 32768).index('\x80')
+ jit_wb_cards_set_byteofs = struct.pack("l", 32768).index('\x80')
jit_wb_cards_set_singlebyte = -0x80
jit_wb_card_page_shift = 7
def get_write_barrier_from_array_fn(self, cpu):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit