7 static inline int cris_addc(int a
, const int b
)
9 asm ("addc\t%1, %0\n" : "+r" (a
) : "r" (b
));
13 #define verify_addc(a, b, res, n, z, v, c) \
16 r = cris_addc((a), (b)); \
17 cris_tst_cc((n), (z), (v), (c)); \
25 asm volatile ("clearf cz");
26 verify_addc(0, 0, 0, 0, 0, 0, 0);
29 asm volatile ("setf z");
30 verify_addc(0, 0, 0, 0, 1, 0, 0);
33 asm volatile ("setf cz");
34 verify_addc(0, 0, 1, 0, 0, 0, 0);
36 asm volatile ("clearf c");
37 verify_addc(-1, 2, 1, 0, 0, 0, 1);
40 asm volatile ("clearf nzv");
41 asm volatile ("setf c");
42 verify_addc(-1, 2, 2, 0, 0, 0, 1);
45 asm volatile ("setf c");
46 verify_addc(0xffff, 0xffff, 0x1ffff, 0, 0, 0, 0);
49 asm volatile ("clearf nzvc");
50 verify_addc(-1, -1, 0xfffffffe, 1, 0, 0, 1);
53 asm volatile ("setf c");
54 verify_addc(0x78134452, 0x5432f789, 0xcc463bdc, 1, 0, 1, 0);