[pypy-svn] r50939 - in pypy/branch/asmgcroot/pypy/translator/c/gcc: . test

arigo at codespeak.net arigo at codespeak.net
Wed Jan 23 17:42:10 CET 2008


Author: arigo
Date: Wed Jan 23 17:42:08 2008
New Revision: 50939

Added:
   pypy/branch/asmgcroot/pypy/translator/c/gcc/test/track5.s
Modified:
   pypy/branch/asmgcroot/pypy/translator/c/gcc/trackgcroot.py
Log:
Test and fix.  GCC doesn't know that RPyAbort cannot return.


Added: pypy/branch/asmgcroot/pypy/translator/c/gcc/test/track5.s
==============================================================================
--- (empty file)
+++ pypy/branch/asmgcroot/pypy/translator/c/gcc/test/track5.s	Wed Jan 23 17:42:08 2008
@@ -0,0 +1,55 @@
+	.type	pypy_g_SemiSpaceGC_scan_copied, @function
+pypy_g_SemiSpaceGC_scan_copied:
+.L1215:
+	pushl	%esi
+	pushl	%ebx
+	subl	$20, %esp
+	movl	32(%esp), %esi
+	movl	36(%esp), %ebx
+	testl	%esi, %esi
+	jne	.L1216
+	jmp	.L1227
+.L1220:
+.L1231:
+	movl	%ebx, 4(%esp)
+	movl	%esi, 8(%esp)
+	movl	%esi, (%esp)
+	call	pypy_g_trace___trace_copy
+	;; expected (32, -8, -4, 5, 7)
+	movl	%ebx, 4(%esp)
+	movl	%esi, (%esp)
+	call	pypy_g_SemiSpaceGC_get_size
+	;; expected (32, -8, -4, 5, 7)
+	addl	%eax, %ebx
+.L1216:
+	cmpl	12(%esi), %ebx
+	jb	.L1231
+.L1221:
+	addl	$20, %esp
+	movl	%ebx, %eax
+	popl	%ebx
+	popl	%esi
+	ret
+	.p2align 4,,7
+.L1229:
+	movl	%ebx, 4(%esp)
+	movl	%esi, 8(%esp)
+	movl	%esi, (%esp)
+	call	pypy_g_trace___trace_copy
+	;; expected (32, -8, -4, 5, 7)
+	movl	%ebx, 4(%esp)
+	movl	%esi, (%esp)
+	call	pypy_g_SemiSpaceGC_get_size
+	;; expected (32, -8, -4, 5, 7)
+	addl	%eax, %ebx
+.L1227:
+	call	RPyAbort
+	;; expected (32, -8, -4, 5, 7)
+	cmpl	12(%esi), %ebx
+	jb	.L1229
+	addl	$20, %esp
+	movl	%ebx, %eax
+	popl	%ebx
+	popl	%esi
+	ret
+	.size	pypy_g_SemiSpaceGC_scan_copied, .-pypy_g_SemiSpaceGC_scan_copied

Modified: pypy/branch/asmgcroot/pypy/translator/c/gcc/trackgcroot.py
==============================================================================
--- pypy/branch/asmgcroot/pypy/translator/c/gcc/trackgcroot.py	(original)
+++ pypy/branch/asmgcroot/pypy/translator/c/gcc/trackgcroot.py	Wed Jan 23 17:42:08 2008
@@ -755,8 +755,6 @@
     'abort': None,
     '_exit': None,
     '__assert_fail': None,
-    'RPyAbort': None,
-    'RPyAssertFailed': None,
     }
 
 CALLEE_SAVE_REGISTERS_NOEBP = ['%ebx', '%esi', '%edi']



More information about the Pypy-commit mailing list