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/] [sh/] [fcmpeq.s] - Blame information for rev 227

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
# sh testcase for fcmpeq
2
# mach: sh
3
# as(sh):       -defsym sim_cpu=0
4
 
5
        .include "testutils.inc"
6
 
7
        start
8
fcmpeq_single:
9
        set_grs_a5a5
10
        set_fprs_a5a5
11
        # 1.0 == 1.0.
12
        fldi1   fr0
13
        fldi1   fr1
14
        fcmp/eq fr0, fr1
15
        bt      .L0
16
        fail
17
.L0:
18
        # 0.0 != 1.0.
19
        fldi0   fr0
20
        fldi1   fr1
21
        fcmp/eq fr0, fr1
22
        bf      .L1
23
        fail
24
.L1:
25
        # 1.0 != 0.0.
26
        fldi1   fr0
27
        fldi0   fr1
28
        fcmp/eq fr0, fr1
29
        bf      .L2
30
        fail
31
.L2:
32
        # 2.0 != 1.0
33
        fldi1   fr0
34
        fadd    fr0, fr0
35
        fldi1   fr1
36
        fcmp/eq fr0, fr1
37
        bf      .L3
38
        fail
39
.L3:
40
        test_grs_a5a5
41
        assert_fpreg_i  2, fr0
42
        assert_fpreg_i  1, fr1
43
        test_fpr_a5a5   fr2
44
        test_fpr_a5a5   fr3
45
        test_fpr_a5a5   fr4
46
        test_fpr_a5a5   fr5
47
        test_fpr_a5a5   fr6
48
        test_fpr_a5a5   fr7
49
        test_fpr_a5a5   fr8
50
        test_fpr_a5a5   fr9
51
        test_fpr_a5a5   fr10
52
        test_fpr_a5a5   fr11
53
        test_fpr_a5a5   fr12
54
        test_fpr_a5a5   fr13
55
        test_fpr_a5a5   fr14
56
        test_fpr_a5a5   fr15
57
 
58
fcmpeq_double:
59
        # 1.0 == 1.0
60
        set_grs_a5a5
61
        set_fprs_a5a5
62
        double_prec
63
        fldi1 fr0
64
        fldi1 fr2
65
        _s2d fr0, dr0
66
        _s2d fr2, dr2
67
        fcmp/eq dr0, dr2
68
        bt      .L10
69
        fail
70
.L10:
71
        # 0.0 != 1.0
72
        fldi0 fr0
73
        fldi1 fr2
74
        _s2d fr0, dr0
75
        _s2d fr2, dr2
76
        fcmp/eq dr0, dr2
77
        bf      .L11
78
        fail
79
.L11:
80
        # 1.0 != 0.0
81
        fldi1 fr0
82
        fldi0 fr2
83
        _s2d fr0, dr0
84
        _s2d fr2, dr2
85
        fcmp/eq dr0, dr2
86
        bf      .L12
87
        fail
88
.L12:
89
        # 2.0 != 1.0
90
        fldi1 fr0
91
        single_prec
92
        fadd fr0, fr0
93
        double_prec
94
        fldi1 fr2
95
        _s2d fr0, dr0
96
        _s2d fr2, dr2
97
        fcmp/eq dr0, dr2
98
        bf      .L13
99
        fail
100
.L13:
101
        test_grs_a5a5
102
        assert_dpreg_i  2, dr0
103
        assert_dpreg_i  1, dr2
104
        test_fpr_a5a5   fr4
105
        test_fpr_a5a5   fr5
106
        test_fpr_a5a5   fr6
107
        test_fpr_a5a5   fr7
108
        test_fpr_a5a5   fr8
109
        test_fpr_a5a5   fr9
110
        test_fpr_a5a5   fr10
111
        test_fpr_a5a5   fr11
112
        test_fpr_a5a5   fr12
113
        test_fpr_a5a5   fr13
114
        test_fpr_a5a5   fr14
115
        test_fpr_a5a5   fr15
116
 
117
        pass
118
        exit 0
119
 

powered by: WebSVN 2.1.0

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