1@ ARM support code for OpenOffice C++/UNO bridging 2@ 3@ Written by Peter Naulls <peter@chocky.org> 4@ Modified by Caolan McNamara <caolanm@redhat.com> 5@ Fixed by Michael Casadevall <mcasadevall@kubuntu.org> 6 7#ifdef __ARM_EABI__ 8# define UNWIND 9#else 10# define UNWIND @ 11#endif 12 13 .file "armhelper.s" 14 .text 15 .align 4 16 .global privateSnippetExecutor 17 .type privateSnippetExecutor, %function 18privateSnippetExecutor: 19 UNWIND .fnstart @ start of unwinder entry 20 21 stmfd sp!, {r0-r3} @ follow other parameters on stack 22 UNWIND .pad #16 @ throw this data away on exception 23 mov r0, ip @ r0 points to functionoffset/vtable 24 mov r1, sp @ r1 points to this and params 25 @ (see cppuno.cxx:codeSnippet()) 26 stmfd sp!, {r4,lr} @ save return address 27 @ (r4 pushed to preserve stack alignment) 28 UNWIND .save {r4,lr} @ restore these regs on exception 29 30 bl cpp_vtable_call(PLT) 31 32 add sp, sp, #4 @ no need to restore r4 (we didn't touch it) 33 ldr pc, [sp], #20 @ return, discarding function arguments 34 35 UNWIND .fnend @ end of unwinder entry 36 37 .size privateSnippetExecutor, . - privateSnippetExecutor 38 .section .note.GNU-stack,"",%progbits 39