1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3
* The contents of this file are subject to the Netscape Public
4
* License Version 1.1 (the "License"); you may not use this file
5
* except in compliance with the License. You may obtain a copy of
6
* the License at http://www.mozilla.org/NPL/
8
* Software distributed under the License is distributed on an "AS
9
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
10
* implied. See the License for the specific language governing
11
* rights and limitations under the License.
13
* The Original Code is mozilla.org code.
15
* The Initial Developer of the Original Code is Netscape
16
* Communications Corporation. Portions created by Netscape are
17
* Copyright (C) 1999 Netscape Communications Corporation. All
26
in the frame for the function that called SharedStub are the
27
rest of the parameters we need
32
! we don't create a new frame yet, but work within the frame of the calling
33
! function to give ourselves the other parameters we want
35
mov %o0, %o1 ! shuffle the index up to 2nd place
36
mov %i0, %o0 ! the original 'this'
37
add %fp, 72, %o2 ! previous stack top adjusted to the first argument slot (beyond 'this')
38
! save off the original incoming parameters that arrived in
39
! registers, the ABI guarantees the space for us to do this
45
! now we can build our own stack frame
46
save %sp,-(64 + 32),%sp ! room for the register window and
47
! struct pointer, rounded up to 0 % 32
48
! our function now appears to have been called
49
! as SharedStub(nsISupports* that, PRUint32 index, PRUint32* args)
50
! so we can just copy these through
55
call PrepareAndDispatch
57
mov %o0,%i0 ! propagate return value
64
.size SharedStub, .-SharedStub
65
.type SharedStub, #function