Here are the diffs to the xptcall section. I removed the 'static' from
the function definitions because otherwise they were optimised away.
For the perl script, I basically have it write the inline assembly
code instead of leaving it to the macros in the source files (since
the new mangled labels have the function length encoded within).
This really is a job for perl.

Hope this helps,
Michael.

Index: xptcinvoke_linux_alpha.cpp
===================================================================
RCS file: 
/cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp,v
retrieving revision 1.2
diff -u -r1.2 xptcinvoke_linux_alpha.cpp
--- xptcinvoke_linux_alpha.cpp  1999/11/06 03:39:07     1.2
+++ xptcinvoke_linux_alpha.cpp  2001/07/06 09:15:24
@@ -27,11 +27,11 @@
 #include "xptcprivate.h"
 
 /* Prototype specifies unmangled function name and disables unused warning */
-static void
+void
 invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
 __asm__("invoke_copy_to_stack") __attribute__((unused));
 
-static void
+void
 invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
 {
     const PRUint8 NUM_ARG_REGS = 6-1;        // -1 for "this" pointer
Index: xptcstubs_linux_alpha.cpp
===================================================================
RCS file: 
/cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp,v
retrieving revision 1.2
diff -u -r1.2 xptcstubs_linux_alpha.cpp
--- xptcstubs_linux_alpha.cpp   1999/11/06 03:39:10     1.2
+++ xptcstubs_linux_alpha.cpp   2001/07/06 09:15:25
@@ -27,11 +27,13 @@
 #include "xptcprivate.h"
 
 /* Prototype specifies unmangled function name and disables unused warning */
-static nsresult
+
+nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
 __asm__("PrepareAndDispatch") __attribute__((unused));
+
 
-static nsresult
+nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
 {
     const PRUint8 PARAM_BUFFER_COUNT = 16;
Index: genstubs.pl
===================================================================
RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/public/genstubs.pl,v
retrieving revision 1.5
diff -u -r1.5 genstubs.pl
--- genstubs.pl 2001/05/19 00:03:00     1.5
+++ genstubs.pl 2001/07/06 09:17:00
@@ -61,8 +61,30 @@
 print OUTFILE "/* includes ",$entry_count," stub entries, and ",
               $sentinel_count," sentinel entries */\n\n";
 
-for($i = 0; $i < $entry_count; $i++) {
-    print OUTFILE "STUB_ENTRY(",$i+3,")\n";
+for($i = 3; $i < ($entry_count+3); $i++) {
+#    print OUTFILE "STUB_ENTRY(",$i+3,")\n";
+# _ZN14nsXPTCStubBase6Stub29Ev #"_ZN14ns"class+length+method+"Ev"
+$x = length($i) + 4; #get method name length
+print OUTFILE <<__BARF__;
+__asm__( \
+    "#### Stub$i ####\\n" \\
+".text\\n\\t" \\
+    ".align 5\\n\\t" \\
+    ".globl _ZN14nsXPTCStubBase${x}Stub${i}Ev\\n\\t" \\
+    ".ent _ZN14nsXPTCStubBase${x}Stub${i}Ev\\n" \\
+"_ZN14nsXPTCStubBase${x}Stub${i}Ev:\\n\\t" \\
+    ".frame \$30,0,\$26,0\\n\\t" \\
+    "ldgp \$29,0(\$27)\\n" \\
+"\$_ZN14nsXPTCStubBase${x}Stub${i}Ev..ng:\\n\\t" \\
+    ".prologue 1\\n\\t" \\
+    "lda \$1,$i\\n\\t" \\
+    "br \$31,\$SharedStub..ng\\n\\t" \\
+    ".end _ZN14nsXPTCStubBase${x}Stub${i}Ev" \\
+    );
+
+;
+
+__BARF__
 }
 
 for($i = 0; $i < $sentinel_count; $i++) {
-- 
This message may have passed through thousands of machines throughout
the entire civilised world. It might have cost the net hundreds, if not
thousands of dollars to send everywhere.
+++ Michael Stroucken +++ [EMAIL PROTECTED] +++ DEC Alpha Powered +++

Attachment: pgplUZCtR3Ea2.pgp
Description: PGP signature

Reply via email to