diff options
author | jmc <jmc@pkgsrc.org> | 2003-03-06 23:50:51 +0000 |
---|---|---|
committer | jmc <jmc@pkgsrc.org> | 2003-03-06 23:50:51 +0000 |
commit | 6ba2042c871c142698f588a60deea8ce118babc2 (patch) | |
tree | 09c08c8a3b162d7625eaf8bd4f1cd77b3b9cb2dd /devel/ffcall/files/tramp-rs6000-netbsd.s | |
parent | 4172cf6d8b4efb288ac8c920d9ef8fcf0ea50a8e (diff) | |
download | pkgsrc-6ba2042c871c142698f588a60deea8ce118babc2.tar.gz |
Port this to powerpc. Already did it once based on lang/clisp including this
code so base the port off of those patches. Passes all tests via make check
Diffstat (limited to 'devel/ffcall/files/tramp-rs6000-netbsd.s')
-rw-r--r-- | devel/ffcall/files/tramp-rs6000-netbsd.s | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/devel/ffcall/files/tramp-rs6000-netbsd.s b/devel/ffcall/files/tramp-rs6000-netbsd.s new file mode 100644 index 00000000000..758fe31f916 --- /dev/null +++ b/devel/ffcall/files/tramp-rs6000-netbsd.s @@ -0,0 +1,29 @@ +/* Trampoline for rs6000 CPU with SysV.4 ABI */ + +/* + * Copyright 1995-1999 Bruno Haible, <haible@clisp.cons.org> + * + * This is free software distributed under the GNU General Public Licence + * described in the file COPYING. Contact the author if you don't have this + * or can't live with it. There is ABSOLUTELY NO WARRANTY, explicit or implied, + * on this software. + */ + +/* Available registers: r0, r12, r11, r10, r9, r8, r7, r6, r5, r4, r3. */ +/* However, r0 is special in that it cannot be used as a base register. */ +/* And r3...r10 should not be clobbered because they contain the first 8 + * integer arguments to the function being called. + * Use r13 as it's the last possible register allocated with gcc and r11/12 + * get used during dynamic linkage. + */ + + .globl tramp +tramp: +/* Move <data> into register r13 */ + lis 13,0x7355 + ori 13,13,0x4711 +/* Get <function> */ + lis 0,0xbabe + ori 0,0,0xbec0 + mtctr 0 + bctr |