[pypy-commit] pypy stmgc-c4: fix
Raemi
noreply at buildbot.pypy.org
Fri Jul 26 15:55:40 CEST 2013
Author: Remi Meier <remi.meier at gmail.com>
Branch: stmgc-c4
Changeset: r65690:1f7031417ccb
Date: 2013-07-26 15:46 +0200
http://bitbucket.org/pypy/pypy/changeset/1f7031417ccb/
Log: fix
diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -2260,15 +2260,14 @@
# obj->h_tid & GCFLAG_WRITE_BARRIER) != 0
if isinstance(descr, STMWriteBarrierDescr):
+ assert IS_X86_64 and (StmGC.GCFLAG_WRITE_BARRIER >> 32) > 0
+ assert (StmGC.GCFLAG_WRITE_BARRIER >> 40) == 0
+ off = 4
+ flag = StmGC.GCFLAG_WRITE_BARRIER >> 32
if loc_base == ebp:
- #mc.MOV_rb(X86_64_SCRATCH_REG.value, StmGC.H_TID)
- mc.TEST8_bi(StmGC.H_TID, StmGC.GCFLAG_WRITE_BARRIER)
+ mc.TEST8_bi(StmGC.H_TID + off, flag)
else:
- # mc.MOV(X86_64_SCRATCH_REG, mem(loc_base, StmGC.H_TID))
- mc.TEST8_mi((loc_base.value, StmGC.H_TID),
- StmGC.GCFLAG_WRITE_BARRIER)
- #doesn't work:
- # mc.TEST(X86_64_SCRATCH_REG, imm(StmGC.GCFLAG_WRITE_BARRIER))
+ mc.TEST8_mi((loc_base.value, StmGC.H_TID + off), flag)
mc.J_il8(rx86.Conditions['NZ'], 0) # patched below
jnz_location2 = mc.get_relative_pos()
diff --git a/rpython/memory/gc/stmgc.py b/rpython/memory/gc/stmgc.py
--- a/rpython/memory/gc/stmgc.py
+++ b/rpython/memory/gc/stmgc.py
@@ -49,8 +49,8 @@
GCFLAG_STUB = first_gcflag << 8 # debug
GCFLAG_PRIVATE_FROM_PROTECTED = first_gcflag << 9
GCFLAG_HAS_ID = first_gcflag << 10
- GCFLAG_IMMUTABLE = first_gcflag << 11;
- GCFLAG_SMALLSTUB = first_gcflag << 12;
+ GCFLAG_IMMUTABLE = first_gcflag << 11
+ GCFLAG_SMALLSTUB = first_gcflag << 12
PREBUILT_FLAGS = first_gcflag * (1 + 2 + 4 + 8)
PREBUILT_REVISION = r_uint(1)
More information about the pypy-commit
mailing list