]>
Commit | Line | Data |
---|---|---|
f3c7eb69 DE |
1 | # m32r testcase for addx $dr,$sr |
2 | # mach(): m32r m32rx | |
3 | ||
4 | .include "testutils.inc" | |
5 | ||
6 | start | |
7 | ||
8 | .global addx | |
9 | addx: | |
10 | mvi_h_condbit 1 | |
11 | mvi_h_gr r4, 1 | |
12 | mvi_h_gr r5, 2 | |
13 | addx r4, r5 | |
14 | bc not_ok | |
15 | test_h_gr r4, 4 | |
16 | ||
17 | mvi_h_gr r4, 0xfffffffe | |
18 | addx r4, r5 | |
19 | bnc not_ok | |
20 | test_h_gr r4, 0 | |
21 | ||
22 | mvi_h_gr r4, -1 | |
23 | mvi_h_gr r5, -1 | |
24 | mvi_h_condbit 1 | |
25 | addx r4,r5 | |
26 | bnc not_ok | |
27 | test_h_gr r4, -1 | |
28 | ||
29 | mvi_h_gr r4,-1 | |
30 | mvi_h_gr r5,0x7fffffff | |
31 | mvi_h_condbit 1 | |
32 | addx r5,r4 | |
33 | bnc not_ok | |
34 | test_h_gr r5,0x7fffffff | |
35 | ||
36 | pass | |
37 | ||
38 | not_ok: | |
39 | fail |