Commits

Maciej Fijalkowski committed 9db1c0d

fix the stack alignment (I think)

Comments (0)

Files changed (1)

rpython/jit/backend/x86/assembler.py

                     stack_depth += 1
             stack_depth += loc.get_width() // WORD
         if stack_depth > stack_max:
-            stack_depth = align_stack_words(stack_depth)
-            align = (stack_depth - stack_max)
+            align = align_stack_words(stack_depth - stack_max)
             self.mc.SUB_ri(esp.value, align * WORD)
             if can_collect == 1:
                 ofs = self.cpu.get_ofs_of_frame_field('jf_extra_stack_depth')
                        max(floats - len(unused_xmm), 0))
         align = 0
         if stack_depth > stack_max:
-            stack_depth = align_stack_words(stack_depth)
-            align = (stack_depth - stack_max)
+            align = align_stack_words(stack_depth - stack_max)
             if can_collect == 1:
                 ofs = self.cpu.get_ofs_of_frame_field('jf_extra_stack_depth')
                 self.mc.MOV_bi(ofs, align * WORD)