Commit a5f2ec2a authored by John van Groningen's avatar John van Groningen

port to 32 bit linux

parent a584e560
all: copy_graph_to_string.o copy_graph_to_string_interface.o copy_string_to_graph.o copy_string_to_graph_interface.o
copy_graph_to_string.o: copy_graph_to_string.c
gcc -O -S -fomit-frame-pointer -DLINUX32 copy_graph_to_string.c -o copy_graph_to_string.a
sed -f s.sed copy_graph_to_string.a > copy_graph_to_string.s
as copy_graph_to_string.s -o copy_graph_to_string.o
cp copy_graph_to_string.o "Clean System Files"/copy_graph_to_string.o
copy_graph_to_string_interface.o: copy_graph_to_string_interface_linux.s
as copy_graph_to_string_interface_linux.s -o copy_graph_to_string_interface.o
cp copy_graph_to_string_interface.o "Clean System Files"/copy_graph_to_string_interface.o
copy_string_to_graph.o: copy_string_to_graph.c
gcc -O -S -fomit-frame-pointer -DLINUX32 copy_string_to_graph.c -o copy_string_to_graph.a
sed -f s.sed copy_string_to_graph.a > copy_string_to_graph.s
as copy_string_to_graph.s -o copy_string_to_graph.o
cp copy_string_to_graph.o "Clean System Files"/copy_string_to_graph.o
copy_string_to_graph_interface.o: copy_string_to_graph_interface_linux.s
as copy_string_to_graph_interface_linux.s -o copy_string_to_graph_interface.o
cp copy_string_to_graph_interface.o "Clean System Files"/copy_string_to_graph_interface.o
......@@ -15,7 +15,7 @@
# define INT_descriptor INT
# define ARCH_64 0
# endif
# ifndef LINUX64
# if !(defined (LINUX32) || defined (LINUX64))
# define __STRING__ _STRING__
# define __ARRAY__ _ARRAY__
# endif
......
.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
......@@ -15,7 +15,7 @@
# define INT_descriptor INT
# define ARCH_64 0
# endif
# ifndef LINUX64
# if !(defined (LINUX32) || defined (LINUX64))
# define __STRING__ _STRING__
# define __ARRAY__ _ARRAY__
# endif
......
.globl collect_1l
.globl end_heap
.globl copy_string_to_graph
.globl remove_forwarding_pointers_from_string
.text
.globl __copy__string__to__graph
__copy__string__to__graph:
pushl %ecx
subl $4,%esp
pushl %esp
movl end_heap,%ebx
addl $32,%ebx
pushl %ebx
pushl %edi
pushl %ecx
call copy_string_to_graph
addl $16,%esp
testl $1,%eax
je __copy__string__to__graph_1
movl 4(%esp),%ecx
andl $-4,%eax
pushl %eax
pushl %ecx
call remove_forwarding_pointers_from_string
addl $8,%esp
popl %ebp
popl %ecx
subl $32,%ebp
call collect_1l
jmp __copy__string__to__graph
__copy__string__to__graph_1:
movl (%esp),%edi
movl %eax,%ecx
addl $8,%esp
ret
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment