summaryrefslogtreecommitdiff
path: root/firefox-1.0-xptcall-s390.patch
blob: 2de02ee7d662c65623dee3a7d1c53a9cdfc564fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
diff -ur mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in mozilla-xx/xpcom/reflect/xptcall/src/md/unix/Makefile.in
--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2004-04-22 22:50:05.000000000 +0200
+++ mozilla-xx/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2004-12-03 11:19:41.560694658 +0100
@@ -341,10 +341,12 @@
 #
 ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390)
 CPPSRCS		:= xptcinvoke_linux_s390.cpp xptcstubs_linux_s390.cpp
+CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
 endif
 
 ifeq ($(OS_ARCH)$(OS_TEST),Linuxs390x)
 CPPSRCS		:= xptcinvoke_linux_s390x.cpp xptcstubs_linux_s390x.cpp
+CXXFLAGS	+= -fno-strict-aliasing -fno-inline -fomit-frame-pointer -mbackchain
 endif
 
 
diff -ur mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp	2004-12-03 12:18:27.110694658 +0100
+++ mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390.cpp	2004-12-03 12:27:05.100694658 +0100
@@ -184,8 +184,6 @@
     }
 }
 
-volatile register void* r14 asm("r14");
-
 XPTC_PUBLIC_API(nsresult)
 XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
                    PRUint32 paramCount, nsXPTCVariant* params)
@@ -199,8 +197,6 @@
     PRUint32 overflow = invoke_count_words (paramCount, params);
     PRUint32 result;
 
-    volatile void* sav_r14 = r14;
-
     __asm__ __volatile__
     (
         "lr    7,15\n\t"
@@ -235,10 +231,8 @@
           "a" (invoke_copy_to_stack),
           "a" (that),
           "a" (method)
-        : "2", "3", "4", "5", "6", "7", "memory"
+        : "2", "3", "4", "5", "6", "7", "14", "cc", "memory", "%f0", "%f2"
     );
-
-    r14 = sav_r14;
   
     return result;
 }    
diff -ur mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp	2004-12-03 12:18:27.110694658 +0100
+++ mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_s390x.cpp	2004-12-03 12:26:44.500694658 +0100
@@ -178,8 +178,6 @@
     }
 }
 
-volatile register void* r14 asm("r14");
-
 XPTC_PUBLIC_API(nsresult)
 XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
                    PRUint32 paramCount, nsXPTCVariant* params)
@@ -193,8 +191,6 @@
     PRUint64 overflow = invoke_count_words (paramCount, params);
     PRUint64 result;
 
-    volatile void* sav_r14 = r14;
-
     __asm__ __volatile__
     (
         "lgr    7,15\n\t"
@@ -231,10 +227,9 @@
           "a" (invoke_copy_to_stack),
           "a" (that),
           "a" (method)
-        : "2", "3", "4", "5", "6", "7", "memory"
+        : "2", "3", "4", "5", "6", "7", "14", "cc", "memory",
+	  "%f0", "%f1", "%f2", "%f3", "%f4", "%f5", "%f6", "%f7"
     );
-
-    r14 = sav_r14;
   
     return result;
 }    
diff -ur mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp	2004-12-03 12:18:27.110694658 +0100
+++ mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390.cpp	2004-12-03 11:16:55.400694658 +0100
@@ -177,7 +177,7 @@
                               \
     __asm__ __volatile__      \
     (                         \
-        "lr    %0,15\n\t"     \
+        "l     %0,0(15)\n\t"  \
         "ahi   %0,96\n\t"     \
         "stm   3,6,0(%3)\n\t" \
         "std   0,%1\n\t"      \
diff -ur mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp	2004-12-03 12:18:27.110694658 +0100
+++ mozilla-xx/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_s390x.cpp	2004-12-03 11:17:16.360694658 +0100
@@ -177,7 +177,7 @@
                               \
     __asm__ __volatile__      \
     (                         \
-        "lgr    %0,15\n\t"    \
+        "lg     %0,0(15)\n\t" \
         "aghi   %0,160\n\t"   \
         "stmg   3,6,0(%5)\n\t"\
         "std    0,%1\n\t"     \
bgstack15