From 8a0efa53e44919bcf5ccb1d3353618a82afdf8bc Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 17 Feb 2000 19:39:52 +0000 Subject: import newlib-2000-02-17 snapshot --- newlib/libc/machine/h8500/mulhi3.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 newlib/libc/machine/h8500/mulhi3.c (limited to 'newlib/libc/machine/h8500/mulhi3.c') diff --git a/newlib/libc/machine/h8500/mulhi3.c b/newlib/libc/machine/h8500/mulhi3.c new file mode 100644 index 000000000..869e131ea --- /dev/null +++ b/newlib/libc/machine/h8500/mulhi3.c @@ -0,0 +1,21 @@ + + +short +__mulhi3(short a, short b) +{ + int r; + + r = 0; + while (a) + { + if (a & 1) + { + r += b; + a>>=1; + b<<=1; + } + } + return r; +} + + -- cgit v1.2.3