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/] [subv.cgs] - Blame information for rev 157

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for subv $rm, $rn -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
zero:
10
        mov #0, r0
11
        mov #0, r1
12
        subv r0, r1
13
        bt wrong
14
        assert r1, #0
15
 
16
one:
17
        mov #10, r0
18
        mov #0, r1
19
        subv r0, r1
20
        bt wrong
21
        not r1, r1
22
        assert r1, #9
23
 
24
large:
25
        # Produce MAXINT in R0.
26
        mov #0, r0
27
        not r0, r0
28
        shlr r0
29
 
30
        # Put -3 into R1.
31
        mov #3, r1
32
        neg r1, r1
33
 
34
        # Subtract them and underflow.
35
        subv r0, r1
36
        bf wrong
37
 
38
another:
39
        # Produce MAXINT in R0.
40
        mov #0, r0
41
        not r0, r0
42
        shlr r0
43
 
44
        # Put -3 into R1.
45
        mov #3, r1
46
        neg r1, r1
47
 
48
        # Subtract them and overflow.
49
        subv r1, r0
50
        bf wrong
51
 
52
okay:
53
        pass
54
wrong:
55
        fail

powered by: WebSVN 2.1.0

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