diff options
author | eeh <eeh@pkgsrc.org> | 2001-02-11 19:57:58 +0000 |
---|---|---|
committer | eeh <eeh@pkgsrc.org> | 2001-02-11 19:57:58 +0000 |
commit | 1235b76ff895623d1aab7356adfc03af7f1d5597 (patch) | |
tree | ed646c183f07659390a0e1dad5718dc48efdae3e /www/mozilla/files/xptcstubs_asm_sparc64_netbsd.s | |
parent | 7774f864f9f907e053c777be1d6b41f505817c06 (diff) | |
download | pkgsrc-1235b76ff895623d1aab7356adfc03af7f1d5597.tar.gz |
Add the necessary support files for sparc64.
Diffstat (limited to 'www/mozilla/files/xptcstubs_asm_sparc64_netbsd.s')
-rw-r--r-- | www/mozilla/files/xptcstubs_asm_sparc64_netbsd.s | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/www/mozilla/files/xptcstubs_asm_sparc64_netbsd.s b/www/mozilla/files/xptcstubs_asm_sparc64_netbsd.s new file mode 100644 index 00000000000..d493a5cd21e --- /dev/null +++ b/www/mozilla/files/xptcstubs_asm_sparc64_netbsd.s @@ -0,0 +1,67 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * The contents of this file are subject to the Netscape Public + * License Version 1.1 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS + * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or + * implied. See the License for the specific language governing + * rights and limitations under the License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1999 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + */ + + .global SharedStub + +/* + in the frame for the function that called SharedStub are the + rest of the parameters we need + +*/ + +SharedStub: +! we don't create a new frame yet, but work within the frame of the calling +! function to give ourselves the other parameters we want + + mov %o0, %o1 ! shuffle the index up to 2nd place + mov %i0, %o0 ! the original 'this' + add %fp, 0x7ff+128+(2*8), %o2 ! previous stack top adjusted to the first argument slot (beyond 'this') +! save off the original incoming parameters that arrived in +! registers, the ABI guarantees the space for us to do this + st %i1, [%o2 + 0] + st %i2, [%o2 + 8] + st %i3, [%o2 + 16] + st %i4, [%o2 + 24] + st %i5, [%o2 + 32] +! now we can build our own stack frame + save %sp,-(176),%sp ! room for the register window +! our function now appears to have been called +! as SharedStub(nsISupports* that, PRUint32 index, PRUint32* args) +! so we can just copy these through + + mov %i0, %o0 + mov %i1, %o1 + mov %i2, %o2 + call PrepareAndDispatch + nop + ret + restore %o0,0,%o0 +! XXXX what's all the rest of this for? + mov %o0,%i0 ! propogate return value + b .LL1 + nop +.LL1: + ret + restore + + .size SharedStub, .-SharedStub + .type SharedStub, #function |