.file "20010122-1.c" .text .align 2 .globl test1 .type test1, @function test1: link.w %a6,#0 move.l 4(%a6),%a0 move.l %a0,%d0 unlk %a6 rts .size test1, .-test1 .align 2 .globl test2 .type test2, @function test2: link.w %a6,#0 jbsr dummy move.l 4(%a6),%a0 move.l %a0,%d0 unlk %a6 rts .size test2, .-test2 .align 2 .globl test3 .type test3, @function test3: link.w %a6,#0 move.l %d2,-(%sp) move.l 4(%a6),%d2 jbsr dummy move.l %d2,%a0 move.l %a0,%d0 move.l -4(%a6),%d2 unlk %a6 rts .size test3, .-test3 .align 2 .globl test4 .type test4, @function test4: link.w %a6,#0 subq.l #4,%sp move.l %sp,-(%sp) jbsr test4a move.l %a0,%d0 unlk %a6 rts .size test4, .-test4 .align 2 .globl test4a .type test4a, @function test4a: link.w %a6,#0 move.l (%a6),%a0 move.l 4(%a0),%a0 move.l %a0,%d0 unlk %a6 rts .size test4a, .-test4a .align 2 .globl test5 .type test5, @function test5: link.w %a6,#0 subq.l #4,%sp move.l %sp,-(%sp) jbsr test5a move.l %a0,%d0 unlk %a6 rts .size test5, .-test5 .align 2 .globl test5a .type test5a, @function test5a: link.w %a6,#0 jbsr dummy move.l (%a6),%a0 move.l 4(%a0),%a0 move.l %a0,%d0 unlk %a6 rts .size test5a, .-test5a .align 2 .globl test6 .type test6, @function test6: link.w %a6,#0 subq.l #4,%sp move.l %sp,-(%sp) jbsr test6a move.l %a0,%d0 unlk %a6 rts .size test6, .-test6 .align 2 .globl test6a .type test6a, @function test6a: link.w %a6,#0 move.l %d2,-(%sp) move.l (%a6),%a0 move.l 4(%a0),%d2 jbsr dummy move.l %d2,%a0 move.l %a0,%d0 move.l -4(%a6),%d2 unlk %a6 rts .size test6a, .-test6a .globl func1 .data .align 2 .type func1, @object .size func1, 24 func1: .long test1 .long test2 .long test3 .long test4 .long test5 .long test6 .text .align 2 .globl call_func1 .type call_func1, @function call_func1: link.w %a6,#0 move.l %d2,-(%sp) move.l 8(%a6),%d2 lea func1,%a0 move.l (%a0,%d2.l*4),%a0 jbsr (%a0) lea save_ret1,%a1 move.l %a0,(%a1,%d2.l*4) move.l %a0,%d0 move.l -4(%a6),%d2 unlk %a6 rts .size call_func1, .-call_func1 .align 2 .globl test7 .type test7, @function test7: link.w %a6,#0 move.l 4(%a6),ret_addr unlk %a6 rts .size test7, .-test7 .align 2 .globl test8 .type test8, @function test8: link.w %a6,#0 jbsr dummy move.l 4(%a6),ret_addr unlk %a6 rts .size test8, .-test8 .align 2 .globl test9 .type test9, @function test9: link.w %a6,#0 move.l 4(%a6),ret_addr jbsr dummy unlk %a6 rts .size test9, .-test9 .align 2 .globl test10 .type test10, @function test10: link.w %a6,#0 subq.l #4,%sp move.l %sp,-(%sp) jbsr test10a unlk %a6 rts .size test10, .-test10 .align 2 .globl test10a .type test10a, @function test10a: link.w %a6,#0 move.l (%a6),%a0 move.l 4(%a0),ret_addr unlk %a6 rts .size test10a, .-test10a .align 2 .globl test11 .type test11, @function test11: link.w %a6,#0 subq.l #4,%sp move.l %sp,-(%sp) jbsr test11a unlk %a6 rts .size test11, .-test11 .align 2 .globl test11a .type test11a, @function test11a: link.w %a6,#0 jbsr dummy move.l (%a6),%a0 move.l 4(%a0),ret_addr unlk %a6 rts .size test11a, .-test11a .align 2 .globl test12 .type test12, @function test12: link.w %a6,#0 subq.l #4,%sp move.l %sp,-(%sp) jbsr test12a unlk %a6 rts .size test12, .-test12 .align 2 .globl test12a .type test12a, @function test12a: link.w %a6,#0 move.l (%a6),%a0 move.l 4(%a0),ret_addr jbsr dummy unlk %a6 rts .size test12a, .-test12a .align 2 .globl dummy .type dummy, @function dummy: link.w %a6,#0 subq.l #4,%sp move.l %sp,%a0 move.l %a0,%d0 unlk %a6 rts .size dummy, .-dummy .globl func2 .data .align 2 .type func2, @object .size func2, 24 func2: .long test7 .long test8 .long test9 .long test10 .long test11 .long test12 .text .align 2 .globl call_func2 .type call_func2, @function call_func2: link.w %a6,#0 move.l %d2,-(%sp) move.l 8(%a6),%d2 lea func2,%a0 move.l (%a0,%d2.l*4),%a0 jbsr (%a0) lea save_ret2,%a0 move.l ret_addr,(%a0,%d2.l*4) move.l -4(%a6),%d2 unlk %a6 rts .size call_func2, .-call_func2 .align 2 .globl main .type main, @function main: link.w %a6,#0 move.l %a2,-(%sp) move.l %d2,-(%sp) clr.l %d2 lea call_func1,%a2 .align 2 .L27: move.l %d2,-(%sp) jbsr (%a2) addq.l #4,%sp addq.l #1,%d2 moveq.l #5,%d0 cmp.l %d2,%d0 jbge .L27 move.l save_ret1,%d0 cmp.l save_ret1+4,%d0 jbne .L47 cmp.l save_ret1+8,%d0 jbeq .L48 .L47: jbsr abort .align 2 .L48: move.l save_ret1+12,%d1 cmp.l save_ret1+16,%d1 jbne .L47 cmp.l save_ret1+20,%d1 jbne .L47 tst.l %d1 jbeq .L32 cmp.l %d0,%d1 jbne .L47 .L32: clr.l %d2 lea call_func2,%a2 .L37: move.l %d2,-(%sp) jbsr (%a2) addq.l #4,%sp addq.l #1,%d2 moveq.l #5,%d0 cmp.l %d2,%d0 jbge .L37 move.l save_ret2,%d0 cmp.l save_ret2+4,%d0 jbne .L47 cmp.l save_ret2+8,%d0 jbne .L47 move.l save_ret2+12,%d1 cmp.l save_ret2+16,%d1 jbne .L47 cmp.l save_ret2+20,%d1 jbne .L47 tst.l %d1 jbeq .L42 cmp.l %d0,%d1 jbne .L47 .L42: clr.l -(%sp) jbsr exit nop .size main, .-main .comm save_ret1,24,2 .local ret_addr .comm ret_addr,4,2 .comm save_ret2,24,2 .ident "GCC: (GNU) 3.3.2"