Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/arm/__muldi3.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File MIME type: text/plain
File size: 282 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

1 #include <stdint.h>
2
3 uint64_t __muldi3(uint64_t a, uint64_t b)
4 {
5 uint32_t al = (uint32_t)a;
6 uint32_t ah = (uint32_t)(a >> 32);
7 uint32_t bl = (uint32_t)b;
8 uint32_t bh = (uint32_t)(b >> 32);
9 uint64_t v;
10
11 v = (uint64_t)al * bl;
12 v += (uint64_t)(al*bh+ah*bl) << 32;
13
14 return v;
15 }