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