source:
trunk/libs/newlib/src/newlib/libc/machine/h8500/mulhi3.c
@
444
Last change on this file since 444 was 444, checked in by , 6 years ago | |
---|---|
File size: 153 bytes |
Line | |
---|---|
1 | |
2 | |
3 | short |
4 | __mulhi3(short a, short b) |
5 | { |
6 | int r; |
7 | |
8 | r = 0; |
9 | while (a) |
10 | { |
11 | if (a & 1) |
12 | { |
13 | r += b; |
14 | a>>=1; |
15 | b<<=1; |
16 | } |
17 | } |
18 | return r; |
19 | } |
20 | |
21 |
Note: See TracBrowser
for help on using the repository browser.