projects
/
deliverable
/
binutils-gdb.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
ef2dfa6e929a2d5680ec2022b2fb3e7f31d3f666
[deliverable/binutils-gdb.git]
/
sim
/
testsuite
/
sim
/
sh64
/
compact
/
macl.cgs
1
# sh testcase for mac.l @${rm}+, @${rn}+
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
6
.include "compact/testutils.inc"
7
8
start
9
# force S-bit clear
10
clrs
11
12
# Store some magic numbers in memory.
13
mov #40, r1
14
shll8 r1
15
mov #85, r0
16
mov.l r0, @r1
17
# Keep for later.
18
mov r1, r10
19
store2:
20
mov #40, r1
21
shll8 r1
22
add #12, r1
23
mov #17, r0
24
mov.l r0, @r1
25
# Keep for later.
26
mov r1, r11
27
28
init:
29
# Set up addresses.
30
mov #40, r1
31
shll8 r1
32
mov #40, r2
33
shll8 r2
34
add #12, r2
35
36
# Prime {MACL, MACH} to #1.
37
mov #1, r3
38
dmulu.l r3, r3
39
40
test:
41
mac.l @r1+, @r2+
42
43
check:
44
# Check result.
45
sts mach, r5
46
assert r5, #0
47
48
mov #5, r0
49
shll8 r0
50
or #166, r0
51
sts macl, r6
52
cmp/eq r6, r0
53
bf wrong
54
55
# Ensure post-increment occurred.
56
add #4, r10
57
cmp/eq r10, r1
58
bf wrong
59
60
add #4, r11
61
cmp/eq r11, r2
62
bf wrong
63
64
doubleinc:
65
mov #40, r0
66
shll8 r0
67
mov r0, r1
68
mac.l @r0+, @r0+
69
add #16, r1
70
cmp/eq r0, r1
71
bf wrong
72
73
okay:
74
pass
75
wrong:
76
fail
This page took
0.032226 seconds
and
3
git commands to generate.