OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [mull.cgs] - Blame information for rev 26

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 jlechner
# sh testcase for mul.l $rm, $rn -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
 
10
        .global mull
11
mull:
12
        mov #3, r0
13
        mov #5, r1
14
        mul.l r0, r1
15
 
16
        # Check the result.
17
        sts macl, r3
18
        mov #15, r4
19
        cmp/eq r3, r4
20
        bf wrong
21
 
22
lxs:
23
        # Large * small.
24
        mov #255, r0
25
        mov #0, r1
26
        mul.l r0, r1
27
 
28
        # Check the result.
29
        sts macl, r3
30
        mov #0, r4
31
        cmp/eq r3, r4
32
        bf wrong
33
 
34
sxl:
35
        # Small * large.
36
        mov #0, r0
37
        mov #255, r1
38
        mul.l r0, r1
39
 
40
        # Check the result.
41
        sts macl, r3
42
        mov #0, r4
43
        cmp/eq r3, r4
44
        bf wrong
45
 
46
lxl:
47
        # Large * large.
48
        mov #1, r0
49
        neg r0, r0
50
        mov #2, r1
51
        mul.l r0, r1
52
 
53
        # Check the result.
54
        sts macl, r3
55
        mov #2, r4
56
        neg r4, r4
57
        cmp/eq r3, r4
58
        bf wrong
59
 
60
okay:
61
        pass
62
 
63
wrong:
64
        fail

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.