summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Bogusz2003-06-25 14:46:49 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commit186332c30be6d05c99919d9d1bd58284307a4ada (patch)
tree96b6310ecf59248134a0fc8f124071b2c30dae9c
parent075b11d915d0746397f9bd57efcc59584d5fb293 (diff)
downloadmozilla-186332c30be6d05c99919d9d1bd58284307a4ada.zip
mozilla-186332c30be6d05c99919d9d1bd58284307a4ada.tar.gz
- gcc 3.x support on alpha
Changed files: mozilla-alpha-gcc3.patch -> 1.1
-rw-r--r--mozilla-alpha-gcc3.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/mozilla-alpha-gcc3.patch b/mozilla-alpha-gcc3.patch
new file mode 100644
index 0000000..37d14b3
--- /dev/null
+++ b/mozilla-alpha-gcc3.patch
@@ -0,0 +1,75 @@
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp.orig Fri Sep 28 22:12:52 2001
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp Tue Jun 24 15:32:39 2003
+@@ -188,6 +188,50 @@
+ * nsresult nsXPTCStubBase::Stub##n()
+ * Sets register $1 to "methodIndex" and jumps to SharedStub.
+ */
++#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
++// gcc3 mangling tends to insert the length of the method name
++#define STUB_ENTRY(n) \
++__asm__( \
++ "#### Stub"#n" ####\n" \
++".text\n\t" \
++ ".align 5\n\t" \
++ ".if " #n " < 10\n\t" \
++ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
++ ".ent _ZN14nsXPTCStubBase5Stub" #n "Ev\n" \
++"_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \
++ ".elseif " #n " < 100\n\t" \
++ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
++ ".ent _ZN14nsXPTCStubBase6Stub" #n "Ev\n" \
++"_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \
++ ".elseif " #n " < 1000\n\t" \
++ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
++ ".ent _ZN14nsXPTCStubBase7Stub" #n "Ev\n" \
++"_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \
++ ".else\n\t" \
++ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \
++ ".endif\n\t" \
++ ".frame $30,0,$26,0\n\t" \
++ "ldgp $29,0($27)\n" \
++ ".if " #n " < 10\n\t" \
++"$_ZN14nsXPTCStubBase5Stub" #n "Ev..ng:\n\t" \
++ ".elseif " #n " < 100\n\t" \
++"$_ZN14nsXPTCStubBase6Stub" #n "Ev..ng:\n\t" \
++ ".else\n\t" \
++"$_ZN14nsXPTCStubBase7Stub" #n "Ev..ng:\n\t" \
++ ".endif\n\t" \
++ ".prologue 1\n\t" \
++ "lda $1,"#n"\n\t" \
++ ".if " #n " < 10\n\t" \
++ "br $31,$SharedStub..ng\n\t" \
++ ".end _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
++ ".elseif " #n " < 100\n\t" \
++ "br $31,$SharedStub..ng\n\t" \
++ ".end _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
++ ".else\n\t" \
++ "br $31,$SharedStub..ng\n\t" \
++ ".end _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
++ ".endif");
++#else
+ #define STUB_ENTRY(n) \
+ __asm__( \
+ "#### Stub"#n" ####\n" \
+@@ -204,6 +248,7 @@
+ "br $31,$SharedStub..ng\n\t" \
+ ".end Stub"#n"__14nsXPTCStubBase" \
+ );
++#endif
+
+ #define SENTINEL_ENTRY(n) \
+ nsresult nsXPTCStubBase::Sentinel##n() \
+--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp.orig Fri Sep 28 22:12:51 2001
++++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp Wed Jun 25 14:08:20 2003
+@@ -163,7 +163,11 @@
+ "bis $16,$16,$1\n\t" /* load "this" */
+ "ldq $2,16($15)\n\t" /* load "methodIndex" */
+ "ldq $1,0($1)\n\t" /* load vtable */
++#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
++ "s8addq $2,0,$2\n\t"
++#else
+ "s8addq $2,16,$2\n\t" /* vtable index = "methodIndex" * 8 + 16 */
++#endif
+ "addq $1,$2,$1\n\t"
+ "ldq $27,0($1)\n\t" /* load address of function */
+ "jsr $26,($27),0\n\t" /* call virtual function */