blob: 54588f12142ab6ffc3d4e9ddb123a5e12f055f9d [file] [log] [blame]
Dan Gohman2d65d352009-08-25 15:38:29 +00001// RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002
3
4struct DWstruct {
5 char high, low;
6};
7
8typedef union {
9 struct DWstruct s;
10 short ll;
11} DWunion;
12
13short __udivmodhi4 (char n1, char bm) {
14 DWunion rr;
15
16 if (bm == 0)
17 {
18 rr.s.high = n1;
19 }
20 else
21 {
22 rr.s.high = bm;
23 }
24
25 return rr.ll;
26}