[pypy-commit] pypy vmprof-newstack: Use LEA, as discussed on irc

arigo pypy.commits at gmail.com
Wed Jan 13 12:41:37 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: vmprof-newstack
Changeset: r81743:d718f341bf5f
Date: 2016-01-13 18:40 +0100
http://bitbucket.org/pypy/pypy/changeset/d718f341bf5f/

Log:	Use LEA, as discussed on irc

diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py
--- a/rpython/jit/backend/x86/assembler.py
+++ b/rpython/jit/backend/x86/assembler.py
@@ -840,8 +840,7 @@
 
     def _call_header_vmprof(self):
         stack = rffi.cast(lltype.Signed, _get_vmprof().cintf.vmprof_address_of_global_stack())
-        self.mc.MOV_rr(eax.value, esp.value)
-        self.mc.ADD_ri(eax.value, (FRAME_FIXED_SIZE - 4) * WORD) # er makes no sense
+        self.mc.LEA_rs(eax.value, (FRAME_FIXED_SIZE - 4) * WORD)
         # next
         self.mc.MOV(ecx, heap(stack))
         self.mc.MOV_mr((eax.value, 0), ecx.value)


More information about the pypy-commit mailing list