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