File: _mullong.c

package info (click to toggle)
sdcc 4.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 105,232 kB
  • sloc: ansic: 956,095; cpp: 110,511; makefile: 59,314; sh: 29,875; asm: 17,178; perl: 12,136; yacc: 7,480; lisp: 1,672; python: 907; lex: 805; awk: 498; sed: 89
file content (793 lines) | stat: -rw-r--r-- 14,529 bytes parent folder | download | duplicates (4)
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
/*-------------------------------------------------------------------------
   _mullong.c - routine for multiplication of 32 bit (unsigned) long

   Copyright (C) 1999, Sandeep Dutta . sandeep.dutta@usa.net
   Copyright (C) 1999, Jean Louis VERN jlvern@writeme.com

   Modifications for PIC14 by
   Copyright (C) 2019 Gonzalo Pérez de Olaguer Córdoba <salo@gpoc.es>

   This library is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by the
   Free Software Foundation; either version 2, or (at your option) any
   later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this library; see the file COPYING. If not, write to the
   Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
   MA 02110-1301, USA.

   As a special exception, if you link this library with other files,
   some of which are compiled with SDCC, to produce an executable,
   this library does not by itself cause the resulting executable to
   be covered by the GNU General Public License. This exception does
   not however invalidate any other reasons why the executable file
   might be covered by the GNU General Public License.
-------------------------------------------------------------------------*/

/* Signed and unsigned multiplication are the same - as long as the output
   has the same precision as the input.

   Assembler-functions are provided for:
     mcs51 small
     mcs51 small stack-auto
*/

#if !defined(__SDCC_USE_XSTACK) && !defined(_SDCC_NO_ASM_LIB_FUNCS)
#  if defined(__SDCC_mcs51)
#    if defined(__SDCC_MODEL_SMALL)
#      if defined(__SDCC_STACK_AUTO) && !defined(__SDCC_PARMS_IN_BANK1)
#        define _MULLONG_ASM_SMALL_AUTO
#      else
#        define _MULLONG_ASM_SMALL
#      endif
#    elif defined(__SDCC_MODEL_LARGE)
#      if !defined(__SDCC_STACK_AUTO)
#        define _MULLONG_ASM_LARGE
#      endif
#    endif
#  endif
#endif

#if defined(_MULLONG_ASM_SMALL) || defined(_MULLONG_ASM_SMALL_AUTO)

