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

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

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for fmul -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
        # 0.0 - 0.0 = 0.0.
10
        fldi0 fr0
11
        fldi0 fr1
12
        fsub fr0, fr1
13
        fldi0 fr2
14
        fcmp/eq fr1, fr2
15
        bf wrong
16
 
17
        # 1.0 - 0.0 = 1.0.
18
        fldi0 fr0
19
        fldi1 fr1
20
        fsub fr0, fr1
21
        fldi1 fr2
22
        fcmp/eq fr1, fr2
23
        bf wrong
24
 
25
        # 1.0 - 1.0 = 0.0.
26
        fldi1 fr0
27
        fldi1 fr1
28
        fsub fr0, fr1
29
        fldi0 fr2
30
        fcmp/eq fr1, fr2
31
        bf wrong
32
 
33
        # 0.0 - 1.0 = -1.0.
34
        fldi1 fr0
35
        fldi0 fr1
36
        fsub fr0, fr1
37
        fldi1 fr2
38
        fneg fr2
39
        fcmp/eq fr1, fr2
40
        bf wrong
41
 
42
        bra double
43
        nop
44
 
45
wrong:
46
        fail
47
 
48
double:
49
        # 0.0 - 0.0 = 0.0.
50
        fldi0 fr0
51
        fldi0 fr2
52
        _s2d fr0, dr0
53
        _s2d fr2, dr2
54
        _setpr
55
        fsub dr0, dr2
56
        _clrpr
57
        fldi0 fr4
58
        _s2d fr4, dr4
59
        _setpr
60
        fcmp/eq dr2, dr4
61
        bf wrong
62
        _clrpr
63
 
64
onezero:
65
        # 1.0 - 0.0 = 1.0.
66
        fldi0 fr0
67
        fldi1 fr2
68
        _s2d fr0, dr0
69
        _s2d fr2, dr2
70
        _setpr
71
        fsub dr0, dr2
72
        _clrpr
73
        fldi1 fr4
74
        _s2d fr4, dr4
75
        _setpr
76
        fcmp/eq dr2, dr4
77
        bf wrong2
78
        _clrpr
79
 
80
oneone:
81
        # 1.0 - 1.0 = 0.0.
82
        fldi1 fr0
83
        fldi1 fr2
84
        _s2d fr0, dr0
85
        _s2d fr2, dr2
86
        _setpr
87
        fsub dr0, dr2
88
        _clrpr
89
        fldi0 fr4
90
        _s2d fr4, dr4
91
        _setpr
92
        fcmp/eq dr2, dr4
93
        bf wrong2
94
        _clrpr
95
 
96
        bra zeroone
97
        nop
98
 
99
wrong2:
100
        fail
101
 
102
zeroone:
103
        # 0.0 - 1.0 = -1.0.
104
        fldi1 fr0
105
        fldi0 fr2
106
        _s2d fr0, dr0
107
        _s2d fr2, dr2
108
        _setpr
109
        fsub dr0, dr2
110
        _clrpr
111
        fldi1 fr4
112
        fneg fr4
113
        _s2d fr4, dr4
114
        _setpr
115
        fcmp/eq dr2, dr4
116
        bf wrong2
117
        _clrpr
118
 
119
okay:
120
        pass

powered by: WebSVN 2.1.0

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