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

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

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for addv $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
        addv r0, r1
13
        # Assert !T and #0.
14
        bt wrong
15
        assert r1, #0
16
 
17
one:
18
        mov #0, r0
19
        mov #1, r1
20
        addv r0, r1
21
        # Assert !T and #1.
22
        bt wrong
23
        assert r1, #1
24
 
25
large:
26
        # Produce MAXINT in R0.
27
        mov #0, r0
28
        not r0, r0
29
        shlr r0
30
 
31
        # Put #3 into R1.
32
        mov #3, r1
33
 
34
        # Add them and overflow.
35
        addv r0, r1
36
 
37
        # Assert T and overflowed value.
38
        bf wrong
39
        mov #1, r7
40
        rotr r7
41
        add #2, r7
42
        cmp/eq r1, r7
43
        bf wrong
44
 
45
okay:
46
        pass
47
wrong:
48
        fail

powered by: WebSVN 2.1.0

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