[pypy-svn] pypy jitypes2: Kill the two unnecessary copies of rsi and rdi at the start of the function.
arigo
commits-noreply at bitbucket.org
Mon Mar 28 15:58:44 CEST 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: jitypes2
Changeset: r42995:42f4c037a92b
Date: 2011-03-27 13:32 +0200
http://bitbucket.org/pypy/pypy/changeset/42f4c037a92b/
Log: Kill the two unnecessary copies of rsi and rdi at the start of the
function.
diff --git a/pypy/translator/c/gcc/trackgcroot.py b/pypy/translator/c/gcc/trackgcroot.py
--- a/pypy/translator/c/gcc/trackgcroot.py
+++ b/pypy/translator/c/gcc/trackgcroot.py
@@ -1648,8 +1648,8 @@
print >> output, """\
/* See description in asmgcroot.py */
.cfi_startproc
- movq\t%rdi, %rdx\t/* 1st argument, which is the callback */
- movq\t%rsi, %rcx\t/* 2nd argument, which is gcrootanchor */
+ /* %rdi is the 1st argument, which is the callback */
+ /* %rsi is the 2nd argument, which is gcrootanchor */
movq\t%rsp, %rax\t/* my frame top address */
pushq\t%rax\t\t/* ASM_FRAMEDATA[8] */
pushq\t%rbp\t\t/* ASM_FRAMEDATA[7] */
@@ -1662,15 +1662,15 @@
/* Add this ASM_FRAMEDATA to the front of the circular linked */
/* list. Let's call it 'self'. */
- movq\t8(%rcx), %rax\t/* next = gcrootanchor->next */
+ movq\t8(%rsi), %rax\t/* next = gcrootanchor->next */
pushq\t%rax\t\t\t\t/* self->next = next */
- pushq\t%rcx\t\t\t/* self->prev = gcrootanchor */
- movq\t%rsp, 8(%rcx)\t/* gcrootanchor->next = self */
+ pushq\t%rsi\t\t\t/* self->prev = gcrootanchor */
+ movq\t%rsp, 8(%rsi)\t/* gcrootanchor->next = self */
movq\t%rsp, 0(%rax)\t\t\t/* next->prev = self */
.cfi_def_cfa_offset 80\t/* 9 pushes + the retaddr = 80 bytes */
/* note: the Mac OS X 16 bytes aligment must be respected. */
- call\t*%rdx\t\t/* invoke the callback */
+ call\t*%rdi\t\t/* invoke the callback */
/* Detach this ASM_FRAMEDATA from the circular linked list */
popq\t%rsi\t\t/* prev = self->prev */
@@ -1687,7 +1687,7 @@
popq\t%rcx\t\t/* ignored ASM_FRAMEDATA[8] */
/* the return value is the one of the 'call' above, */
- /* because %rax (and possibly %rdx) are unmodified */
+ /* because %rax is unmodified */
ret
.cfi_endproc
"""
More information about the Pypy-commit
mailing list