OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains3x.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Support for Toshiba MeP.
[pf3gnuchains/pf3gnuchains3x.git]
/
sid
/
component
/
testsuite
/
sidcomp.cgen-cpu.mep
/
maddru.cgs
1
# mep testcase for maddru $rn,$rm -*- Asm -*-
2
# configline(): set cpu mul-option? true
3
# mach: all
4
5
.include "testutils.inc"
6
.macro assert_hilo hi lo
7
ldc $8, $hi
8
assert $8, \hi
9
ldc $8, $lo
10
assert $8, \lo
11
.endm
12
13
start
14
.global maddru
15
maddru:
16
# Init.
17
mov $0, 0
18
stc $0, $lo
19
stc $0, $hi
20
21
# 0 * 0 = 0.
22
mov $1, 0
23
mov $2, 0
24
maddru $1, $2
25
assert_hilo 0, 0
26
assert $1, 0
27
28
# 2 * 3 = 6, total=6.
29
mov $1, 2
30
mov $2, 3
31
maddru $1, $2
32
assert_hilo 0, 6
33
assert $1, 6
34
35
# 2 * -3 = BIG.
36
mov $1, 2
37
mov $2, -3
38
maddru $1, $2
39
assert_hilo 2, 0
40
assert $1, 0
41
42
okay:
43
pass
44
wrong:
45
fail