libc: ARM generateasm
This commit is contained in:
parent
fc42f78836
commit
0ae2e2df94
|
@ -1,3 +1,15 @@
|
||||||
|
ORIGFUNC= ${.PREFIX:S/^compat//}
|
||||||
|
RENAMEDFUNC=${.PREFIX:S/^compat__//:C/([0-9]{2})$//}
|
||||||
|
.if (${MACHINE_ARCH} == "i386")
|
||||||
|
FUNCTYPE= @function
|
||||||
|
PICJMP= jmpl *PIC_PLT(${ORIGFUNC})
|
||||||
|
JMP= jmp ${ORIGFUNC}
|
||||||
|
.elif (${MACHINE_ARCH} == "arm")
|
||||||
|
FUNCTYPE= %%function
|
||||||
|
PICJMP= bl PIC_SYM(${ORIGFUNC}, PLT)
|
||||||
|
JMP= b ${ORIGFUNC}
|
||||||
|
.endif
|
||||||
|
|
||||||
${ASM}:
|
${ASM}:
|
||||||
${_MKTARGET_CREATE}
|
${_MKTARGET_CREATE}
|
||||||
printf '/* MINIX3 */ \n\
|
printf '/* MINIX3 */ \n\
|
||||||
|
@ -7,14 +19,14 @@ ${ASM}:
|
||||||
* DO NOT EDIT: this file is automatically generated. \n\
|
* DO NOT EDIT: this file is automatically generated. \n\
|
||||||
*/ \n\
|
*/ \n\
|
||||||
#include <machine/asm.h> \n\
|
#include <machine/asm.h> \n\
|
||||||
.global ${.PREFIX:S/^compat__//:C/([0-9]{2})$//}; \n\
|
.global ${RENAMEDFUNC}; \n\
|
||||||
.global ${.PREFIX:S/^compat//}; \n\
|
.global ${ORIGFUNC}; \n\
|
||||||
.type ${.PREFIX:S/^compat__//:C/([0-9]{2})$//},@function \n\
|
.type ${RENAMEDFUNC},${FUNCTYPE} \n\
|
||||||
${.PREFIX:S/^compat__//:C/([0-9]{2})$//}: \n\
|
${RENAMEDFUNC}: \n\
|
||||||
#ifdef PIC \n\
|
#ifdef PIC \n\
|
||||||
jmpl *PIC_PLT(${.PREFIX:S/^compat//}) \n\
|
${PICJMP} \n\
|
||||||
#else \n\
|
#else \n\
|
||||||
jmp ${.PREFIX:S/^compat//} \n\
|
${JMP} \n\
|
||||||
#endif \n\
|
#endif \n\
|
||||||
\n ' >${.TARGET}
|
\n ' >${.TARGET}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue