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 	.section	.eh_frame,"a",@progbits
80 .Lframe1:
81 	.long	.LECIE1-.LSCIE1
82 .LSCIE1:
83 	.long	0x0
84 	.byte	0x1
85 	.string	"zR"
86 	.uleb128 0x1
87 	.sleb128 -8
88 	.byte	0x10
89 	.uleb128 0x1
90 	.byte	0x1b
91 	.byte	0xc
92 	.uleb128 0x7
93 	.uleb128 0x8
94 	.byte	0x90
95 	.uleb128 0x1
96 	.align 8
97 .LECIE1:
98 .LSFDE1:
99 	.long	.LEFDE1-.LASFDE1
100 .LASFDE1:
101 	.long	.LASFDE1-.Lframe1
102 	.long	.LFB3-.
103 	.long	.LFE3-.LFB3
104 	.uleb128 0x0
105 	.byte	0x4
106 	.long	.LCFI0-.LFB3
107 	.byte	0xe
108 	.uleb128 0x10
109 	.byte	0x86
110 	.uleb128 0x2
111 	.byte	0x4
112 	.long	.LCFI1-.LCFI0
113 	.byte	0xd
114 	.uleb128 0x6
115 	.align 8
116 .LEFDE1:
117 	.section	.note.GNU-stack,"",@progbits
118