1*7a46fbe4Spfg @ 2*7a46fbe4Spfg @ Licensed to the Apache Software Foundation (ASF) under one 3*7a46fbe4Spfg @ or more contributor license agreements. See the NOTICE file 4*7a46fbe4Spfg @ distributed with this work for additional information 5*7a46fbe4Spfg @ regarding copyright ownership. The ASF licenses this file 6*7a46fbe4Spfg @ to you under the Apache License, Version 2.0 (the 7*7a46fbe4Spfg @ "License"); you may not use this file except in compliance 8*7a46fbe4Spfg @ with the License. You may obtain a copy of the License at 9*7a46fbe4Spfg @ 10*7a46fbe4Spfg @ http://www.apache.org/licenses/LICENSE-2.0 11*7a46fbe4Spfg @ 12*7a46fbe4Spfg @ Unless required by applicable law or agreed to in writing, 13*7a46fbe4Spfg @ software distributed under the License is distributed on an 14*7a46fbe4Spfg @ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15*7a46fbe4Spfg @ KIND, either express or implied. See the License for the 16*7a46fbe4Spfg @ specific language governing permissions and limitations 17*7a46fbe4Spfg @ under the License. 18*7a46fbe4Spfg @ 19*7a46fbe4Spfg 20*7a46fbe4Spfg @ ARM support code for OpenOffice C++/UNO bridging 21*7a46fbe4Spfg @ 22*7a46fbe4Spfg @ Written by Peter Naulls <peter@chocky.org> 23*7a46fbe4Spfg @ Modified by Caolan McNamara <caolanm@redhat.com> 24*7a46fbe4Spfg @ Fixed by Michael Casadevall <mcasadevall@kubuntu.org> 25*7a46fbe4Spfg 26*7a46fbe4Spfg #ifdef __ARM_EABI__ 27*7a46fbe4Spfg # define UNWIND 28*7a46fbe4Spfg #else 29*7a46fbe4Spfg # define UNWIND @ 30*7a46fbe4Spfg #endif 31*7a46fbe4Spfg 32*7a46fbe4Spfg .file "armhelper.s" 33*7a46fbe4Spfg .text 34*7a46fbe4Spfg .align 4 35*7a46fbe4Spfg .global privateSnippetExecutor 36*7a46fbe4Spfg .type privateSnippetExecutor, %function 37*7a46fbe4Spfg privateSnippetExecutor: 38*7a46fbe4Spfg UNWIND .fnstart @ start of unwinder entry 39*7a46fbe4Spfg 40*7a46fbe4Spfg stmfd sp!, {r0-r3} @ follow other parameters on stack 41*7a46fbe4Spfg UNWIND .pad #16 @ throw this data away on exception 42*7a46fbe4Spfg mov r0, ip @ r0 points to functionoffset/vtable 43*7a46fbe4Spfg mov r1, sp @ r1 points to this and params 44*7a46fbe4Spfg @ (see cppuno.cxx:codeSnippet()) 45*7a46fbe4Spfg stmfd sp!, {r4,lr} @ save return address 46*7a46fbe4Spfg @ (r4 pushed to preserve stack alignment) 47*7a46fbe4Spfg UNWIND .save {r4,lr} @ restore these regs on exception 48*7a46fbe4Spfg 49*7a46fbe4Spfg bl cpp_vtable_call(PLT) 50*7a46fbe4Spfg 51*7a46fbe4Spfg add sp, sp, #4 @ no need to restore r4 (we didn't touch it) 52*7a46fbe4Spfg ldr pc, [sp], #20 @ return, discarding function arguments 53*7a46fbe4Spfg 54*7a46fbe4Spfg UNWIND .fnend @ end of unwinder entry 55*7a46fbe4Spfg 56*7a46fbe4Spfg .size privateSnippetExecutor, . - privateSnippetExecutor 57*7a46fbe4Spfg .section .note.GNU-stack,"",%progbits 58