/[gentoo]/src/patchsets/seamonkey/1.1.7/004_mozilla-hppa.patch
Gentoo

Contents of /src/patchsets/seamonkey/1.1.7/004_mozilla-hppa.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Dec 3 21:41:13 2007 UTC (6 years, 4 months ago) by armin76
Branch: MAIN
Add patches for 1.1.7

1 # Original patch just cleaned up, Author on original patch was Randolph Chung (tausq@debian.org)
2 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=287150
3
4 Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
5 ===================================================================
6 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
7 retrieving revision 1.92
8 diff -u -B -u -8 -p -r1.92 Makefile.in
9 --- xpcom/reflect/xptcall/src/md/unix/Makefile.in 14 Dec 2006 19:13:43 -0000 1.92
10 +++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 3 Jan 2007 18:20:44 -0000
11 @@ -185,16 +185,29 @@ CPPSRCS := xptcinvoke_ipf32.cpp xptcstu
12 ASFILES := xptcstubs_asm_ipf32.s xptcinvoke_asm_ipf32.s
13 endif
14
15 # #18875 Building the CPP's (CXX) optimized causes a crash
16 CXXFLAGS := $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS))
17 endif
18 endif
19
20 +#
21 +# Linux/HPPA/gcc
22 +#
23 +ifeq ($(OS_ARCH),Linux)
24 +ifneq (,$(filter parisc parisc64,$(OS_TEST)))
25 +#ifeq ($(CC),gcc) # Do not check for gcc since there is only this compiler on linux for hppa
26 +CPPSRCS := xptcinvoke_pa32.cpp xptcstubs_pa32.cpp
27 +ASFILES := xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s
28 +#endif
29 +endif
30 +endif
31 +
32 +
33 ######################################################################
34 # M68k
35 ######################################################################
36 #
37 # NetBSD/m68k
38 #
39 ifeq ($(OS_ARCH),NetBSD)
40 ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
41 Index: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
42 ===================================================================
43 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
44 diff -N xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
45 --- /dev/null 1 Jan 1970 00:00:00 -0000
46 +++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
47 @@ -0,0 +1,102 @@
48 +
49 + .LEVEL 1.1
50 + .text
51 + .align 4
52 +
53 +framesz:
54 + .equ 128
55 +
56 +.globl XPTC_InvokeByIndex
57 + .type XPTC_InvokeByIndex, @function
58 +
59 +
60 +XPTC_InvokeByIndex:
61 + .PROC
62 + .CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
63 + .ENTRY
64 +
65 + ; frame marker takes 48 bytes,
66 + ; register spill area takes 8 bytes,
67 + ; local stack area takes 72 bytes result in 128 bytes total
68 +
69 + STW %rp,-20(%sp)
70 + STW,MA %r3,128(%sp)
71 +
72 + LDO -framesz(%r30),%r28
73 + STW %r28,-4(%r30) ; save previous sp
74 + STW %r19,-32(%r30)
75 +
76 + STW %r26,-36-framesz(%r30) ; save argument registers in
77 + STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
78 + STW %r24,-44-framesz(%r30) ;
79 + STW %r23,-48-framesz(%r30) ;
80 +
81 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
82 + BL invoke_count_bytes,%r31
83 + COPY %r31,%r2
84 +
85 + CMPIB,>= 0,%r28, .+76
86 + COPY %r30,%r3 ; copy stack ptr to saved stack ptr
87 + ADD %r30,%r28,%r30 ; extend stack frame
88 + LDW -4(%r3),%r28 ; move frame
89 + STW %r28,-4(%r30)
90 + LDW -8(%r3),%r28
91 + STW %r28,-8(%r30)
92 + LDW -12(%r3),%r28
93 + STW %r28,-12(%r30)
94 + LDW -16(%r3),%r28
95 + STW %r28,-16(%r30)
96 + LDW -20(%r3),%r28
97 + STW %r28,-20(%r30)
98 + LDW -24(%r3),%r28
99 + STW %r28,-24(%r30)
100 + LDW -28(%r3),%r28
101 + STW %r28,-28(%r30)
102 + LDW -32(%r3),%r28
103 + STW %r28,-32(%r30)
104 +
105 + LDO -40(%r30),%r26 ; load copy address
106 + LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
107 + LDW -48-framesz(%r3),%r24 ;
108 +
109 + LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
110 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
111 + BL invoke_copy_to_stack,%r31
112 + COPY %r31,%r2
113 +
114 + LDO -48(%r30),%r20
115 + EXTRW,U,= %r28,31,1,%r22
116 + FLDD 0(%r20),%fr7 ; load double arg 1
117 + EXTRW,U,= %r28,30,1,%r22
118 + FLDW 8(%r20),%fr5L ; load float arg 1
119 + EXTRW,U,= %r28,29,1,%r22
120 + FLDW 4(%r20),%fr6L ; load float arg 2
121 + EXTRW,U,= %r28,28,1,%r22
122 + FLDW 0(%r20),%fr7L ; load float arg 3
123 +
124 + LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
125 + LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
126 + LDW -44(%r30),%r24
127 + LDW -48(%r30),%r23
128 +
129 + LDW -36-framesz(%r3),%r20 ; load vtable addr
130 + LDW -40-framesz(%r3),%r28 ; load index
131 + LDW 0(%r20),%r20 ; follow vtable
132 + SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
133 + LDW 0(%r28),%r22 ; load vtable entry
134 +
135 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
136 + BL $$dyncall,%r31
137 + COPY %r31,%r2
138 +
139 + LDW -32(%r30),%r19
140 + COPY %r3,%r30 ; restore saved stack ptr
141 +
142 + LDW -148(%sp),%rp
143 + LDWM -128(%sp),%r3
144 + BV,N (%rp)
145 + NOP
146 + .EXIT
147 + .PROCEND ;in=23,24,25,26;
148 + .SIZE XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
149 +
150 Index: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
151 ===================================================================
152 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
153 diff -N xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
154 --- /dev/null 1 Jan 1970 00:00:00 -0000
155 +++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
156 @@ -0,0 +1,66 @@
157 + .LEVEL 1.1
158 + .TEXT
159 + .ALIGN 4
160 +
161 +curframesz:
162 + .EQU 128
163 +
164 +
165 +; SharedStub has stack size of 128 bytes
166 +
167 +lastframesz:
168 + .EQU 64
169 +
170 +; the StubN C++ function has a small stack size of 64 bytes
171 +
172 +
173 +.globl SharedStub
174 + .type SharedStub, @function
175 +
176 +SharedStub:
177 + .PROC
178 + .CALLINFO CALLER,FRAME=80,SAVE_RP
179 +
180 + .ENTRY
181 + STW %rp,-20(%sp)
182 + LDO 128(%sp),%sp
183 +
184 + STW %r19,-32(%r30)
185 + STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
186 +
187 + LDO -80(%r30),%r28
188 + FSTD,MA %fr5,8(%r28) ; save darg0
189 + FSTD,MA %fr7,8(%r28) ; save darg1
190 + FSTW,MA %fr4L,4(%r28) ; save farg0
191 + FSTW,MA %fr5L,4(%r28) ; save farg1
192 + FSTW,MA %fr6L,4(%r28) ; save farg2
193 + FSTW,MA %fr7L,4(%r28) ; save farg3
194 +
195 + ; Former value of register 26 is already properly saved by StubN,
196 + ; but register 25-23 are not because of the arguments mismatch
197 + STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
198 + STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
199 + STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
200 + COPY %r26,%r25 ; method index is arg1
201 + LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
202 + LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
203 + LDO -80(%r30),%r23 ; floating args is arg3
204 +
205 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
206 + BL PrepareAndDispatch, %r31
207 + COPY %r31,%r2
208 +
209 + LDW -32(%r30),%r19
210 +
211 + LDW -148(%sp),%rp
212 + LDO -128(%sp),%sp
213 +
214 +
215 + BV,N (%rp)
216 + NOP
217 + NOP
218 +
219 + .EXIT
220 + .PROCEND ;in=26;out=28;
221 +
222 + .SIZE SharedStub, .-SharedStub

  ViewVC Help
Powered by ViewVC 1.1.20