Armin Rigo  committed d1054bc

Cleanups; avoid changes from "default" that are now purely gratuitous.

  • Participants
  • Parent commits 332b124
  • Branches fast-slowpath

Comments (0)

Files changed (3)

File rpython/jit/backend/llsupport/

 from rpython.rlib.rarithmetic import ovfcheck
 from rpython.rtyper.lltypesystem import llmemory
 from rpython.jit.metainterp import history
-from rpython.jit.metainterp.history import ConstInt, BoxPtr, ConstPtr, BoxInt
+from rpython.jit.metainterp.history import ConstInt, BoxPtr, ConstPtr
 from rpython.jit.metainterp.resoperation import ResOperation, rop
 from rpython.jit.codewriter import heaptracker
-from rpython.jit.codewriter.effectinfo import EffectInfo
 from rpython.jit.backend.llsupport.symbolic import WORD
 from rpython.jit.backend.llsupport.descr import SizeDescr, ArrayDescr
 from rpython.jit.metainterp.history import JitCellToken

File rpython/jit/backend/llsupport/test/

 from rpython.jit.backend.llsupport.descr import get_size_descr,\
      get_field_descr, get_array_descr, ArrayDescr, FieldDescr,\
-     SizeDescrWithVTable, get_interiorfield_descr, get_call_descr
+     SizeDescrWithVTable, get_interiorfield_descr
 from rpython.jit.backend.llsupport.gc import GcLLDescr_boehm,\
 from rpython.jit.backend.llsupport import jitframe
-from rpython.jit.codewriter.effectinfo import EffectInfo
 from rpython.jit.metainterp.gc import get_description
 from rpython.jit.tool.oparser import parse
 from rpython.jit.metainterp.optimizeopt.util import equaloplists
 from rpython.jit.codewriter.heaptracker import register_known_gctype
-from rpython.jit.metainterp.history import JitCellToken, FLOAT, ConstInt
+from rpython.jit.metainterp.history import JitCellToken, FLOAT
 from rpython.rtyper.lltypesystem import lltype, rclass, rffi
 from rpython.jit.backend.x86.arch import WORD
         casmdescr.compiled_loop_token = clt
         tzdescr = None # noone cares
         for funcname in self.gc_ll_descr._generated_functions:

File rpython/jit/backend/x86/

         gcrootmap = self.cpu.gc_ll_descr.gcrootmap
         if gcrootmap and gcrootmap.is_shadow_stack:
-            self._load_shadowstack_top_in_reg(mc, gcrootmap)
+            self._load_shadowstack_top_in_ebx(mc, gcrootmap)
             mc.MOV_mr((ebx.value, -WORD), eax.value)
         mc.MOV_bi(gcmap_ofs, 0)
         gcrootmap = self.cpu.gc_ll_descr.gcrootmap
         if gcrootmap and gcrootmap.is_shadow_stack:
-            self._call_header_shadowstack(, gcrootmap)
+            self._call_header_shadowstack(gcrootmap)
     def _call_header_with_stack_check(self):
     def _call_footer(self):
         gcrootmap = self.cpu.gc_ll_descr.gcrootmap
         if gcrootmap and gcrootmap.is_shadow_stack:
-            self._call_footer_shadowstack(, gcrootmap)
+            self._call_footer_shadowstack(gcrootmap)
         for i in range(len(self.cpu.CALLEE_SAVE_REGISTERS)-1, -1, -1):
   [i].value,, FRAME_FIXED_SIZE * WORD)
-    def _load_shadowstack_top_in_reg(self, mc, gcrootmap, selected_reg=ebx):
-        """Loads the shadowstack top in selected reg, and returns an integer
+    def _load_shadowstack_top_in_ebx(self, mc, gcrootmap):
+        """Loads the shadowstack top in ebx, and returns an integer
         that gives the address of the stack top.  If this integer doesn't
         fit in 32 bits, it will be loaded in r11.
         rst = gcrootmap.get_root_stack_top_addr()
         if rx86.fits_in_32bits(rst):
-            mc.MOV_rj(selected_reg.value, rst)       # MOV ebx, [rootstacktop]
+            mc.MOV_rj(ebx.value, rst)            # MOV ebx, [rootstacktop]
             mc.MOV_ri(X86_64_SCRATCH_REG.value, rst) # MOV r11, rootstacktop
-            mc.MOV_rm(selected_reg.value, (X86_64_SCRATCH_REG.value, 0))
+            mc.MOV_rm(ebx.value, (X86_64_SCRATCH_REG.value, 0))
             # MOV ebx, [r11]
         return rst
-    def _call_header_shadowstack(self, mc, gcrootmap, selected_reg=ebx):
-        rst = self._load_shadowstack_top_in_reg(mc, gcrootmap, selected_reg)
-        mc.MOV_mr((selected_reg.value, 0), ebp.value)      # MOV [ebx], ebp
-        mc.ADD_ri(selected_reg.value, WORD)
+    def _call_header_shadowstack(self, gcrootmap):
+        rst = self._load_shadowstack_top_in_ebx(, gcrootmap)
+, 0), ebp.value)      # MOV [ebx], ebp
+, WORD)
         if rx86.fits_in_32bits(rst):
-            mc.MOV_jr(rst, selected_reg.value)       # MOV [rootstacktop], ebx
+  , ebx.value)            # MOV [rootstacktop], ebx
             # The integer 'rst' doesn't fit in 32 bits, so we know that
             # _load_shadowstack_top_in_ebx() above loaded it in r11.
             # Reuse it.  Be careful not to overwrite r11 in the middle!
-            mc.MOV_mr((X86_64_SCRATCH_REG.value, 0),
-                      selected_reg.value) # MOV [r11], ebx
+  , 0),
+                           ebx.value) # MOV [r11], ebx
-    def _call_footer_shadowstack(self, mc, gcrootmap, selected_reg=ebx):
+    def _call_footer_shadowstack(self, gcrootmap):
         rst = gcrootmap.get_root_stack_top_addr()
         if rx86.fits_in_32bits(rst):
-            mc.SUB_ji8(rst, WORD)       # SUB [rootstacktop], WORD
+  , WORD)       # SUB [rootstacktop], WORD
-            mc.MOV_ri(selected_reg.value, rst)           # MOV ebx, rootstacktop
-            mc.SUB_mi8((selected_reg.value, 0), WORD)    # SUB [ebx], WORD
+  , rst)           # MOV ebx, rootstacktop
+  , 0), WORD)  # SUB [ebx], WORD
     def redirect_call_assembler(self, oldlooptoken, newlooptoken):
         # some minimal sanity checking