void
_mullong_dummy (void) __naked
{
	__asm

__mullong:

	.globl __mullong

				; the result c will be stored in r4...r7
	#define c0 r4
	#define c1 r5
	#define c2 r6
	#define c3 r7

	#define a0 dpl
	#define a1 dph
	#define a2 r2
	#define a3 r3

	; c0  a0 * b0
	; c1  a1 * b0 + a0 * b1
	; c2  a2 * b0 + a1 * b1 + a0 * b2
	; c3  a3 * b0 + a2 * b1 + a1 * b2 + a0 * b3

#if !defined(__SDCC_STACK_AUTO) || defined(__SDCC_PARMS_IN_BANK1)
#if defined(__SDCC_PARMS_IN_BANK1)
	#define b0  (b1_0)
	#define b1  (b1_1)
	#define b2  (b1_2)
	#define b3  (b1_3)
#else
#if defined(__SDCC_NOOVERLAY)
	.area DSEG    (DATA)
#else
	.area OSEG    (OVR,DATA)
#endif

__mullong_PARM_2:

	.globl __mullong_PARM_2

	.ds	4

	b0 =  __mullong_PARM_2
	b1 = (__mullong_PARM_2+1)
	b2 = (__mullong_PARM_2+2)
	b3 = (__mullong_PARM_2+3)

#endif
	.area CSEG    (CODE)

				; parameter a comes in a, b, dph, dpl
	mov	r2,b		; save parameter a
	mov	r3,a

				;	Byte 0
	mov	a,a0
	mov	b,b0
	mul	ab		; a0 * b0
	mov	c0,a
	mov	c1,b

				;	Byte 1
	mov	a,a1
	mov	b,b0
	mul	ab		; a1 * b0
	add	a,c1
	mov	c1,a
	clr	a
	addc	a,b
	mov	c2,a

	mov	a,a0
	mov	b,b1
	mul	ab		; a0 * b1
	add	a,c1
	mov	c1,a
	mov	a,b
	addc	a,c2
	mov	c2,a
	clr	a
	rlc	a
	mov	c3,a

				;	Byte 2
	mov	a,a2
	mov	b,b0
	mul	ab		; a2 * b0
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	a,a1
	mov	b,b1
	mul	ab		; a1 * b1
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	a,a0
	mov	b,b2
	mul	ab		; a0 * b2
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

				;	Byte 3
	mov	a,a3
	mov	b,b0
	mul	ab		; a3 * b0
	add	a,c3
	mov	c3,a

	mov	a,a2
	mov	b,b1
	mul	ab		; a2 * b1
	add	a,c3
	mov	c3,a

	mov	a,a1
	mov	b,b2
	mul	ab		; a1 * b2
	add	a,c3
	mov	c3,a

	mov	a,a0
	mov	b,b3
	mul	ab		; a0 * b3
	add	a,c3

	mov	b,c2
	mov	dph,c1
	mov	dpl,c0
	ret

#else // __SDCC_STACK_AUTO

				; parameter a comes in a, b, dph, dpl
	mov	r2,b		; save parameter a
	mov	r3,a

	#define a0 dpl
	#define a1 dph
	#define a2 r2
	#define a3 r3

	#define b0 r1

	mov	a,#-2-3		;  1  return address 2 bytes, b 4 bytes
	add	a,sp		;  1
	mov	r0,a		;  1  r0 points to b0

				;	Byte 0
	mov	a,a0
	mov	b,@r0		; b0
	mov	b0,b		; we need b0 several times
	inc	r0		; r0 points to b1
	mul	ab		; a0 * b0
	mov	c0,a
	mov	c1,b

				;	Byte 1
	mov	a,a1
	mov	b,b0
	mul	ab		; a1 * b0
	add	a,c1
	mov	c1,a
	clr	a
	addc	a,b
	mov	c2,a

	mov	a,a0
	mov	b,@r0		; b1
	mul	ab		; a0 * b1
	add	a,c1
	mov	c1,a
	mov	a,b
	addc	a,c2
	mov	c2,a
	clr	a
	rlc	a
	mov	c3,a

				;	Byte 2
	mov	a,a2
	mov	b,b0
	mul	ab		; a2 * b0
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	a,a1
	mov	b,@r0		; b1
	mul	ab		; a1 * b1
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	a,a0
	inc	r0
	mov	b,@r0		; b2
	mul	ab		; a0 * b2
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

				;	Byte 3
	mov	a,a3
	mov	b,b0
	mul	ab		; a3 * b0
	add	a,c3
	mov	c3,a

	mov	a,a1
	mov	b,@r0		; b2
	mul	ab		; a1 * b2
	add	a,c3
	mov	c3,a

	mov	a,a2
	dec	r0
	mov	b,@r0		; b1
	mul	ab		; a2 * b1
	add	a,c3
	mov	c3,a

	mov	a,a0
	inc	r0
	inc	r0
	mov	b,@r0		; b3
	mul	ab		; a0 * b3
	add	a,c3

	mov	b,c2
	mov	dph,c1
	mov	dpl,c0

	ret

#endif // __SDCC_STACK_AUTO

	__endasm;
}

#elif defined(_MULLONG_ASM_LARGE)

