summaryrefslogtreecommitdiff
path: root/lang/clisp
diff options
context:
space:
mode:
authorjmc <jmc>2002-03-14 07:44:21 +0000
committerjmc <jmc>2002-03-14 07:44:21 +0000
commitb8cf86660f5d0c315d5a5f3793566c4d1a683d03 (patch)
tree63e057b891075c39a48955327a50faa07c936427 /lang/clisp
parentfaaae470443c4cfe1edc70e3987be929cfa54624 (diff)
downloadpkgsrc-b8cf86660f5d0c315d5a5f3793566c4d1a683d03.tar.gz
Port to powerpc:
Provide a trampoline implementation that doesn't presume r11 is free (it's not in dynamically linked programs and the ELF ABI says as much but somehow linux managed to avoid this it seems). Use r13 for the time being since while gcc will allocate it, it's the last "local" one allocated so none of the clisp code hits that (nothing needed 17+ local registers in use ever). Update the vacall implementation to match the trampoline calls but otherwise for any assembly use the linux code. Make these changes specific to netbsd, update the test cases so everything works. This now passes all the clisp tests when done/installed.
Diffstat (limited to 'lang/clisp')
-rw-r--r--lang/clisp/Makefile8
-rw-r--r--lang/clisp/distinfo9
-rw-r--r--lang/clisp/files/tramp-rs6000-netbsd.obin0 -> 487 bytes
-rw-r--r--lang/clisp/files/tramp-rs6000-netbsd.s29
-rw-r--r--lang/clisp/files/vacall-rs6000-netbsd.s159
-rw-r--r--lang/clisp/patches/patch-ab20
-rw-r--r--lang/clisp/patches/patch-ac18
-rw-r--r--lang/clisp/patches/patch-ad19
-rw-r--r--lang/clisp/patches/patch-ae13
-rw-r--r--lang/clisp/patches/patch-af22
-rw-r--r--lang/clisp/patches/patch-ag16
-rw-r--r--lang/clisp/patches/patch-ah79
12 files changed, 390 insertions, 2 deletions
diff --git a/lang/clisp/Makefile b/lang/clisp/Makefile
index 2dcd17a795f..180fdf1383a 100644
--- a/lang/clisp/Makefile
+++ b/lang/clisp/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.23 2002/02/21 04:13:20 dillo Exp $
+# $NetBSD: Makefile,v 1.24 2002/03/14 07:44:21 jmc Exp $
DISTNAME= clisp-2.27
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=clisp/}
+PKGVERSION= 1
EXTRACT_SUFX= .tar.bz2
MAINTAINER= mjl@netbsd.org
@@ -24,6 +25,11 @@ LIBTOOL_OVERRIDE+= ${WRKSRC}/callback/trampoline_r/libtool
LIBTOOL_OVERRIDE+= ${WRKSRC}/libiconv/libcharset/libtool
LIBTOOL_OVERRIDE+= ${WRKSRC}/libiconv/libtool ${WRKSRC}/sigsegv/libtool
+post-patch:
+ cp files/tramp-rs6000-netbsd.o ${WRKSRC}/../ffcall/callback/trampoline_r
+ cp files/tramp-rs6000-netbsd.s ${WRKSRC}/../ffcall/callback/trampoline_r
+ cp files/vacall-rs6000-netbsd.s ${WRKSRC}/../ffcall/callback/vacall_r
+
do-configure:
cd ${WRKSRC}; \
(cd .. ; ${SETENV} ${CONFIGURE_ENV} \
diff --git a/lang/clisp/distinfo b/lang/clisp/distinfo
index 5086efc8354..b0f33ab7165 100644
--- a/lang/clisp/distinfo
+++ b/lang/clisp/distinfo
@@ -1,5 +1,12 @@
-$NetBSD: distinfo,v 1.3 2002/02/21 04:13:21 dillo Exp $
+$NetBSD: distinfo,v 1.4 2002/03/14 07:44:22 jmc Exp $
SHA1 (clisp-2.27.tar.bz2) = ee0a9bfcb9c4d86bdcb8e0bfd3b9ff3defe4c1a8
Size (clisp-2.27.tar.bz2) = 8965902 bytes
SHA1 (patch-aa) = 1151b28bf18cd4a3137f014c66e6a0d09da1756e
+SHA1 (patch-ab) = 0e56664e15f66c2d8c5465aa3b0dd8493e50a179
+SHA1 (patch-ac) = 25e3fe8944ae8d7aa6c7d44c075d5f9d2d12c31e
+SHA1 (patch-ad) = 18d3a6973ca29fd10b73f6f49a0801a4db24605e
+SHA1 (patch-ae) = 5f60ddf54028a724c4d6be391645383874642042
+SHA1 (patch-af) = 0d14872e6c7efa32361c6722b6d8ae6e8cb05902
+SHA1 (patch-ag) = 25d995296e3af6ad007d11508e3ef9bb4a990164
+SHA1 (patch-ah) = e230ba8eeb1e7a2fe363aa99d4e7094446c9ab1f
diff --git a/lang/clisp/files/tramp-rs6000-netbsd.o b/lang/clisp/files/tramp-rs6000-netbsd.o
new file mode 100644
index 00000000000..ef578f6b491
--- /dev/null
+++ b/lang/clisp/files/tramp-rs6000-netbsd.o
Binary files differ
diff --git a/lang/clisp/files/tramp-rs6000-netbsd.s b/lang/clisp/files/tramp-rs6000-netbsd.s
new file mode 100644
index 00000000000..758fe31f916
--- /dev/null
+++ b/lang/clisp/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
diff --git a/lang/clisp/files/vacall-rs6000-netbsd.s b/lang/clisp/files/vacall-rs6000-netbsd.s
new file mode 100644
index 00000000000..3486025a314
--- /dev/null
+++ b/lang/clisp/files/vacall-rs6000-netbsd.s
@@ -0,0 +1,159 @@
+ .file "vacall-rs6000.c"
+gcc2_compiled.:
+ .section ".text"
+ .align 2
+ .globl __vacall_r
+ .type __vacall_r,@function
+__vacall_r:
+ stwu 1,-208(1)
+ mflr 0
+ stw 0,212(1)
+ stw 3,152(1)
+ stw 4,156(1)
+ stw 5,160(1)
+ stw 6,164(1)
+ stw 7,168(1)
+ stw 8,172(1)
+ stw 9,176(1)
+ stw 10,180(1)
+ stfd 1,48(1)
+ stfd 2,56(1)
+ stfd 3,64(1)
+ stfd 4,72(1)
+ stfd 5,80(1)
+ stfd 6,88(1)
+ stfd 7,96(1)
+ stfd 8,104(1)
+ li 9,0
+ stw 9,8(1)
+ addi 0,1,152
+ stw 0,12(1)
+ addi 0,1,216
+ stw 0,184(1)
+ stw 9,188(1)
+ stw 9,16(1)
+ stw 9,20(1)
+ addi 0,1,48
+ stw 0,40(1)
+ lwz 9,0(13)
+ lwz 3,4(13)
+ addi 4,1,8
+ mtlr 9
+ blrl
+ lwz 0,20(1)
+ cmpwi 0,0,0
+ bc 12,2,.L4
+ cmpwi 0,0,1
+ bc 12,2,.L42
+ lwz 0,20(1)
+ cmpwi 0,0,2
+ bc 4,2,.L7
+ lbz 0,32(1)
+ extsb 3,0
+ b .L4
+.L7:
+ lwz 0,20(1)
+ cmpwi 0,0,3
+ bc 4,2,.L9
+.L42:
+ lbz 3,32(1)
+ b .L4
+.L9:
+ lwz 0,20(1)
+ cmpwi 0,0,4
+ bc 4,2,.L11
+ lha 3,32(1)
+ b .L4
+.L11:
+ lwz 0,20(1)
+ cmpwi 0,0,5
+ bc 4,2,.L13
+ lhz 3,32(1)
+ b .L4
+.L13:
+ lwz 0,20(1)
+ cmpwi 0,0,6
+ bc 12,2,.L43
+ lwz 0,20(1)
+ cmpwi 0,0,7
+ bc 12,2,.L43
+ lwz 0,20(1)
+ cmpwi 0,0,8
+ bc 12,2,.L43
+ lwz 0,20(1)
+ cmpwi 0,0,9
+ bc 12,2,.L43
+ lwz 9,20(1)
+ addi 9,9,-10
+ cmplwi 0,9,1
+ bc 12,1,.L23
+ lwz 3,32(1)
+ lwz 4,36(1)
+ b .L4
+.L23:
+ lwz 0,20(1)
+ cmpwi 0,0,12
+ bc 4,2,.L25
+ lfs 1,32(1)
+ b .L4
+.L25:
+ lwz 0,20(1)
+ cmpwi 0,0,13
+ bc 4,2,.L27
+ lfd 1,32(1)
+ b .L4
+.L27:
+ lwz 0,20(1)
+ cmpwi 0,0,14
+ bc 4,2,.L29
+.L43:
+ lwz 3,32(1)
+ b .L4
+.L29:
+ lwz 0,20(1)
+ cmpwi 0,0,15
+ bc 4,2,.L4
+ lwz 0,8(1)
+ andi. 9,0,1
+ bc 12,2,.L32
+ lwz 3,16(1)
+ b .L4
+.L32:
+ lwz 0,8(1)
+ andi. 9,0,1024
+ bc 12,2,.L4
+ lwz 0,24(1)
+ cmpwi 0,0,1
+ bc 4,2,.L35
+ lwz 9,16(1)
+ lbz 3,0(9)
+ b .L4
+.L35:
+ lwz 0,24(1)
+ cmpwi 0,0,2
+ bc 4,2,.L37
+ lwz 9,16(1)
+ lhz 3,0(9)
+ b .L4
+.L37:
+ lwz 0,24(1)
+ cmpwi 0,0,4
+ bc 4,2,.L39
+ lwz 9,16(1)
+ lwz 3,0(9)
+ b .L4
+.L39:
+ lwz 0,24(1)
+ cmpwi 0,0,8
+ bc 4,2,.L4
+ lwz 9,16(1)
+ lwz 3,0(9)
+ lwz 4,4(9)
+.L4:
+ lwz 0,212(1)
+ mtlr 0
+ la 1,208(1)
+ blr
+.Lfe1:
+ .size __vacall_r,.Lfe1-__vacall_r
+ .ident "GCC: (GNU) 2.95.2 19991024 (release/franzo)"
diff --git a/lang/clisp/patches/patch-ab b/lang/clisp/patches/patch-ab
new file mode 100644
index 00000000000..f5b51f87779
--- /dev/null
+++ b/lang/clisp/patches/patch-ab
@@ -0,0 +1,20 @@
+$NetBSD: patch-ab,v 1.4 2002/03/14 07:44:23 jmc Exp $
+
+--- .././ffcall/avcall/Makefile.in.orig Tue Jun 12 07:31:01 2001
++++ .././ffcall/avcall/Makefile.in Wed Mar 6 05:38:16 2002
+@@ -117,12 +117,12 @@
+ case "$(OS)" in \
+ aix3*) syntax=aix.old;; \
+ aix*) syntax=aix.new;; \
+- linux*) syntax=linux;; \
++ linux* | netbsd*) syntax=linux;; \
+ *) syntax=sysv4;; \
+ esac; \
+ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/avcall-rs6000-$${syntax}.s ; \
+- cp avcall-rs6000-$${syntax}.lo avcall-rs6000.lo ; rm -f avcall-rs6000-$${syntax}.lo ; \
+- if test -f avcall-rs6000-$${syntax}.o; then mv avcall-rs6000-$${syntax}.o avcall-rs6000.o; fi
++ cp avcall-rs6000-$${syntax}.lo avcall-rs6000.lo ; \
++ if test -f avcall-rs6000-$${syntax}.o; then cp avcall-rs6000-$${syntax}.o avcall-rs6000.o; fi
+
+ avcall-m88k.lo : $(srcdir)/avcall-m88k.s
+ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/avcall-m88k.s
diff --git a/lang/clisp/patches/patch-ac b/lang/clisp/patches/patch-ac
new file mode 100644
index 00000000000..f7293a7d226
--- /dev/null
+++ b/lang/clisp/patches/patch-ac
@@ -0,0 +1,18 @@
+$NetBSD: patch-ac,v 1.4 2002/03/14 07:44:23 jmc Exp $
+
+--- .././ffcall/vacall/Makefile.in.orig Tue Mar 5 09:50:39 2002
++++ .././ffcall/vacall/Makefile.in Wed Mar 6 05:38:50 2002
+@@ -108,11 +108,11 @@
+ case "$(OS)" in \
+ aix3*) syntax=aix.old;; \
+ aix*) syntax=aix.new;; \
+- linux*) syntax=linux;; \
++ linux* | netbsd*) syntax=linux;; \
+ *) syntax=sysv4;; \
+ esac; \
+ $(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-rs6000-$${syntax}.s ; \
+- mv vacall-rs6000-$${syntax}.o vacall-rs6000.o
++ cp vacall-rs6000-$${syntax}.o vacall-rs6000.o
+
+ vacall-m88k.o : $(srcdir)/vacall-m88k.s
+ $(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-m88k.s
diff --git a/lang/clisp/patches/patch-ad b/lang/clisp/patches/patch-ad
new file mode 100644
index 00000000000..a3ae8a80c97
--- /dev/null
+++ b/lang/clisp/patches/patch-ad
@@ -0,0 +1,19 @@
+$NetBSD: patch-ad,v 1.4 2002/03/14 07:44:23 jmc Exp $
+
+--- ../ffcall/callback/vacall_r/Makefile.in.orig Tue Jun 12 07:31:01 2001
++++ ../ffcall/callback/vacall_r/Makefile.in Thu Mar 14 07:13:43 2002
+@@ -118,11 +118,12 @@
+ aix3*) syntax=aix.old;; \
+ aix*) syntax=aix.new;; \
+ linux*) syntax=linux;; \
++ netbsd*) syntax=netbsd;; \
+ *) syntax=sysv4;; \
+ esac; \
+ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-rs6000-$${syntax}.s ; \
+- cp vacall-rs6000-$${syntax}.lo vacall-rs6000.lo ; rm -f vacall-rs6000-$${syntax}.lo ; \
+- if test -f vacall-rs6000-$${syntax}.o; then mv vacall-rs6000-$${syntax}.o vacall-rs6000.o; fi
++ cp vacall-rs6000-$${syntax}.lo vacall-rs6000.lo ; \
++ if test -f vacall-rs6000-$${syntax}.o; then cp vacall-rs6000-$${syntax}.o vacall-rs6000.o; fi
+
+ vacall-m88k.lo : $(srcdir)/vacall-m88k.s
+ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/vacall-m88k.s
diff --git a/lang/clisp/patches/patch-ae b/lang/clisp/patches/patch-ae
new file mode 100644
index 00000000000..eb56286eca0
--- /dev/null
+++ b/lang/clisp/patches/patch-ae
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.4 2002/03/14 07:44:23 jmc Exp $
+
+--- ../ffcall/callback/trampoline_r/Makefile.in.orig Tue Mar 5 09:57:45 2002
++++ ../ffcall/callback/trampoline_r/Makefile.in Tue Mar 5 09:57:54 2002
+@@ -90,7 +90,7 @@
+ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/cache-hppa.s
+
+ cache-rs6000.lo : $(srcdir)/cache-rs6000-sysv4.s
+- $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/cache-rs6000-sysv4.s ; mv -f cache-rs6000-sysv4.o cache-rs6000.o ; mv -f cache-rs6000-sysv4.lo cache-rs6000.lo
++ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/cache-rs6000-sysv4.s ; cp cache-rs6000-sysv4.o cache-rs6000.o ; mv cache-rs6000-sysv4.lo cache-rs6000.lo
+
+ cache-convex.lo : $(srcdir)/cache-convex.s
+ $(LIBTOOL_COMPILE) $(CC) @GCC_X_NONE@ -c $(srcdir)/cache-convex.s
diff --git a/lang/clisp/patches/patch-af b/lang/clisp/patches/patch-af
new file mode 100644
index 00000000000..9bcde07ce0d
--- /dev/null
+++ b/lang/clisp/patches/patch-af
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.3 2002/03/14 07:44:23 jmc Exp $
+
+--- lispbibl.d.orig Tue Mar 5 20:53:41 2002
++++ lispbibl.d Tue Mar 5 20:55:32 2002
+@@ -1400,7 +1400,7 @@
+ #define intBWsize intBsize
+ #define intWLsize intWsize
+ #define intBWLsize intBsize
+- #elif (defined(MC680X0) && defined(HPUX_ASSEMBLER)) || defined(SPARC) || defined(HPPA) || defined(MIPS) || defined(M88000) || defined(RS6000) || defined(CONVEX) || defined(S390)
++ #elif (defined(MC680X0) && defined(HPUX_ASSEMBLER)) || defined(SPARC) || defined(HPPA) || defined(MIPS) || defined(M88000) || defined(RS6000) || defined(CONVEX) || defined(S390) || defined(__powerpc__)
+ # Der Sparc-Prozessor kann mit uintB und uintW schlecht rechnen.
+ # Anderen 32-Bit-Prozessoren geht es genauso.
+ #define intBWsize intWsize
+@@ -1593,7 +1593,7 @@
+ #define intDsize 16
+ #define intDDsize 32 # = 2*intDsize
+ #define log2_intDsize 4 # = log2(intDsize)
+- #elif defined(MC680Y0) || defined(I80386) || defined(SPARC) || defined(HPPA) || defined(MIPS) || defined(M88000) || defined(RS6000) || defined(VAX) || defined(CONVEX) || defined(ARM) || defined(DECALPHA) || defined(IA64) || defined(S390)
++ #elif defined(MC680Y0) || defined(I80386) || defined(SPARC) || defined(HPPA) || defined(MIPS) || defined(M88000) || defined(RS6000) || defined(VAX) || defined(CONVEX) || defined(ARM) || defined(DECALPHA) || defined(IA64) || defined(S390) || defined(__powerpc__)
+ #define intDsize 32
+ #define intDDsize 64 # = 2*intDsize
+ #define log2_intDsize 5 # = log2(intDsize)
diff --git a/lang/clisp/patches/patch-ag b/lang/clisp/patches/patch-ag
new file mode 100644
index 00000000000..788019f9d13
--- /dev/null
+++ b/lang/clisp/patches/patch-ag
@@ -0,0 +1,16 @@
+$NetBSD: patch-ag,v 1.1 2002/03/14 07:44:23 jmc Exp $
+
+--- ../ffcall/callback/trampoline_r/test1.c.orig Thu Mar 14 07:22:04 2002
++++ ../ffcall/callback/trampoline_r/test1.c Thu Mar 14 07:22:07 2002
+@@ -69,7 +69,11 @@
+ register void* env __asm__("r12");
+ #endif
+ #ifdef __rs6000__
++#ifdef __NetBSD__
++register void* env __asm__("r13");
++#else
+ register void* env __asm__("r11");
++#endif
+ #endif
+ #ifdef __m88k__
+ register void* env __asm__("r11");
diff --git a/lang/clisp/patches/patch-ah b/lang/clisp/patches/patch-ah
new file mode 100644
index 00000000000..c44067c027b
--- /dev/null
+++ b/lang/clisp/patches/patch-ah
@@ -0,0 +1,79 @@
+$NetBSD: patch-ah,v 1.1 2002/03/14 07:44:23 jmc Exp $
+
+--- ../ffcall/callback/trampoline_r/trampoline.c.orig Thu Mar 14 07:23:32 2002
++++ ../ffcall/callback/trampoline_r/trampoline.c Thu Mar 14 07:23:35 2002
+@@ -21,12 +21,16 @@
+ #endif
+ #endif
+ #if defined(__rs6000__)
++#if defined(__NetBSD__)
++#define __powerpcnetbsd__
++#else
+ #if !defined(_AIX)
+ #define __rs6000sysv4__ /* SysV.4 ABI, real machine code. */
+ #else
+ #define __rs6000aix__ /* AIX ABI, just a closure. */
+ #endif
+ #endif
++#endif
+ #if defined(__hppanew__)
+ /*
+ * A function pointer is a biased pointer to a data area whose first word
+@@ -259,7 +263,7 @@
+ #include <sys/syslocal.h>
+ #endif
+ /* Inline assembly function for instruction cache flush. */
+-#if defined(__sparc__) || defined(__sparc64__) || defined(__alpha__) || defined(__hppaold__) || defined(__rs6000sysv4__) || defined(__convex__)
++#if defined(__sparc__) || defined(__sparc64__) || defined(__alpha__) || defined(__hppaold__) || defined(__rs6000sysv4__) || defined(__convex__) || defined(__powerpcnetbsd__)
+ #ifdef __GNUC__
+ extern inline
+ #if defined(__sparc__) || defined(__sparc64__)
+@@ -336,7 +340,7 @@
+ #define TRAMP_LENGTH 32
+ #define TRAMP_ALIGN 4
+ #endif
+-#ifdef __rs6000sysv4__
++#if defined(__rs6000sysv4__) || defined(__powerpcnetbsd__)
+ #define TRAMP_LENGTH 24
+ #define TRAMP_ALIGN 4
+ #endif
+@@ -872,6 +876,39 @@
+ #define is_tramp(function) \
+ *(unsigned short *) (function + 0) == 0x3D60 && \
+ *(unsigned short *) (function + 4) == 0x616B && \
++ *(unsigned short *) (function + 8) == 0x3C00 && \
++ *(unsigned short *) (function +12) == 0x6000 && \
++ *(unsigned long *) (function +16) == 0x7C0903A6 && \
++ *(unsigned long *) (function +20) == 0x4E800420
++#define hilo(hiword,loword) \
++ (((unsigned long) (hiword) << 16) | (unsigned long) (loword))
++#define tramp_address(function) \
++ hilo(*(unsigned short *) (function +10), *(unsigned short *) (function +14))
++#define tramp_data(function) \
++ hilo(*(unsigned short *) (function + 2), *(unsigned short *) (function + 6))
++#endif
++#ifdef __powerpcnetbsd__
++ /* function:
++ * {liu|lis} 13,hi16(<data>) 3D A0 hi16(<data>)
++ * {oril|ori} 13,13,lo16(<data>) 61 AD lo16(<data>)
++ * {liu|lis} 0,hi16(<address>) 3C 00 hi16(<address>)
++ * {oril|ori} 0,0,lo16(<address>) 60 00 lo16(<address>)
++ * mtctr 0 7C 09 03 A6
++ * bctr 4E 80 04 20
++ */
++ *(short *) (function + 0) = 0x3DA0;
++ *(short *) (function + 2) = (unsigned long) data >> 16;
++ *(short *) (function + 4) = 0x61AD;
++ *(short *) (function + 6) = (unsigned long) data & 0xffff;
++ *(short *) (function + 8) = 0x3C00;
++ *(short *) (function +10) = (unsigned long) address >> 16;
++ *(short *) (function +12) = 0x6000;
++ *(short *) (function +14) = (unsigned long) address & 0xffff;
++ *(long *) (function +16) = 0x7C0903A6;
++ *(long *) (function +20) = 0x4E800420;
++#define is_tramp(function) \
++ *(unsigned short *) (function + 0) == 0x3DA0 && \
++ *(unsigned short *) (function + 4) == 0x61AD && \
+ *(unsigned short *) (function + 8) == 0x3C00 && \
+ *(unsigned short *) (function +12) == 0x6000 && \
+ *(unsigned long *) (function +16) == 0x7C0903A6 && \