Chris Lattner | 75fb432 | 2002-09-19 04:23:59 +0000 | [diff] [blame^] | 1 | |
2 | struct DWstruct { | ||||
3 | char high, low; | ||||
4 | }; | ||||
5 | |||||
6 | typedef union { | ||||
7 | struct DWstruct s; | ||||
8 | short ll; | ||||
9 | } DWunion; | ||||
10 | |||||
11 | short __udivmodhi4 (char n1, char bm) { | ||||
12 | DWunion rr; | ||||
13 | |||||
14 | if (bm == 0) | ||||
15 | { | ||||
16 | rr.s.high = n1; | ||||
17 | } | ||||
18 | else | ||||
19 | { | ||||
20 | rr.s.high = bm; | ||||
21 | } | ||||
22 | |||||
23 | return rr.ll; | ||||
24 | } |