7 extern inline int cris_addc(int a
, const int b
) {
8 asm ("addc\t%1, %0\n" : "+r" (a
) : "r" (b
));
12 #define verify_addc(a, b, res, n, z, v, c) \
15 r = cris_addc((a), (b)); \
16 cris_tst_cc((n), (z), (v), (c)); \
24 asm volatile ("clearf cz");
25 verify_addc(0, 0, 0, 0, 0, 0, 0);
28 asm volatile ("setf z");
29 verify_addc(0, 0, 0, 0, 1, 0, 0);
32 asm volatile ("setf cz");
33 verify_addc(0, 0, 1, 0, 0, 0, 0);
35 asm volatile ("clearf c");
36 verify_addc(-1, 2, 1, 0, 0, 0, 1);
39 asm volatile ("clearf nzv");
40 asm volatile ("setf c");
41 verify_addc(-1, 2, 2, 0, 0, 0, 1);
44 asm volatile ("setf c");
45 verify_addc(0xffff, 0xffff, 0x1ffff, 0, 0, 0, 0);
48 asm volatile ("clearf nzvc");
49 verify_addc(-1, -1, 0xfffffffe, 1, 0, 0, 1);
52 asm volatile ("setf c");
53 verify_addc(0x78134452, 0x5432f789, 0xcc463bdc, 1, 0, 1, 0);