copy_graph_to_string_interface.s 742 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

.globl	_copy_graph_to_string
.globl	_remove_forwarding_pointers_from_graph
.globl	collect_1l
.globl	end_heap

	.text

.globl	__copy__graph__to__string

__copy__graph__to__string:
	pushl	%ecx

	movl	end_heap,%ebx
	addl	$32,%ebx
	pushl	%ebx
	pushl	%edi
	pushl	%ecx
	call	_copy_graph_to_string
	addl	$12,%esp

	movl	(%esp),%ecx
	pushl	%eax

	movl	end_heap,%ebx
	addl	$32,%ebx
	pushl	%ebx
	pushl	%ecx
	call	_remove_forwarding_pointers_from_graph
	addl	$8,%esp

	popl	%ecx

	testl	%ecx,%ecx
	jne		__copy__graph__to__string_1

	popl	%ecx

	movl	end_heap,%ebp
	addl	$4-32+32,%ebp
	call	collect_1l
	jmp		__copy__graph__to__string

__copy__graph__to__string_1:
	addl	$4,%esp

	movl	4(%ecx),%eax
	addl	$8+3,%eax
	andl	$-4,%eax
	addl	%eax,%edi
	
	ret