Statistics
| Branch: | Revision:

root / tests / tcg / lm32 / test_mul.S @ c09015dd

History | View | Annotate | Download (793 Bytes)

1
.include "macros.inc"
2

    
3
start
4

    
5
test_name MUL_1
6
mvi r1, 0
7
mvi r2, 0
8
mul r3, r1, r2
9
check_r3 0
10

    
11
test_name MUL_2
12
mvi r1, 1
13
mvi r2, 0
14
mul r3, r1, r2
15
check_r3 0
16

    
17
test_name MUL_3
18
mvi r1, 0
19
mvi r2, 1
20
mul r3, r1, r2
21
check_r3 0
22

    
23
test_name MUL_4
24
mvi r1, 1
25
mvi r2, 1
26
mul r3, r1, r2
27
check_r3 1
28

    
29
test_name MUL_5
30
mvi r1, 2
31
mvi r2, -1
32
mul r3, r1, r2
33
check_r3 -2
34

    
35
test_name MUL_6
36
mvi r1, -2
37
mvi r2, -1
38
mul r3, r1, r2
39
check_r3 2
40

    
41
test_name MUL_7
42
mvi r1, 0x1234
43
mvi r2, 0x789
44
mul r3, r1, r2
45
check_r3 0x8929d4
46

    
47
test_name MUL_8
48
mvi r3, 4
49
mul r3, r3, r3
50
check_r3 16
51

    
52
test_name MUL_9
53
mvi r2, 2
54
mvi r3, 4
55
mul r3, r3, r2
56
check_r3 8
57

    
58
test_name MUL_10
59
load r1 0x12345678
60
load r2 0x7bcdef12
61
mul r3, r1, r2
62
check_r3 0xa801c70
63

    
64
test_name MUL_11
65
load r1 0x12345678
66
load r2 0xabcdef12
67
mul r3, r1, r2
68
check_r3 0x8a801c70
69

    
70
end