7 static inline int cris_bound_b(int v
, int b
)
10 asm ("bound.b\t%1, %0\n" : "+r" (r
) : "ri" (b
));
14 static inline int cris_bound_w(int v
, int b
)
17 asm ("bound.w\t%1, %0\n" : "+r" (r
) : "ri" (b
));
21 static inline int cris_bound_d(int v
, int b
)
24 asm ("bound.d\t%1, %0\n" : "+r" (r
) : "ri" (b
));
33 r
= cris_bound_d(-1, 2);
34 cris_tst_cc(0, 0, 0, 0);
39 r
= cris_bound_d(2, 0xffffffff);
40 cris_tst_cc(0, 0, 0, 0);
45 r
= cris_bound_d(0xffff, 0xffff);
46 cris_tst_cc(0, 0, 0, 0);
51 r
= cris_bound_d(-1, 0xffffffff);
52 cris_tst_cc(1, 0, 0, 0);
57 r
= cris_bound_d(0x78134452, 0x5432f789);
58 cris_tst_cc(0, 0, 0, 0);
63 r
= cris_bound_w(-1, 2);
64 cris_tst_cc(0, 0, 0, 0);
69 r
= cris_bound_w(-1, 0xffff);
70 cris_tst_cc(0, 0, 0, 0);
75 r
= cris_bound_w(2, 0xffff);
76 cris_tst_cc(0, 0, 0, 0);
81 r
= cris_bound_w(0xfedaffff, 0xffff);
82 cris_tst_cc(0, 0, 0, 0);
87 r
= cris_bound_w(0x78134452, 0xf789);
88 cris_tst_cc(0, 0, 0, 0);
93 r
= cris_bound_b(-1, 2);
94 cris_tst_cc(0, 0, 0, 0);
99 r
= cris_bound_b(2, 0xff);
100 cris_tst_cc(0, 0, 0, 0);
105 r
= cris_bound_b(-1, 0xff);
106 cris_tst_cc(0, 0, 0, 0);
111 r
= cris_bound_b(0xff, 0xff);
112 cris_tst_cc(0, 0, 0, 0);
117 r
= cris_bound_b(0xfeda49ff, 0xff);
118 cris_tst_cc(0, 0, 0, 0);
123 r
= cris_bound_b(0x78134452, 0x89);
124 cris_tst_cc(0, 0, 0, 0);
129 r
= cris_bound_w(0x78134452, 0);
130 cris_tst_cc(0, 1, 0, 0);
135 r
= cris_bound_b(0xffff, -1);
136 cris_tst_cc(0, 0, 0, 0);