7 extern inline int cris_bound_b(int v
, int b
) {
9 asm ("bound.b\t%1, %0\n" : "+r" (r
) : "ri" (b
));
13 extern inline int cris_bound_w(int v
, int b
) {
15 asm ("bound.w\t%1, %0\n" : "+r" (r
) : "ri" (b
));
19 extern inline int cris_bound_d(int v
, int b
) {
21 asm ("bound.d\t%1, %0\n" : "+r" (r
) : "ri" (b
));
30 r
= cris_bound_d(-1, 2);
31 cris_tst_cc(0, 0, 0, 0);
36 r
= cris_bound_d(2, 0xffffffff);
37 cris_tst_cc(0, 0, 0, 0);
42 r
= cris_bound_d(0xffff, 0xffff);
43 cris_tst_cc(0, 0, 0, 0);
48 r
= cris_bound_d(-1, 0xffffffff);
49 cris_tst_cc(1, 0, 0, 0);
54 r
= cris_bound_d(0x78134452, 0x5432f789);
55 cris_tst_cc(0, 0, 0, 0);
60 r
= cris_bound_w(-1, 2);
61 cris_tst_cc(0, 0, 0, 0);
66 r
= cris_bound_w(-1, 0xffff);
67 cris_tst_cc(0, 0, 0, 0);
72 r
= cris_bound_w(2, 0xffff);
73 cris_tst_cc(0, 0, 0, 0);
78 r
= cris_bound_w(0xfedaffff, 0xffff);
79 cris_tst_cc(0, 0, 0, 0);
84 r
= cris_bound_w(0x78134452, 0xf789);
85 cris_tst_cc(0, 0, 0, 0);
90 r
= cris_bound_b(-1, 2);
91 cris_tst_cc(0, 0, 0, 0);
96 r
= cris_bound_b(2, 0xff);
97 cris_tst_cc(0, 0, 0, 0);
102 r
= cris_bound_b(-1, 0xff);
103 cris_tst_cc(0, 0, 0, 0);
108 r
= cris_bound_b(0xff, 0xff);
109 cris_tst_cc(0, 0, 0, 0);
114 r
= cris_bound_b(0xfeda49ff, 0xff);
115 cris_tst_cc(0, 0, 0, 0);
120 r
= cris_bound_b(0x78134452, 0x89);
121 cris_tst_cc(0, 0, 0, 0);
126 r
= cris_bound_w(0x78134452, 0);
127 cris_tst_cc(0, 1, 0, 0);
132 r
= cris_bound_b(0xffff, -1);
133 cris_tst_cc(0, 0, 0, 0);