1# Test generation of unwind tables 2 .text 3foo: @ Simple function 4 .fnstart 5 .save {r4, lr} 6 mov r0, #0 7 .fnend 8foo1: @ Typical frame pointer prologue 9 .fnstart 10 .movsp ip 11 @mov ip, sp 12 .pad #4 13 .save {fp, ip, lr} 14 @stmfd sp!, {fp, ip, lr, pc} 15 .setfp fp, ip, #4 16 @sub fp, ip, #4 17 mov r0, #1 18 .fnend 19foo2: @ Custom personality routine 20 .fnstart 21 .save {r1, r4, r6, lr} 22 @stmfd {r1, r4, r6, lr} 23 mov r0, #2 24 .personality foo 25 .handlerdata 26 .word 42 27 .fnend 28foo3: @ Saving iwmmxt registers 29 .fnstart 30 .save {wr12} 31 .save {wr13} 32 .save {wr11} 33 .save {wr10} 34 .save {wr10, wr11} 35 .save {wr0} 36 mov r0, #3 37 .fnend 38 .code 16 39foo4: @ Thumb frame pointer 40 .fnstart 41 .save {r7, lr} 42 @push {r7, lr} 43 .setfp r7, sp 44 @mov r7, sp 45 .pad #8 46 @sub sp, sp, #8 47 mov r0, #4 48 .fnend 49foo5: @ Save r0-r3 only. 50 .fnstart 51 .save {r0, r1, r2, r3} 52 mov r0, #5 53 .fnend 54 .code 32 55foo6: @ Nested function with frame pointer 56 .fnstart 57 .pad #4 58 @push {ip} 59 .movsp ip, #4 60 @mov ip, sp 61 .pad #4 62 .save {fp, ip, lr} 63 @stmfd sp!, {fp, ip, lr, pc} 64 .setfp fp, ip, #-8 65 @sub fp, ip, #8 66 mov r0, #6 67 .fnend 68