blob: ea8bef7e2731cc8f0e795c1d6da4cf68bf61378f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* { dg-do compile } */
/* { dg-options "-O2 -mtune=generic" } */
/* { dg-final { scan-assembler "adc" } } */
/* { dg-final { scan-assembler-not "jmp" } } */
typedef unsigned long u64;
typedef struct {
u64 hi, lo;
} u128;
static inline u128 add_u128 (u128 a, u128 b)
{
a.hi += b.hi;
a.lo += b.lo;
if (a.lo < b.lo)
a.hi++;
return a;
}
extern u128 t1, t2, t3;
void foo (void)
{
t1 = add_u128 (t1, t2);
t1 = add_u128 (t1, t3);
}
|