void
_mullong_dummy (void) __naked
{
	__asm

__mullong:

	.globl __mullong

				; the result c will be stored in r4...r7
	#define c0 r4
	#define c1 r5
	#define c2 r6
	#define c3 r7

	; c0  a0 * b0
	; c1  a1 * b0 + a0 * b1
	; c2  a2 * b0 + a1 * b1 + a0 * b2
	; c3  a3 * b0 + a2 * b1 + a1 * b2 + a0 * b3

#if !defined(__SDCC_PARMS_IN_BANK1)
	.area XSEG    (XDATA)

__mullong_PARM_2:

	.globl __mullong_PARM_2

	.ds	4
#endif
	.area CSEG    (CODE)

				; parameter a comes in a, b, dph, dpl
	mov	r0,dpl		; save parameter a
	mov	r1,dph
	mov	r2,b
	mov	r3,a

	#define a0 r0
	#define a1 r1
	#define a2 r2
	#define a3 r3

				;	Byte 0
	mov	b,a0
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_0		; b0
#else
	mov	dptr,#__mullong_PARM_2
	movx	a,@dptr		; b0
#endif
	mul	ab		; a0 * b0
	mov	c0,a
	mov	c1,b

				;	Byte 1
	mov	b,a1
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_0		; b0
#else
	movx	a,@dptr		; b0
#endif
	mul	ab		; a1 * b0
	add	a,c1
	mov	c1,a
	clr	a
	addc	a,b
	mov	c2,a

	mov	b,a0
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_1		; b1
#else
	inc	dptr		; b1
	movx	a,@dptr
#endif
	mul	ab		; a0 * b1
	add	a,c1
	mov	c1,a
	mov	a,b
	addc	a,c2
	mov	c2,a
	clr	a
	rlc	a
	mov	c3,a

				;	Byte 2
	mov	b,a1
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_1		; b1
#else
	movx	a,@dptr		; b1
#endif
	mul	ab		; a1 * b1
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	b,a0
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_2		; b2
#else
	inc	dptr		; b2
	movx	a,@dptr
#endif
	mul	ab		; a0 * b2
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	b,a2
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_0		; b0
#else
	mov	dptr,#__mullong_PARM_2
	movx	a,@dptr		; b0
#endif
	mul	ab		; a2 * b0
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

				;	Byte 3
	mov	b,a3
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_0		; b0
#else
	movx	a,@dptr		; b0
#endif
	mul	ab		; a3 * b0
	add	a,c3
	mov	c3,a

	mov	b,a2
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_1		; b1
#else
	inc	dptr		; b1
	movx	a,@dptr
#endif
	mul	ab		; a2 * b1
	add	a,c3
	mov	c3,a

	mov	b,a1
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_2		; b2
#else
	inc	dptr		; b2
	movx	a,@dptr
#endif
	mul	ab		; a1 * b2
	add	a,c3
	mov	c3,a

	mov	b,a0
#if defined(__SDCC_PARMS_IN_BANK1)
	mov	a,b1_3		; b3
#else
	inc	dptr		; b3
	movx	a,@dptr
#endif
	mul	ab		; a0 * b3
	add	a,c3

	mov	b,c2
	mov	dph,c1
	mov	dpl,c0
	ret

	__endasm;
}

#elif defined(__SDCC_USE_XSTACK) && defined(__SDCC_STACK_AUTO)

void
_mullong_dummy (void) __naked
{
	__asm

__mullong:

	.globl __mullong

				; the result c will be stored in r4...r7
	#define c0 r4
	#define c1 r5
	#define c2 r6
	#define c3 r7

	#define a0 dpl
	#define a1 dph
	#define a2 r2
	#define a3 r3

	#define b0 r1

	; c0  a0 * b0
	; c1  a1 * b0 + a0 * b1
	; c2  a2 * b0 + a1 * b1 + a0 * b2
	; c3  a3 * b0 + a2 * b1 + a1 * b2 + a0 * b3

				; parameter a comes in a, b, dph, dpl
	mov	r2,b		; save parameter a
	mov	r3,a

	mov	a,#-4		;  1  b 4 bytes
	add	a,_spx		;  1
	mov	r0,a		;  1  r0 points to b0

				;	Byte 0
	movx	a,@r0		; b0
	mov	b0,a		; we need b0 several times
	inc	r0		; r0 points to b1
	mov	b,a0
	mul	ab		; a0 * b0
	mov	c0,a
	mov	c1,b

				;	Byte 1
	mov	a,a1
	mov	b,b0
	mul	ab		; a1 * b0
	add	a,c1
	mov	c1,a
	clr	a
	addc	a,b
	mov	c2,a

	mov	b,a0
	movx	a,@r0		; b1
	mul	ab		; a0 * b1
	add	a,c1
	mov	c1,a
	mov	a,b
	addc	a,c2
	mov	c2,a
	clr	a
	rlc	a
	mov	c3,a

				;	Byte 2
	mov	a,a2
	mov	b,b0
	mul	ab		; a2 * b0
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	b,a1
	movx	a,@r0		; b1
	mul	ab		; a1 * b1
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

	mov	b,a0
	inc	r0
	movx	a,@r0		; b2
	mul	ab		; a0 * b2
	add	a,c2
	mov	c2,a
	mov	a,b
	addc	a,c3
	mov	c3,a

				;	Byte 3
	mov	a,a3
	mov	b,b0
	mul	ab		; a3 * b0
	add	a,c3
	mov	c3,a

	mov	b,a1
	movx	a,@r0		; b2
	mul	ab		; a1 * b2
	add	a,c3
	mov	c3,a

	mov	b,a2
	dec	r0
	movx	a,@r0		; b1
	mul	ab		; a2 * b1
	add	a,c3
	mov	c3,a

	mov	b,a0
	inc	r0
	inc	r0
	movx	a,@r0		; b3
	mul	ab		; a0 * b3
	add	a,c3

	mov	b,c2
	mov	dph,c1
	mov	dpl,c0

	ret

	__endasm;
}

#else // _MULLONG_ASM

struct some_struct {
	short a ;
	char b;
	long c ;};
#if defined(__SDCC_hc08) || defined(__SDCC_s08) || defined(__SDCC_stm8)
/* big endian order */
union bil {
        struct {unsigned char b3,b2,b1,b0 ;} b;
        struct {unsigned short hi,lo ;} i;
        unsigned long l;
        struct { unsigned char b3; unsigned short i12; unsigned char b0;} bi;
} ;
#else
/* little endian order */
union bil {
        struct {unsigned char b0,b1,b2,b3 ;} b;
        struct {unsigned short lo,hi ;} i;
        unsigned long l;
        struct { unsigned char b0; unsigned short i12; unsigned char b3;} bi;
} ;
#endif

#if defined(__SDCC)
 #include <sdcc-lib.h>
#endif

#define bcast(x) ((union bil _AUTOMEM *)&(x))

/*
                     3   2   1   0
       X             3   2   1   0
       ----------------------------
                   0.3 0.2 0.1 0.0
               1.3 1.2 1.1 1.0
           2.3 2.2 2.1 2.0
       3.3 3.2 3.1 3.0
       ----------------------------
                  |3.3|1.3|0.2|0.0|   A
                    |2.3|0.3|0.1|     B
                    |3.2|1.2|1.0|     C
                      |2.2|1.1|       D
                      |3.1|2.0|       E
                        |2.1|         F
                        |3.0|         G
                          |-------> only this side 32 x 32 -> 32
*/
#if defined(__SDCC_USE_XSTACK)
// currently the original code without u fails with --xstack
// it runs out of pointer registers
long
_mullong (long a, long b)
{
        union bil t, u;

        t.i.hi   = bcast(a)->b.b0 * bcast(b)->b.b2;          // A
        t.i.lo   = bcast(a)->b.b0 * bcast(b)->b.b0;          // A
        u.bi.b3  = bcast(a)->b.b0 * bcast(b)->b.b3;          // B
        u.bi.i12 = bcast(a)->b.b0 * bcast(b)->b.b1;          // B
        u.bi.b0  = 0;                                        // B
        t.l += u.l;

        t.b.b3  += bcast(a)->b.b3 * bcast(b)->b.b0;          // G
        t.b.b3  += bcast(a)->b.b2 * bcast(b)->b.b1;          // F
        t.i.hi  += bcast(a)->b.b2 * bcast(b)->b.b0;          // E
        t.i.hi  += bcast(a)->b.b1 * bcast(b)->b.b1;          // D

        u.bi.b3  = bcast(a)->b.b1 * bcast(b)->b.b2;          // C
        u.bi.i12 = bcast(a)->b.b1 * bcast(b)->b.b0;          // C
        u.bi.b0  = 0;                                        // C
        t.l += u.l;

        return t.l;
}
#elif defined(__SDCC_z80) || defined(__SDCC_gbz80) || defined(__SDCC_r2k) || defined(__SDCC_r3k)
/* 32x32->32 multiplication to be used
   if 16x16->16 is faster than three 8x8->16.
   2009, by M.Bodrato ( http://bodrato.it/ )

   z80 and gbz80 don't have any hardware multiplication.
   r2k and r3k have 16x16 hardware multiplication.
 */
