Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | /* __muldi3.S: 64-bit multiply |
2 | * | |
3 | * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. | |
4 | * Written by David Howells (dhowells@redhat.com) | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public License | |
8 | * as published by the Free Software Foundation; either version | |
9 | * 2 of the License, or (at your option) any later version. | |
10 | */ | |
11 | ||
12 | .text | |
13 | .p2align 4 | |
14 | ||
15 | ############################################################################### | |
16 | # | |
17 | # unsigned long long __muldi3(unsigned long long x [GR8:GR9], | |
18 | # unsigned long long y [GR10:GR11]) | |
19 | # | |
20 | ############################################################################### | |
21 | .globl __muldi3, __mulll, __umulll | |
22 | .type __muldi3,@function | |
23 | __muldi3: | |
24 | __mulll: | |
25 | __umulll: | |
26 | umul gr8,gr11,gr4 ; GR4:GR5 = x.MSW * y.LSW | |
27 | umul gr9,gr10,gr6 ; GR6:GR7 = x.LSW * y.MSW | |
28 | umul.p gr9,gr11,gr8 ; GR8:GR9 = x.LSW * y.LSW | |
29 | add gr5,gr7,gr5 | |
30 | add.p gr8,gr5,gr8 ; GR8 += GR5 + GR7 | |
31 | bralr | |
32 | .size __muldi3, .-__muldi3 |