vm, kernel, top: report memory usage of vm, kernel
[minix.git] / lib / generateasm.mk
blob0b22063649a587c97a525d6939a413464f654d8e
1 ORIGFUNC= ${.PREFIX:S/^compat//}
2 RENAMEDFUNC=${.PREFIX:S/^compat__//:C/([0-9]{2})$//}
3 .if (${MACHINE_ARCH} == "i386")
4 FUNCTYPE= @function
5 PICJMP= jmpl *PIC_PLT(${ORIGFUNC})
6 JMP= jmp ${ORIGFUNC}
7 .elif (${MACHINE_ARCH} == "arm")
8 FUNCTYPE= %%function
9 PICJMP= bl PIC_SYM(${ORIGFUNC}, PLT)
10 JMP= b ${ORIGFUNC}
11 .endif
13 ${ASM}:
14 ${_MKTARGET_CREATE}
15 printf '/* MINIX3 */ \n\
16 /* \n\
17 * Compatibility jump table for renamed symbols. \n\
18 * \n\
19 * DO NOT EDIT: this file is automatically generated. \n\
20 */ \n\
21 #include <machine/asm.h> \n\
22 .global ${RENAMEDFUNC}; \n\
23 .global ${ORIGFUNC}; \n\
24 .type ${RENAMEDFUNC},${FUNCTYPE} \n\
25 ${RENAMEDFUNC}: \n\
26 #ifdef PIC \n\
27 ${PICJMP} \n\
28 #else \n\
29 ${JMP} \n\
30 #endif \n\
31 \n ' >${.TARGET}