Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r63369:b0630c2d6da5
Date: 2013-04-15 16:38 +0200
http://bitbucket.org/pypy/pypy/changeset/b0630c2d6da5/
Log: merge
diff --git a/rpython/jit/backend/arm/assembler.py
b/rpython/jit/backend/arm/assembler.py
--- a/rpython/jit/backend/arm/assembler.py
+++ b/rpython/jit/backend/arm/assembler.py
@@ -770,7 +770,7 @@
def _load_shadowstack_top(self, mc, reg, gcrootmap):
rst = gcrootmap.get_root_stack_top_addr()
mc.gen_load_int(reg.value, rst)
- self.load_reg(mc, reg.value, reg.value)
+ self.load_reg(mc, reg, reg)
return rst
def fixup_target_tokens(self, rawstart):
diff --git a/rpython/jit/backend/arm/opassembler.py
b/rpython/jit/backend/arm/opassembler.py
--- a/rpython/jit/backend/arm/opassembler.py
+++ b/rpython/jit/backend/arm/opassembler.py
@@ -352,7 +352,8 @@
def _emit_call(self, adr, arglocs, fcond=c.AL, resloc=None,
result_info=(-1, -1),
- can_collect=1):
+ can_collect=1,
+ reload_frame=False):
if self.cpu.hf_abi:
stack_args, adr = self._setup_call_hf(adr, arglocs, fcond,
resloc, result_info)
@@ -365,7 +366,6 @@
gcmap = self._regalloc.get_gcmap([r.r0], noregs=noregs)
self.push_gcmap(self.mc, gcmap, store=True)
#the actual call
- #self.mc.BKPT()
if adr.is_imm():
self.mc.BL(adr.value)
elif adr.is_stack():
@@ -388,6 +388,8 @@
if can_collect:
self._reload_frame_if_necessary(self.mc, can_collect=can_collect)
self.pop_gcmap(self.mc)
+ elif reload_frame:
+ self._reload_frame_if_necessary(self.mc)
return fcond
def _restore_sp(self, stack_args, fcond):
@@ -1266,6 +1268,10 @@
resloc = arglocs[0]
if gcrootmap:
+ noregs = self.cpu.gc_ll_descr.is_shadow_stack()
+ assert noregs
+ gcmap = self._regalloc.get_gcmap([r.r0], noregs=noregs)
+ self.push_gcmap(self.mc, gcmap, store=True)
self.call_release_gil(gcrootmap, arglocs, regalloc, fcond)
# do the call
self._store_force_index(guard_op)
@@ -1275,7 +1281,8 @@
signed = descr.is_result_signed()
#
self._emit_call(adr, callargs, fcond,
- resloc, (size, signed))
+ resloc, (size, signed),
+ can_collect=0)
# then reopen the stack
if gcrootmap:
self.call_reacquire_gil(gcrootmap, resloc, regalloc, fcond)
@@ -1288,7 +1295,8 @@
# NOTE: We assume that the floating point registers won't be modified.
assert gcrootmap.is_shadow_stack
with saved_registers(self.mc, regalloc.rm.save_around_call_regs):
- self._emit_call(imm(self.releasegil_addr), [], fcond)
+ self._emit_call(imm(self.releasegil_addr), [],
+ fcond, can_collect=False)
def call_reacquire_gil(self, gcrootmap, save_loc, regalloc, fcond):
# save the previous result into the stack temporarily, in case it is in
@@ -1305,7 +1313,8 @@
assert gcrootmap.is_shadow_stack
# call the reopenstack() function (also reacquiring the GIL)
with saved_registers(self.mc, regs_to_save, vfp_regs_to_save):
- self._emit_call(imm(self.reacqgil_addr), [], fcond)
+ self._emit_call(imm(self.reacqgil_addr), [], fcond,
+ can_collect=False, reload_frame=True)
def _store_force_index(self, guard_op):
faildescr = guard_op.getdescr()
diff --git a/rpython/translator/c/src/support.h
b/rpython/translator/c/src/support.h
--- a/rpython/translator/c/src/support.h
+++ b/rpython/translator/c/src/support.h
@@ -2,6 +2,16 @@
/************************************************************/
/*** C header subsection: support functions ***/
+/* a temporary(?) workaround for GCC 4.8. See:
+ http://stackoverflow.com/questions/16016627/
+*/
+#ifdef __GNUC__
+# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
+# pragma GCC optimize("no-aggressive-loop-optimizations")
+# endif
+#endif
+
+
#define RUNNING_ON_LLINTERP 0
#define OP_JIT_RECORD_KNOWN_CLASS(i, c, r) /* nothing */
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit