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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for fabs -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
        _clrpr
10
        # fabs(0.0) = 0.0.
11
        fldi0 fr0
12
        fabs fr0
13
        fldi0 fr1
14
        fcmp/eq fr0, fr1
15
        bf wrong
16
 
17
        # fabs(1.0) = 1.0.
18
        fldi1 fr0
19
        fabs fr0
20
        fldi1 fr1
21
        fcmp/eq fr0, fr1
22
        bf wrong
23
 
24
        # fabs(-1.0) = 1.0.
25
        fldi1 fr0
26
        fneg fr0
27
        fabs fr0
28
        fldi1 fr1
29
        fcmp/eq fr0, fr1
30
        bf wrong
31
 
32
        bra double
33
        nop
34
 
35
wrong:
36
        fail
37
 
38
double:
39
        # double precision tests.
40
        # fabs(0.0) = 0.0.
41
        fldi0 fr0
42
        _s2d fr0, dr0
43
        _setpr
44
        fabs dr0
45
        _clrpr
46
        # check.
47
        fldi0 fr2
48
        _s2d fr2, dr2
49
        _setpr
50
        fcmp/eq dr0, dr2
51
        bf wrong
52
        _clrpr
53
 
54
one:
55
        # fabs(1.0) = 1.0.
56
        fldi1 fr0
57
        _s2d fr0, dr0
58
        _setpr
59
        fabs dr0
60
        _clrpr
61
        # check.
62
        fldi1 fr2
63
        _s2d fr2, dr2
64
        _setpr
65
        fcmp/eq dr0, dr2
66
        bf wrong2
67
        _clrpr
68
 
69
minusone:
70
        # fabs(-1.0) = 1.0.
71
        fldi1 fr0
72
        fneg fr0
73
        _s2d fr0, dr0
74
        _setpr
75
        fabs dr0
76
        _clrpr
77
        # check.
78
        fldi1 fr2
79
        _s2d fr2, dr2
80
        _setpr
81
        fcmp/eq dr0, dr2
82
        bf wrong2
83
        _clrpr
84
 
85
okay:
86
        pass
87
wrong2:
88
        fail

powered by: WebSVN 2.1.0

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