long
_mullong (long a, long b)
{
  unsigned short i12;

  bcast(a)->i.hi *= bcast(b)->i.lo;
  bcast(a)->i.hi += bcast(b)->i.hi * bcast(a)->i.lo;

  /* only (a->i.lo * b->i.lo) 16x16->32 to do. asm? */
  bcast(a)->i.hi += bcast(a)->b.b1 * bcast(b)->b.b1;

  i12 = bcast(b)->b.b0 * bcast(a)->b.b1;
  bcast(b)->bi.i12 = bcast(a)->b.b0 * bcast(b)->b.b1;

  /* add up the two partial result, store carry in b3 */
  bcast(b)->b.b3 = ((bcast(b)->bi.i12 += i12) < i12);

  bcast(a)->i.lo  = bcast(a)->b.b0 * bcast(b)->b.b0;

  bcast(b)->bi.b0 = 0;

  return a + b;
}
#elif defined(__SDCC_pic14)
long
_mullong (long a, long b)
{
        union bil x;
        union bil y;
        union bil t;
	x.l = a;
	y.l = b;

        t.i.hi = x.b.b0 * y.b.b2;           // A
        t.i.lo = x.b.b0 * y.b.b0;           // A
        t.b.b3 += x.b.b3 * y.b.b0;          // G
        t.b.b3 += x.b.b2 * y.b.b1;          // F
        t.i.hi += x.b.b2 * y.b.b0;          // E <- b lost in .lst
        // x.i.hi is free !
        t.i.hi += x.b.b1 * y.b.b1;          // D <- b lost in .lst

        x.bi.b3 = x.b.b1 * y.b.b2;  // C
        x.bi.i12 = x.b.b1 * y.b.b0; // C

        y.bi.b3 = x.b.b0 * y.b.b3;  // B
        y.bi.i12 = x.b.b0 * y.b.b1; // B

        y.bi.b0 = 0;                                // B
        x.bi.b0 = 0;                                // C
        t.l += (long)x.l;

        return t.l + (long)y.l;
}
#else
long
_mullong (long a, long b)
{
        union bil t;

        t.i.hi = bcast(a)->b.b0 * bcast(b)->b.b2;           // A
        t.i.lo = bcast(a)->b.b0 * bcast(b)->b.b0;           // A
        t.b.b3 += bcast(a)->b.b3 * bcast(b)->b.b0;          // G
        t.b.b3 += bcast(a)->b.b2 * bcast(b)->b.b1;          // F
        t.i.hi += bcast(a)->b.b2 * bcast(b)->b.b0;          // E <- b lost in .lst
        // bcast(a)->i.hi is free !
        t.i.hi += bcast(a)->b.b1 * bcast(b)->b.b1;          // D <- b lost in .lst

        bcast(a)->bi.b3 = bcast(a)->b.b1 * bcast(b)->b.b2;  // C
        bcast(a)->bi.i12 = bcast(a)->b.b1 * bcast(b)->b.b0; // C

        bcast(b)->bi.b3 = bcast(a)->b.b0 * bcast(b)->b.b3;  // B
        bcast(b)->bi.i12 = bcast(a)->b.b0 * bcast(b)->b.b1; // B

        bcast(b)->bi.b0 = 0;                                // B
        bcast(a)->bi.b0 = 0;                                // C
        t.l += a;

        return t.l + b;
}
#endif

#endif // _MULLONG_ASM