X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fldso-stubs.lisp;h=132c44a9c4a5630ecc2d438a365819adbd4f60eb;hb=5e2b057871cf47c795c75106899f5fb05dc3397e;hp=25bc891169bd9835d0670dfe49cc49f7992464c1;hpb=d1355f6b79af346f05cf21c18637e269e0b499a1;p=sbcl.git diff --git a/tools-for-build/ldso-stubs.lisp b/tools-for-build/ldso-stubs.lisp index 25bc891..132c44a 100644 --- a/tools-for-build/ldso-stubs.lisp +++ b/tools-for-build/ldso-stubs.lisp @@ -46,7 +46,9 @@ ldso_stub__~A: ; \\ /* This is an automatically generated file, please do not hand-edit it. * See the program tools-for-build/ldso-stubs.lisp. */ +#ifndef LANGUAGE_ASSEMBLY #define LANGUAGE_ASSEMBLY +#endif #include \"sbcl.h\"" #!+sparc " @@ -55,7 +57,7 @@ ldso_stub__~A: ; \\ #endif .text" -#!+x86 " +#!+(or x86 x86-64) " #define LDSO_STUBIFY(fct) \\ .align 16 ; \\ .globl ldso_stub__ ## fct ; \\ @@ -116,24 +118,34 @@ ldso_stub__ ## fct ## $lazy_ptr: @\\ ;;; the fifth argument, as the first four are passed in registers ;;; and we apparently don't ever need to pass six arguments to a ;;; libc function. -- CSR, 2003-10-29 +;;; Expanded to 8 arguments regardless. -- ths, 2005-03-24 #!+mips " -#define LDSO_STUBIFY(fct) \\ -.globl ldso_stub__ ## fct ; \\ - .type ldso_stub__ ## fct,@function ; \\ -ldso_stub__ ## fct: ; \\ - addiu $29,-48 ; \\ - sw $28,40($29) ; \\ - sw $31,44($29) ; \\ - lw $25,64($29) ; \\ - sw $25,16($29) ; \\ - la $25, fct ; \\ - jalr $25 ; \\ - lw $31,44($29) ; \\ - lw $28,40($29) ; \\ - addiu $29,48 ; \\ - jr $31 ; \\ -.L ## fct ## e1: ; \\ - .size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;")) +#define LDSO_STUBIFY(fct) \\ + .globl ldso_stub__ ## fct ; \\ + .type ldso_stub__ ## fct,@function ; \\ + .ent ldso_stub__ ## fct ; \\ +ldso_stub__ ## fct: ; \\ + .set noat ; \\ + addiu $29,-48 ; \\ + sw $28,40($29) ; \\ + sw $31,44($29) ; \\ + lw $25,64($29) ; \\ + lw $1,68($29) ; \\ + sw $25,16($29) ; \\ + sw $1,20($29) ; \\ + lw $25,72($29) ; \\ + lw $1,76($29) ; \\ + sw $25,24($29) ; \\ + sw $1,28($29) ; \\ + .set at ; \\ + la $25, fct ; \\ + jalr $25 ; \\ + lw $31,44($29) ; \\ + lw $28,40($29) ; \\ + addiu $29,48 ; \\ + jr $31 ; \\ + .end ldso_stub__ ## fct ; \\ + .size ldso_stub__ ## fct,.-ldso_stub__ ## fct ;")) (defvar *stubs* (append '("accept" @@ -198,6 +210,7 @@ ldso_stub__ ## fct: ; \\ "malloc" "memmove" "mkdir" + "nanosleep" "nl_langinfo" "open" "opendir"