1*4c3eb207Smrg /* Copyright (C) 2000-2020 Free Software Foundation, Inc.
2627f7eb2Smrg
3627f7eb2Smrg This file is part of GCC.
4627f7eb2Smrg
5627f7eb2Smrg GCC is free software; you can redistribute it and/or modify it under
6627f7eb2Smrg the terms of the GNU General Public License as published by the Free
7627f7eb2Smrg Software Foundation; either version 3, or (at your option) any later
8627f7eb2Smrg version.
9627f7eb2Smrg
10627f7eb2Smrg GCC is distributed in the hope that it will be useful, but WITHOUT ANY
11627f7eb2Smrg WARRANTY; without even the implied warranty of MERCHANTABILITY or
12627f7eb2Smrg FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13627f7eb2Smrg for more details.
14627f7eb2Smrg
15627f7eb2Smrg Under Section 7 of GPL version 3, you are granted additional
16627f7eb2Smrg permissions described in the GCC Runtime Library Exception, version
17627f7eb2Smrg 3.1, as published by the Free Software Foundation.
18627f7eb2Smrg
19627f7eb2Smrg You should have received a copy of the GNU General Public License and
20627f7eb2Smrg a copy of the GCC Runtime Library Exception along with this program;
21627f7eb2Smrg see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22627f7eb2Smrg <http://www.gnu.org/licenses/>. */
23627f7eb2Smrg
24627f7eb2Smrg extern unsigned short __udivmodhi4(unsigned short num, unsigned short den,
25627f7eb2Smrg int modwanted);
26627f7eb2Smrg
27627f7eb2Smrg unsigned short
__udivhi3(unsigned short a,unsigned short b)28627f7eb2Smrg __udivhi3 (unsigned short a, unsigned short b)
29627f7eb2Smrg {
30627f7eb2Smrg return __udivmodhi4 (a, b, 0);
31627f7eb2Smrg }
32627f7eb2Smrg
33627f7eb2Smrg unsigned short
__umodhi3(unsigned short a,unsigned short b)34627f7eb2Smrg __umodhi3 (unsigned short a, unsigned short b)
35627f7eb2Smrg {
36627f7eb2Smrg return __udivmodhi4 (a, b, 1);
37627f7eb2Smrg }
38627f7eb2Smrg
39