1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 	.text
23 	.align 2
24 .globl privateSnippetExecutor
25 	.type	privateSnippetExecutor, @function
26 privateSnippetExecutor:
27 .LFB3:
28 	pushq	%rbp
29 .LCFI0:
30 	movq	%rsp, %rbp
31 .LCFI1:
32 	subq	$160, %rsp
33 .LCFI2:
34 	movq	%r10, -152(%rbp)		# Save (nVtableOffset << 32) + nFunctionIndex
35 
36 	movq	%rdi, -112(%rbp)		# Save GP registers
37 	movq	%rsi, -104(%rbp)
38 	movq	%rdx, -96(%rbp)
39 	movq	%rcx, -88(%rbp)
40 	movq	%r8 , -80(%rbp)
41 	movq	%r9 , -72(%rbp)
42 
43 	movsd	%xmm0, -64(%rbp)		# Save FP registers
44 	movsd	%xmm1, -56(%rbp)
45 	movsd	%xmm2, -48(%rbp)
46 	movsd	%xmm3, -40(%rbp)
47 	movsd	%xmm4, -32(%rbp)
48 	movsd	%xmm5, -24(%rbp)
49 	movsd	%xmm6, -16(%rbp)
50 	movsd	%xmm7, -8(%rbp)
51 
52 	leaq	-144(%rbp), %r9			# 6th param: sal_uInt64 * pRegisterReturn
53 	leaq	16(%rbp), %r8			# 5rd param: void ** ovrflw
54 	leaq	-64(%rbp), %rcx			# 4th param: void ** fpreg
55 	leaq	-112(%rbp), %rdx		# 3rd param: void ** gpreg
56 	movl	-148(%rbp), %esi		# 2nd param: sal_int32 nVtableOffset
57 	movl	-152(%rbp), %edi		# 1st param: sal_int32 nFunctionIndex
58 
59 	call	cpp_vtable_call
60 
61 	cmp	$10, %rax					# typelib_TypeClass_FLOAT
62 	je	.Lfloat
63 	cmp	$11, %rax					# typelib_TypeClass_DOUBLE
64 	je	.Lfloat
65 
66 	movq	-144(%rbp), %rax		# Return value (int case)
67 	movq	-136(%rbp), %rdx		# Return value (int case)
68 	movq	-144(%rbp), %xmm0		# Return value (int case)
69 	movq	-136(%rbp), %xmm1		# Return value (int case)
70 	jmp	.Lfinish
71 .Lfloat:
72 	movlpd	-144(%rbp), %xmm0		# Return value (float/double case)
73 
74 .Lfinish:
75 	leave
76 	ret
77 .LFE3:
78 	.size	privateSnippetExecutor, .-privateSnippetExecutor
79 	# see http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
80 	# for details of the .eh_frame, the "Common Information Entry" and "Frame Description Entry" formats
81 	# and http://mentorembedded.github.io/cxx-abi/exceptions.pdf for more info
82 	.section	.eh_frame,"a",@progbits
83 .Lframe1:
84 	.long	.LECIE1-.LSCIE1
85 .LSCIE1:
86 	.long	0x0
87 	.byte	0x1
88 	.string	"zR"
89 	.uleb128 0x1
90 	.sleb128 -8
91 	.byte	0x10
92 	.uleb128 0x1
93 	.byte	0x1b
94 	.byte	0xc
95 	.uleb128 0x7
96 	.uleb128 0x8
97 	.byte	0x90
98 	.uleb128 0x1
99 	.align 8
100 .LECIE1:
101 .LSFDE1:
102 	.long	.LEFDE1-.LASFDE1
103 .LASFDE1:
104 	.long	.LASFDE1-.Lframe1
105 	.long	.LFB3-.
106 	.long	.LFE3-.LFB3
107 	.uleb128 0x0
108 	.byte	0x4
109 	.long	.LCFI0-.LFB3
110 	.byte	0xe
111 	.uleb128 0x10
112 	.byte	0x86
113 	.uleb128 0x2
114 	.byte	0x4
115 	.long	.LCFI1-.LCFI0
116 	.byte	0xd
117 	.uleb128 0x6
118 	.align 8
119 .LEFDE1:
120 	.section	.note.GNU-stack,"",@progbits
121