Commits

Sven Hager committed 4e94900

don't use make_sure_var_in_reg in prepare_same_as

Comments (0)

Files changed (1)

pypy/jit/backend/ppc/ppcgen/regalloc.py

             self.assembler.load(loc, immvalue)
         else:
             loc = self.make_sure_var_in_reg(thing,
-                            forbidden_vars=forbidden_vars)
+                            forbidden_vars=self.temp_boxes + forbidden_vars)
         return loc
 
     def allocate_scratch_reg(self, type=INT, selected_reg=None, forbidden_vars=None):
 
     def prepare_same_as(self, op):
         arg = op.getarg(0)
-        imm_arg = _check_imm_arg(arg)
-        if imm_arg:
-            argloc = self.make_sure_var_in_reg(arg)
-        else:
-            argloc = self._ensure_value_is_boxed(arg)
+        argloc = self._ensure_value_is_boxed(arg)
         self.possibly_free_vars_for_op(op)
         self.free_temp_vars()
         resloc = self.force_allocate_reg(op.result)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.