1*53f566e0SPedro Giffuni !/**************************************************************
2*53f566e0SPedro Giffuni ! *
3*53f566e0SPedro Giffuni ! * Licensed to the Apache Software Foundation (ASF) under one
4*53f566e0SPedro Giffuni ! * or more contributor license agreements.  See the NOTICE file
5*53f566e0SPedro Giffuni ! * distributed with this work for additional information
6*53f566e0SPedro Giffuni ! * regarding copyright ownership.  The ASF licenses this file
7*53f566e0SPedro Giffuni ! * to you under the Apache License, Version 2.0 (the
8*53f566e0SPedro Giffuni ! * "License"); you may not use this file except in compliance
9*53f566e0SPedro Giffuni ! * with the License.  You may obtain a copy of the License at
10*53f566e0SPedro Giffuni ! *
11*53f566e0SPedro Giffuni ! *   http://www.apache.org/licenses/LICENSE-2.0
12*53f566e0SPedro Giffuni ! *
13*53f566e0SPedro Giffuni ! * Unless required by applicable law or agreed to in writing,
14*53f566e0SPedro Giffuni ! * software distributed under the License is distributed on an
15*53f566e0SPedro Giffuni ! * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*53f566e0SPedro Giffuni ! * KIND, either express or implied.  See the License for the
17*53f566e0SPedro Giffuni ! * specific language governing permissions and limitations
18*53f566e0SPedro Giffuni ! * under the License.
19*53f566e0SPedro Giffuni ! *
20*53f566e0SPedro Giffuni ! *************************************************************/
21b5da552cSAndrew Rist 
22b5da552cSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir .global vtableCall
25cdf0e10cSrcweir 
26cdf0e10cSrcweir .global vtableSlotCall
27cdf0e10cSrcweir .align 8
28cdf0e10cSrcweir vtableSlotCall:
29cdf0e10cSrcweir     ! save %sp, -176, %sp  already done in code snippet
30cdf0e10cSrcweir     stx %i0, [%fp + 2047 + 128]
31cdf0e10cSrcweir     stx %i1, [%fp + 2047 + 136]
32cdf0e10cSrcweir     stx %i2, [%fp + 2047 + 144]
33cdf0e10cSrcweir     stx %i3, [%fp + 2047 + 152]
34cdf0e10cSrcweir     stx %i4, [%fp + 2047 + 160]
35cdf0e10cSrcweir     stx %i5, [%fp + 2047 + 168]
36cdf0e10cSrcweir     ! %o0: functionIndex, stored by code snippet
37cdf0e10cSrcweir     ! %o1: vtableOffset, stored by code snippet
38cdf0e10cSrcweir     call vtableCall
39cdf0e10cSrcweir     add %fp, 2047 + 128, %o2
40cdf0e10cSrcweir     ldx [%fp + 2047 + 128], %i0
41cdf0e10cSrcweir     ldx [%fp + 2047 + 136], %i1
42cdf0e10cSrcweir     ldx [%fp + 2047 + 144], %i2
43cdf0e10cSrcweir     ldx [%fp + 2047 + 152], %i3
44cdf0e10cSrcweir     ret
45cdf0e10cSrcweir     restore
46cdf0e10cSrcweir .size vtableSlotCall, . - vtableSlotCall
47cdf0e10cSrcweir .type vtableSlotCall, #function
48