diff options
author | Richard Plangger <planrichi@gmail.com> | 2016-04-15 09:00:01 +0200 |
---|---|---|
committer | Richard Plangger <planrichi@gmail.com> | 2016-04-15 09:00:01 +0200 |
commit | a4b0ea6de5c0e3a2706a91d2f0e8e0446168a5b9 (patch) | |
tree | 0de47c48c73dc77d03188fcca9b7e7555c44cad6 | |
parent | fix range check thinko; calculate w/ bits not bytes (diff) | |
download | pypy-a4b0ea6de5c0e3a2706a91d2f0e8e0446168a5b9.tar.gz pypy-a4b0ea6de5c0e3a2706a91d2f0e8e0446168a5b9.tar.bz2 pypy-a4b0ea6de5c0e3a2706a91d2f0e8e0446168a5b9.zip |
translation issue resolved
-rw-r--r-- | rpython/jit/backend/zarch/regalloc.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/rpython/jit/backend/zarch/regalloc.py b/rpython/jit/backend/zarch/regalloc.py index 8997e3360d..f9025b651a 100644 --- a/rpython/jit/backend/zarch/regalloc.py +++ b/rpython/jit/backend/zarch/regalloc.py @@ -336,12 +336,15 @@ class ZARCHRegisterManager(RegisterManager): def _relocate_forbidden_variable(self, reg, var, reverse_mapping, forbidden_vars, forbidden_reg): for candidate in r.MANAGED_REGS: + # move register of var to another register + # thus it is not allowed to bei either reg or forbidden_reg if candidate is reg or candidate is forbidden_reg: continue - if candidate not in forbidden_vars: - var = reverse_mapping.get(candidate, None) - if var is not None: - self._sync_var(var) + # neither can we allow to move it to a register of another forbidden variable + candidate_var = reverse_mapping.get(candidate, None) + if not candidate_var or candidate_var not in forbidden_vars: + if candidate_var is not None: + self._sync_var(candidate_var) self.assembler.regalloc_mov(reg, candidate) self.reg_bindings[var] = candidate reverse_mapping[reg] = var |