1 .macro makestub,type,func,section 2 .text 3 .set \type 4 .type \func,@function 5 .ent \func 6\func: 7 jr $31 8 .end \func 9 10 .section \section,"ax",@progbits 11 .set nomips16 12 .type stub_for_\func,@function 13 .ent stub_for_\func 14stub_for_\func: 15 .set noat 16 la $1,\func 17 jr $1 18 .set at 19 .end stub_for_\func 20 .endm 21 22 .macro makestubs,id 23 makestub nomips16,f\id,.mips16.call.F\id 24 makestub nomips16,g\id,.mips16.call.fp.G\id 25 makestub mips16,h\id,.mips16.fn.H\id 26 .endm 27 28 .macro makecaller,type,func 29 .text 30 .set \type 31 .globl \func 32 .type \func,@function 33 .ent \func 34\func: 35 jal f1 36 jal f2 37 jal g1 38 jal g2 39 jal h1 40 jal h2 41 .end \func 42 .endm 43 44 makestubs 1 45 makestubs 2 46 makestubs 3 47 48 makecaller nomips16,caller1 49 makecaller mips16,caller2 50