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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [sub.cgs] - Blame information for rev 280

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for sub $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 sub1
11
sub1:
12
        # 0 - x.
13
        mov #0, r0
14
        mov #3, r1
15
        sub r1, r0
16
 
17
        mov #2, r7
18
        not r7, r7
19
        cmp/eq r7, r0
20
        bf wrong
21
 
22
        .global sub2
23
sub2:
24
        # x - 0.
25
        mov #0, r0
26
        mov #3, r1
27
        sub r0, r1
28
        assert r1, #3
29
 
30
        .global sub3
31
sub3:
32
        # x - y.
33
        mov #4, r0
34
        mov #3, r1
35
        sub r0, r1
36
 
37
        mov #0, r7
38
        not r7, r7
39
        cmp/eq r7, r1
40
        bf wrong
41
 
42
        .global sub4
43
sub4:
44
        # y - x.
45
        mov #4, r0
46
        mov #3, r1
47
        sub r1, r0
48
        assert r0, #1
49
 
50
        .global sub5
51
sub5:
52
        # y - y == 0 (where y are in two distinct registers).
53
        mov #4, r0
54
        mov #4, r1
55
        sub r1, r0
56
        assert r0, #0
57
 
58
        .global sub6
59
sub6:
60
        # y - y = 0 (where y is the same register).
61
        mov #4, r1
62
        sub r1, r1
63
        assert r1, #0
64
 
65
okay:
66
        pass
67
wrong:
68
        fail

powered by: WebSVN 2.1.0

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