~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/gmp/mpn/sparc64/addmul_2.asm

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2007-04-09 11:51:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070409115151-ql8cr0kalzx1jmla
Tags: 0.9i-20070324-2
Upload to unstable. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl  SPARC v9 64-bit mpn_addmul_2 -- Multiply an n limb number with 2-limb
 
2
dnl  number and add the result to a n limb vector.
 
3
 
 
4
dnl  Copyright 2002, 2003 Free Software Foundation, Inc.
 
5
 
 
6
dnl  This file is part of the GNU MP Library.
 
7
 
 
8
dnl  The GNU MP Library is free software; you can redistribute it and/or modify
 
9
dnl  it under the terms of the GNU Lesser General Public License as published
 
10
dnl  by the Free Software Foundation; either version 2.1 of the License, or (at
 
11
dnl  your option) any later version.
 
12
 
 
13
dnl  The GNU MP Library is distributed in the hope that it will be useful, but
 
14
dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
15
dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
 
16
dnl  License for more details.
 
17
 
 
18
dnl  You should have received a copy of the GNU Lesser General Public License
 
19
dnl  along with the GNU MP Library; see the file COPYING.LIB.  If not, write
 
20
dnl  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
21
dnl  Boston, MA 02110-1301, USA.
 
22
 
 
23
include(`../config.m4')
 
24
 
 
25
C                  cycles/limb
 
26
C UltraSPARC 1&2:      9
 
27
C UltraSPARC 3:       10
 
28
 
 
29
C Algorithm: We use 16 floating-point multiplies per limb product, with the
 
30
C 2-limb v operand split into eight 16-bit pieces, and the n-limb u operand
 
31
C split into 32-bit pieces.  We sum four 48-bit partial products using
 
32
C floating-point add, then convert the resulting four 50-bit quantities and
 
33
C transfer them to the integer unit.
 
34
 
 
35
C Possible optimizations:
 
36
C   1. Align the stack area where we transfer the four 50-bit product-sums
 
37
C      to a 32-byte boundary.  That would minimize the cache collision.
 
38
C      (UltraSPARC-1/2 use a direct-mapped cache.)  (Perhaps even better would
 
39
C      be to align the area to map to the area immediately before up?)
 
40
C   2. Perform two of the fp->int conversions with integer instructions.  We
 
41
C      can get almost ten free IEU slots, if we clean up bookkeeping and the
 
42
C      silly carry-limb code.
 
43
C   3. For an mpn_addmul_1 based on this, we need to fix the silly carry-limb
 
44
C      code.
 
45
 
 
46
C OSP (Overlapping software pipeline) version of mpn_mul_basecase:
 
47
C Operand swap will require 8 LDDA and 8 FXTOD, which will mean 8 cycles.
 
48
C FI    = 20
 
49
C L     =  9 x un * vn
 
50
C WDFI  = 10 x vn / 2
 
51
C WD    = 4
 
52
 
 
53
C Instruction classification (as per UltraSPARC functional units).
 
54
C Assuming silly carry code is fixed.  Includes bookkeeping.
 
55
C
 
56
C               mpn_addmul_X     mpn_mul_X
 
57
C                1       2       1       2
 
58
C               ==========      ==========
 
59
C      FM        8      16       8      16
 
60
C      FA       10      18      10      18
 
61
C     MEM       12      12      10      10
 
62
C  ISHIFT        6       6       6       6
 
63
C IADDLOG       11      11      10      10
 
64
C  BRANCH        1       1       1       1
 
65
C
 
66
C TOTAL IEU     17      17      16      16
 
67
C TOTAL         48      64      45      61
 
68
C
 
69
C IEU cycles     8.5     8.5     8       8
 
70
C MEM cycles    12      12      10      10
 
71
C ISSUE cycles  12      16      11.25   15.25
 
72
C FPU cycles    10      18      10      18
 
73
C cycles/loop   12      18      12      18
 
74
C cycles/limb   12       9      12       9
 
75
 
 
76
 
 
77
C INPUT PARAMETERS
 
78
C rp[n + 1]     i0
 
79
C up[n]         i1
 
80
C n             i2
 
81
C vp[2]         i3
 
82
 
 
83
 
 
84
ASM_START()
 
85
        REGISTER(%g2,#scratch)
 
86
        REGISTER(%g3,#scratch)
 
87
 
 
88
C Combine registers:
 
89
C u00_hi= u32_hi
 
90
C u00_lo= u32_lo
 
91
C a000  = out000
 
92
C a016  = out016
 
93
C Free: f52 f54
 
94
 
 
95
 
 
96
define(`p000', `%f8')  define(`p016',`%f10')
 
97
define(`p032',`%f12')  define(`p048',`%f14')
 
98
define(`p064',`%f16')  define(`p080',`%f18')
 
99
define(`p096a',`%f20') define(`p112a',`%f22')
 
100
define(`p096b',`%f56') define(`p112b',`%f58')
 
101
 
 
102
define(`out000',`%f0') define(`out016',`%f6')
 
103
 
 
104
define(`v000',`%f24')  define(`v016',`%f26')
 
105
define(`v032',`%f28')  define(`v048',`%f30')
 
106
define(`v064',`%f44')  define(`v080',`%f46')
 
107
define(`v096',`%f48')  define(`v112',`%f50')
 
108
 
 
109
define(`u00',`%f32')   define(`u32', `%f34')
 
110
 
 
111
define(`a000',`%f36')  define(`a016',`%f38')
 
112
define(`a032',`%f40')  define(`a048',`%f42')
 
113
define(`a064',`%f60')  define(`a080',`%f62')
 
114
 
 
115
define(`u00_hi',`%f2') define(`u32_hi',`%f4')
 
116
define(`u00_lo',`%f3') define(`u32_lo',`%f5')
 
117
 
 
118
define(`cy',`%g1')
 
119
define(`rlimb',`%g3')
 
120
define(`i00',`%l0')    define(`i16',`%l1')
 
121
define(`r00',`%l2')    define(`r32',`%l3')
 
122
define(`xffffffff',`%l7')
 
123
define(`xffff',`%o0')
 
124
 
 
125
 
 
126
PROLOGUE(mpn_addmul_2)
 
127
 
 
128
C Initialization.  (1) Split v operand into eight 16-bit chunks and store them
 
129
C as IEEE double in fp registers.  (2) Clear upper 32 bits of fp register pairs
 
130
C f2 and f4.  (3) Store masks in registers aliased to `xffff' and `xffffffff'.
 
131
C This code could be better scheduled.
 
132
 
 
133
        save    %sp, -256, %sp
 
134
 
 
135
ifdef(`HAVE_VIS',
 
136
`       mov     -1, %g4
 
137
        wr      %g0, 0xD2, %asi
 
138
        srlx    %g4, 32, xffffffff      C store mask in register `xffffffff'
 
139
        ldda    [%i3+6] %asi, v000
 
140
        ldda    [%i3+4] %asi, v016
 
141
        ldda    [%i3+2] %asi, v032
 
142
        ldda    [%i3+0] %asi, v048
 
143
        fxtod   v000, v000
 
144
        ldda    [%i3+14] %asi, v064
 
145
        fxtod   v016, v016
 
146
        ldda    [%i3+12] %asi, v080
 
147
        fxtod   v032, v032
 
148
        ldda    [%i3+10] %asi, v096
 
149
        fxtod   v048, v048
 
150
        ldda    [%i3+8] %asi, v112
 
151
        fxtod   v064, v064
 
152
        fxtod   v080, v080
 
153
        fxtod   v096, v096
 
154
        fxtod   v112, v112
 
155
        fzero   u00_hi
 
156
        fzero   u32_hi
 
157
',
 
158
`       mov     -1, %g4
 
159
        ldx     [%i3+0], %l0            C vp[0]
 
160
        srlx    %g4, 48, xffff          C store mask in register `xffff'
 
161
        ldx     [%i3+8], %l1            C vp[1]
 
162
 
 
163
        and     %l0, xffff, %g2
 
164
        stx     %g2, [%sp+2223+0]
 
165
        srlx    %l0, 16, %g3
 
166
        and     %g3, xffff, %g3
 
167
        stx     %g3, [%sp+2223+8]
 
168
        srlx    %l0, 32, %g2
 
169
        and     %g2, xffff, %g2
 
170
        stx     %g2, [%sp+2223+16]
 
171
        srlx    %l0, 48, %g3
 
172
        stx     %g3, [%sp+2223+24]
 
173
        and     %l1, xffff, %g2
 
174
        stx     %g2, [%sp+2223+32]
 
175
        srlx    %l1, 16, %g3
 
176
        and     %g3, xffff, %g3
 
177
        stx     %g3, [%sp+2223+40]
 
178
        srlx    %l1, 32, %g2
 
179
        and     %g2, xffff, %g2
 
180
        stx     %g2, [%sp+2223+48]
 
181
        srlx    %l1, 48, %g3
 
182
        stx     %g3, [%sp+2223+56]
 
183
 
 
184
        srlx    %g4, 32, xffffffff      C store mask in register `xffffffff'
 
185
 
 
186
        ldd     [%sp+2223+0], v000
 
187
        ldd     [%sp+2223+8], v016
 
188
        ldd     [%sp+2223+16], v032
 
189
        ldd     [%sp+2223+24], v048
 
190
        fxtod   v000, v000
 
191
        ldd     [%sp+2223+32], v064
 
192
        fxtod   v016, v016
 
193
        ldd     [%sp+2223+40], v080
 
194
        fxtod   v032, v032
 
195
        ldd     [%sp+2223+48], v096
 
196
        fxtod   v048, v048
 
197
        ldd     [%sp+2223+56], v112
 
198
        fxtod   v064, v064
 
199
        ld      [%sp+2223+0], u00_hi    C zero u00_hi
 
200
        fxtod   v080, v080
 
201
        ld      [%sp+2223+0], u32_hi    C zero u32_hi
 
202
        fxtod   v096, v096
 
203
        fxtod   v112, v112
 
204
')
 
205
C Initialization done.
 
206
        mov     0, %g2
 
207
        mov     0, rlimb
 
208
        mov     0, %g4
 
209
        add     %i0, -8, %i0            C BOOKKEEPING
 
210
 
 
211
C Start software pipeline.
 
212
 
 
213
        ld      [%i1+4], u00_lo         C read low 32 bits of up[i]
 
214
        fxtod   u00_hi, u00
 
215
C mid
 
216
        ld      [%i1+0], u32_lo         C read high 32 bits of up[i]
 
217
        fmuld   u00, v000, a000
 
218
        fmuld   u00, v016, a016
 
219
        fmuld   u00, v032, a032
 
220
        fmuld   u00, v048, a048
 
221
        add     %i2, -1, %i2            C BOOKKEEPING
 
222
        fmuld   u00, v064, p064
 
223
        add     %i1, 8, %i1             C BOOKKEEPING
 
224
        fxtod   u32_hi, u32
 
225
        fmuld   u00, v080, p080
 
226
        fmuld   u00, v096, p096a
 
227
        brnz,pt %i2, .L_2_or_more
 
228
         fmuld  u00, v112, p112a
 
229
 
 
230
.L1:    fdtox   a000, out000
 
231
        fmuld   u32, v000, p000
 
232
        fdtox   a016, out016
 
233
        fmuld   u32, v016, p016
 
234
        fmovd   p064, a064
 
235
        fmuld   u32, v032, p032
 
236
        fmovd   p080, a080
 
237
        fmuld   u32, v048, p048
 
238
        std     out000, [%sp+2223+16]
 
239
        faddd   p000, a032, a000
 
240
        fmuld   u32, v064, p064
 
241
        std     out016, [%sp+2223+24]
 
242
        fxtod   u00_hi, u00
 
243
        faddd   p016, a048, a016
 
244
        fmuld   u32, v080, p080
 
245
        faddd   p032, a064, a032
 
246
        fmuld   u32, v096, p096b
 
247
        faddd   p048, a080, a048
 
248
        fmuld   u32, v112, p112b
 
249
C mid
 
250
        fdtox   a000, out000
 
251
        fdtox   a016, out016
 
252
        faddd   p064, p096a, a064
 
253
        faddd   p080, p112a, a080
 
254
        std     out000, [%sp+2223+0]
 
255
        b       .L_wd2
 
256
         std    out016, [%sp+2223+8]
 
257
 
 
258
.L_2_or_more:
 
259
        ld      [%i1+4], u00_lo         C read low 32 bits of up[i]
 
260
        fdtox   a000, out000
 
261
        fmuld   u32, v000, p000
 
262
        fdtox   a016, out016
 
263
        fmuld   u32, v016, p016
 
264
        fmovd   p064, a064
 
265
        fmuld   u32, v032, p032
 
266
        fmovd   p080, a080
 
267
        fmuld   u32, v048, p048
 
268
        std     out000, [%sp+2223+16]
 
269
        faddd   p000, a032, a000
 
270
        fmuld   u32, v064, p064
 
271
        std     out016, [%sp+2223+24]
 
272
        fxtod   u00_hi, u00
 
273
        faddd   p016, a048, a016
 
274
        fmuld   u32, v080, p080
 
275
        faddd   p032, a064, a032
 
276
        fmuld   u32, v096, p096b
 
277
        faddd   p048, a080, a048
 
278
        fmuld   u32, v112, p112b
 
279
C mid
 
280
        ld      [%i1+0], u32_lo         C read high 32 bits of up[i]
 
281
        fdtox   a000, out000
 
282
        fmuld   u00, v000, p000
 
283
        fdtox   a016, out016
 
284
        fmuld   u00, v016, p016
 
285
        faddd   p064, p096a, a064
 
286
        fmuld   u00, v032, p032
 
287
        faddd   p080, p112a, a080
 
288
        fmuld   u00, v048, p048
 
289
        add     %i2, -1, %i2            C BOOKKEEPING
 
290
        std     out000, [%sp+2223+0]
 
291
        faddd   p000, a032, a000
 
292
        fmuld   u00, v064, p064
 
293
        add     %i1, 8, %i1             C BOOKKEEPING
 
294
        std     out016, [%sp+2223+8]
 
295
        fxtod   u32_hi, u32
 
296
        faddd   p016, a048, a016
 
297
        fmuld   u00, v080, p080
 
298
        faddd   p032, a064, a032
 
299
        fmuld   u00, v096, p096a
 
300
        faddd   p048, a080, a048
 
301
        brnz,pt %i2, .L_3_or_more
 
302
         fmuld  u00, v112, p112a
 
303
 
 
304
        b       .Lend
 
305
         nop
 
306
 
 
307
C  64      32       0
 
308
C   .       .       .
 
309
C   .       |__rXXX_|   32
 
310
C   .      |___cy___|   34
 
311
C   .  |_______i00__|   50
 
312
C  |_______i16__|   .   50
 
313
 
 
314
 
 
315
C BEGIN MAIN LOOP
 
316
        .align  16
 
317
.L_3_or_more:
 
318
.Loop:  ld      [%i1+4], u00_lo         C read low 32 bits of up[i]
 
319
        and     %g2, xffffffff, %g2
 
320
        fdtox   a000, out000
 
321
        fmuld   u32, v000, p000
 
322
C
 
323
        lduw    [%i0+4+8], r00          C read low 32 bits of rp[i]
 
324
        add     %g2, rlimb, %l5
 
325
        fdtox   a016, out016
 
326
        fmuld   u32, v016, p016
 
327
C
 
328
        srlx    %l5, 32, cy
 
329
        ldx     [%sp+2223+16], i00
 
330
        faddd   p064, p096b, a064
 
331
        fmuld   u32, v032, p032
 
332
C
 
333
        add     %g4, cy, cy             C new cy
 
334
        ldx     [%sp+2223+24], i16
 
335
        faddd   p080, p112b, a080
 
336
        fmuld   u32, v048, p048
 
337
C
 
338
        nop
 
339
        std     out000, [%sp+2223+16]
 
340
        faddd   p000, a032, a000
 
341
        fmuld   u32, v064, p064
 
342
C
 
343
        add     i00, r00, rlimb
 
344
        add     %i0, 8, %i0             C BOOKKEEPING
 
345
        std     out016, [%sp+2223+24]
 
346
        fxtod   u00_hi, u00
 
347
C
 
348
        sllx    i16, 16, %g2
 
349
        add     cy, rlimb, rlimb
 
350
        faddd   p016, a048, a016
 
351
        fmuld   u32, v080, p080
 
352
C
 
353
        srlx    i16, 16, %g4
 
354
        add     %g2, rlimb, %l5
 
355
        faddd   p032, a064, a032
 
356
        fmuld   u32, v096, p096b
 
357
C
 
358
        stw     %l5, [%i0+4]
 
359
        nop
 
360
        faddd   p048, a080, a048
 
361
        fmuld   u32, v112, p112b
 
362
C midloop
 
363
        ld      [%i1+0], u32_lo         C read high 32 bits of up[i]
 
364
        and     %g2, xffffffff, %g2
 
365
        fdtox   a000, out000
 
366
        fmuld   u00, v000, p000
 
367
C
 
368
        lduw    [%i0+0], r32            C read high 32 bits of rp[i]
 
369
        add     %g2, rlimb, %l5
 
370
        fdtox   a016, out016
 
371
        fmuld   u00, v016, p016
 
372
C
 
373
        srlx    %l5, 32, cy
 
374
        ldx     [%sp+2223+0], i00
 
375
        faddd   p064, p096a, a064
 
376
        fmuld   u00, v032, p032
 
377
C
 
378
        add     %g4, cy, cy             C new cy
 
379
        ldx     [%sp+2223+8], i16
 
380
        faddd   p080, p112a, a080
 
381
        fmuld   u00, v048, p048
 
382
C
 
383
        add     %i2, -1, %i2            C BOOKKEEPING
 
384
        std     out000, [%sp+2223+0]
 
385
        faddd   p000, a032, a000
 
386
        fmuld   u00, v064, p064
 
387
C
 
388
        add     i00, r32, rlimb
 
389
        add     %i1, 8, %i1             C BOOKKEEPING
 
390
        std     out016, [%sp+2223+8]
 
391
        fxtod   u32_hi, u32
 
392
C
 
393
        sllx    i16, 16, %g2
 
394
        add     cy, rlimb, rlimb
 
395
        faddd   p016, a048, a016
 
396
        fmuld   u00, v080, p080
 
397
C
 
398
        srlx    i16, 16, %g4
 
399
        add     %g2, rlimb, %l5
 
400
        faddd   p032, a064, a032
 
401
        fmuld   u00, v096, p096a
 
402
C
 
403
        stw     %l5, [%i0+0]
 
404
        faddd   p048, a080, a048
 
405
        brnz,pt %i2, .Loop
 
406
         fmuld  u00, v112, p112a
 
407
C END MAIN LOOP
 
408
 
 
409
C WIND-DOWN PHASE 1
 
410
.Lend:  and     %g2, xffffffff, %g2
 
411
        fdtox   a000, out000
 
412
        fmuld   u32, v000, p000
 
413
        lduw    [%i0+4+8], r00          C read low 32 bits of rp[i]
 
414
        add     %g2, rlimb, %l5
 
415
        fdtox   a016, out016
 
416
        fmuld   u32, v016, p016
 
417
        srlx    %l5, 32, cy
 
418
        ldx     [%sp+2223+16], i00
 
419
        faddd   p064, p096b, a064
 
420
        fmuld   u32, v032, p032
 
421
        add     %g4, cy, cy             C new cy
 
422
        ldx     [%sp+2223+24], i16
 
423
        faddd   p080, p112b, a080
 
424
        fmuld   u32, v048, p048
 
425
        std     out000, [%sp+2223+16]
 
426
        faddd   p000, a032, a000
 
427
        fmuld   u32, v064, p064
 
428
        add     i00, r00, rlimb
 
429
        add     %i0, 8, %i0             C BOOKKEEPING
 
430
        std     out016, [%sp+2223+24]
 
431
        sllx    i16, 16, %g2
 
432
        add     cy, rlimb, rlimb
 
433
        faddd   p016, a048, a016
 
434
        fmuld   u32, v080, p080
 
435
        srlx    i16, 16, %g4
 
436
        add     %g2, rlimb, %l5
 
437
        faddd   p032, a064, a032
 
438
        fmuld   u32, v096, p096b
 
439
        stw     %l5, [%i0+4]
 
440
        faddd   p048, a080, a048
 
441
        fmuld   u32, v112, p112b
 
442
C mid
 
443
        and     %g2, xffffffff, %g2
 
444
        fdtox   a000, out000
 
445
        lduw    [%i0+0], r32            C read high 32 bits of rp[i]
 
446
        add     %g2, rlimb, %l5
 
447
        fdtox   a016, out016
 
448
        srlx    %l5, 32, cy
 
449
        ldx     [%sp+2223+0], i00
 
450
        faddd   p064, p096a, a064
 
451
        add     %g4, cy, cy             C new cy
 
452
        ldx     [%sp+2223+8], i16
 
453
        faddd   p080, p112a, a080
 
454
        std     out000, [%sp+2223+0]
 
455
        add     i00, r32, rlimb
 
456
        std     out016, [%sp+2223+8]
 
457
        sllx    i16, 16, %g2
 
458
        add     cy, rlimb, rlimb
 
459
        srlx    i16, 16, %g4
 
460
        add     %g2, rlimb, %l5
 
461
        stw     %l5, [%i0+0]
 
462
 
 
463
C WIND-DOWN PHASE 2
 
464
.L_wd2: and     %g2, xffffffff, %g2
 
465
        fdtox   a032, out000
 
466
        lduw    [%i0+4+8], r00          C read low 32 bits of rp[i]
 
467
        add     %g2, rlimb, %l5
 
468
        fdtox   a048, out016
 
469
        srlx    %l5, 32, cy
 
470
        ldx     [%sp+2223+16], i00
 
471
        add     %g4, cy, cy             C new cy
 
472
        ldx     [%sp+2223+24], i16
 
473
        std     out000, [%sp+2223+16]
 
474
        add     i00, r00, rlimb
 
475
        add     %i0, 8, %i0             C BOOKKEEPING
 
476
        std     out016, [%sp+2223+24]
 
477
        sllx    i16, 16, %g2
 
478
        add     cy, rlimb, rlimb
 
479
        srlx    i16, 16, %g4
 
480
        add     %g2, rlimb, %l5
 
481
        stw     %l5, [%i0+4]
 
482
C mid
 
483
        and     %g2, xffffffff, %g2
 
484
        fdtox   a064, out000
 
485
        lduw    [%i0+0], r32            C read high 32 bits of rp[i]
 
486
        add     %g2, rlimb, %l5
 
487
        fdtox   a080, out016
 
488
        srlx    %l5, 32, cy
 
489
        ldx     [%sp+2223+0], i00
 
490
        add     %g4, cy, cy             C new cy
 
491
        ldx     [%sp+2223+8], i16
 
492
        std     out000, [%sp+2223+0]
 
493
        add     i00, r32, rlimb
 
494
        std     out016, [%sp+2223+8]
 
495
        sllx    i16, 16, %g2
 
496
        add     cy, rlimb, rlimb
 
497
        srlx    i16, 16, %g4
 
498
        add     %g2, rlimb, %l5
 
499
        stw     %l5, [%i0+0]
 
500
 
 
501
C WIND-DOWN PHASE 3
 
502
.L_wd3: and     %g2, xffffffff, %g2
 
503
        fdtox   p096b, out000
 
504
        add     %g2, rlimb, %l5
 
505
        fdtox   p112b, out016
 
506
        srlx    %l5, 32, cy
 
507
        ldx     [%sp+2223+16], rlimb
 
508
        add     %g4, cy, cy             C new cy
 
509
        ldx     [%sp+2223+24], i16
 
510
        std     out000, [%sp+2223+16]
 
511
        add     %i0, 8, %i0             C BOOKKEEPING
 
512
        std     out016, [%sp+2223+24]
 
513
        sllx    i16, 16, %g2
 
514
        add     cy, rlimb, rlimb
 
515
        srlx    i16, 16, %g4
 
516
        add     %g2, rlimb, %l5
 
517
        stw     %l5, [%i0+4]
 
518
C mid
 
519
        and     %g2, xffffffff, %g2
 
520
        add     %g2, rlimb, %l5
 
521
        srlx    %l5, 32, cy
 
522
        ldx     [%sp+2223+0], rlimb
 
523
        add     %g4, cy, cy             C new cy
 
524
        ldx     [%sp+2223+8], i16
 
525
        sllx    i16, 16, %g2
 
526
        add     cy, rlimb, rlimb
 
527
        srlx    i16, 16, %g4
 
528
        add     %g2, rlimb, %l5
 
529
        stw     %l5, [%i0+0]
 
530
 
 
531
        and     %g2, xffffffff, %g2
 
532
        add     %g2, rlimb, %l5
 
533
        srlx    %l5, 32, cy
 
534
        ldx     [%sp+2223+16], i00
 
535
        add     %g4, cy, cy             C new cy
 
536
        ldx     [%sp+2223+24], i16
 
537
 
 
538
        sllx    i16, 16, %g2
 
539
        add     i00, cy, cy
 
540
        return  %i7+8
 
541
        add     %g2, cy, %o0
 
542
EPILOGUE(mpn_addmul_2)