[pypy-svn] r71926 - pypy/trunk/pypy/translator/c/gcc/test/msvc

arigo at codespeak.net arigo at codespeak.net
Tue Mar 9 00:07:40 CET 2010


Author: arigo
Date: Tue Mar  9 00:07:39 2010
New Revision: 71926

Added:
   pypy/trunk/pypy/translator/c/gcc/test/msvc/track6.s
      - copied, changed from r71873, pypy/trunk/pypy/translator/c/gcc/test/elf/track6.s
Log:
Add a test: we cannot use -16(%ebp) as the location of the "push esi",
because that's wrong, due to the rounding done by "and esp, xxx".


Copied: pypy/trunk/pypy/translator/c/gcc/test/msvc/track6.s (from r71873, pypy/trunk/pypy/translator/c/gcc/test/elf/track6.s)
==============================================================================
--- pypy/trunk/pypy/translator/c/gcc/test/elf/track6.s	(original)
+++ pypy/trunk/pypy/translator/c/gcc/test/msvc/track6.s	Tue Mar  9 00:07:39 2010
@@ -1,26 +1,15 @@
-	.type	main, @function
-main:
-	;; a minimal example showing what kind of code gcc
-	;; can produce for main(): some local variable accesses
-	;; are relative to %ebp, while others are relative to
-	;; %esp, and the difference %ebp-%esp is not constant
-	;; because of the 'andl' to align the stack
-	pushl	%ebp
-	movl	%esp, %ebp
-	subl	$8, %esp
-	andl	$-16, %esp
-	movl	$globalptr1, -4(%ebp)
-	movl	$globalptr2, (%esp)
-	pushl	$0
-	call	foobar
-	;; expected {4(%ebp) | %ebx, %esi, %edi, (%ebp) | 4(%esp), -4(%ebp)}
-	popl	%eax
-#APP
-	/* GCROOT -4(%ebp) */
-	/* GCROOT (%esp) */
-#NO_APP
-	movl	%ebp, %esp
-	popl	%ebp
-	ret
+_TEXT	SEGMENT
+_pypy_g_foo PROC					; COMDAT
 
-	.size	main, .-main
+	push	ebp
+	mov	ebp, esp
+	and	esp, -64
+	sub	esp, 12
+	push	esi
+	call	_pypy_g_something_else
+	;; expected {4(%ebp) | %ebx, 0(%esp), %edi, (%ebp) | }
+	pop	esi
+	mov	esp, ebp
+	pop	ebp
+	ret	0
+_pypy_g_foo ENDP



More information about the Pypy-commit mailing list