openbsd-ports/lang/kaffe/patches/patch-config_i386_trampolines_c
2004-01-02 19:52:15 +00:00

48 lines
1.7 KiB
Plaintext

$OpenBSD: patch-config_i386_trampolines_c,v 1.1 2004/01/02 19:52:15 espie Exp $
--- config/i386/trampolines.c.orig 2004-01-02 20:43:19.000000000 +0100
+++ config/i386/trampolines.c 2004-01-02 20:44:28.000000000 +0100
@@ -33,10 +33,10 @@ TRAMPOLINE_FUNCTION()
asm(
START_ASM_FUNC() C_FUNC_NAME(i386_do_fixup_trampoline) "\n"
-C_FUNC_NAME(i386_do_fixup_trampoline) ": \n
- call " C_FUNC_NAME(soft_fixup_trampoline) " \n
- popl %ecx \n
- jmp *%eax"
+C_FUNC_NAME(i386_do_fixup_trampoline) ": \n"
+" call " C_FUNC_NAME(soft_fixup_trampoline) " \n"
+" popl %ecx \n"
+" jmp *%eax"
END_ASM_FUNC()
);
@@ -48,17 +48,17 @@ C_FUNC_NAME(i386_do_fixup_trampoline) ":
*/
asm(
START_ASM_FUNC() C_FUNC_NAME(__kaffe_i386_gcj_fixup) "\n"
-C_FUNC_NAME(__kaffe_i386_gcj_fixup) ":
- mov (%esp), %eax # get return address
- add -4(%eax), %eax # add jump relative offset from previous instr.
- # this points at at jmp *$off(%ebx) instr.
- mov 2(%eax), %eax # extract 'off'
- add %ebx, %eax # compute $off(%ebx)
- pushl %eax # pass as first argument
- call " C_FUNC_NAME(gcj_fixup_trampoline) " # returns target
- addl $4, %esp # remove argument
- jmp *%eax # jump to target
-"
+C_FUNC_NAME(__kaffe_i386_gcj_fixup) ":\n"
+" mov (%esp), %eax # get return address\n"
+" add -4(%eax), %eax # add jump relative offset from previous instr.\n"
+" # this points at at jmp *$off(%ebx) instr.\n"
+" mov 2(%eax), %eax # extract 'off'\n"
+" add %ebx, %eax # compute $off(%ebx)\n"
+" pushl %eax # pass as first argument\n"
+" call " C_FUNC_NAME(gcj_fixup_trampoline) " # returns target\n"
+" addl $4, %esp # remove argument\n"
+" jmp *%eax # jump to target\n"
+"\n"
END_ASM_FUNC()
);