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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [neg.cgs] - Blame information for rev 227

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# sh testcase for neg $rm, $rn -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        .macro signbit sign
9
        shlr16 r1
10
        shlr8 r1
11
        shlr r1
12
        shlr r1
13
        shlr r1
14
        shlr r1
15
        shlr r1
16
        shlr r1
17
        shlr r1
18
        assert r1, \sign
19
        .endm
20
        start
21
 
22
        .global neg
23
neg:
24
        mov #0, r0
25
        neg r0, r1
26
        signbit #0
27
 
28
        mov #42, r0
29
        neg r0, r1
30
        signbit #1
31
 
32
        mov #0, r0
33
        or #25, r0
34
        neg r0, r1
35
        signbit #1
36
 
37
        # neg(0) is 0.
38
        mov #0, r0
39
        neg r0, r1
40
        signbit #0
41
 
42
        # neg(neg(x)) = x.
43
        mov #42, r0
44
        neg r0, r1
45
        signbit #1
46
        mov #42, r0
47
        neg r0, r2
48
        neg r2, r1
49
        signbit #0
50
 
51
okay:
52
        pass
53
 
54
wrong:
55
        fail

powered by: WebSVN 2.1.0

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