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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 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
        .macro init
9
        fldi0 fr0
10
        fldi1 fr1
11
        fldi1 fr2
12
        fadd fr2, fr2
13
        fldi0 fr7
14
        fldi1 fr8
15
        .endm
16
 
17
        start
18
 
19
        # 0.0 * 0.0 = 0.0.
20
        init
21
        fmul fr0, fr0
22
        fcmp/eq fr7, fr0
23
        bf wrong
24
 
25
        # 0.0 * 1.0 = 0.0.
26
        init
27
        fmul fr1, fr0
28
        fcmp/eq fr7, fr0
29
        bf wrong
30
 
31
        # 1.0 * 0.0 = 0.0.
32
        init
33
        fmul fr0, fr1
34
        fcmp/eq fr7, fr1
35
        bf wrong
36
 
37
        # 1.0 * 1.0 = 1.0.
38
        init
39
        fmul fr1, fr1
40
        fcmp/eq fr8, fr1
41
        bf wrong
42
 
43
        # 2.0 * 1.0 = 2.0.
44
        init
45
        fmul fr2, fr1
46
        fcmp/eq fr2, fr1
47
        bf wrong
48
 
49
        bra double
50
        nop
51
 
52
wrong:
53
        fail
54
 
55
        .macro dinit
56
        fldi0 fr0
57
        fldi1 fr2
58
        fldi1 fr4
59
        fadd fr4, fr4
60
        fldi0 fr8
61
        fldi1 fr10
62
        _s2d fr0, dr0
63
        _s2d fr2, dr2
64
        _s2d fr4, dr4
65
        _s2d fr8, dr8
66
        _s2d fr10, dr10
67
        .endm
68
 
69
double:
70
        # 0.0 * 0.0 = 0.0.
71
        dinit
72
        _setpr
73
        fmul dr0, dr0
74
        fcmp/eq dr8, dr0
75
        bf wrong
76
        _clrpr
77
 
78
        # 0.0 * 1.0 = 0.0.
79
        dinit
80
        _setpr
81
        fmul dr2, dr0
82
        fcmp/eq dr8, dr0
83
        bf wrong2
84
        _clrpr
85
 
86
        # 1.0 * 0.0 = 0.0.
87
        dinit
88
        _setpr
89
        fmul dr0, dr2
90
        fcmp/eq dr8, dr2
91
        bf wrong2
92
        _clrpr
93
 
94
        bra next
95
        nop
96
 
97
wrong2:
98
        fail
99
 
100
next:
101
        # 1.0 * 1.0 = 1.0.
102
        dinit
103
        _setpr
104
        fmul dr2, dr2
105
        fcmp/eq dr10, dr2
106
        bf wrong3
107
        _clrpr
108
 
109
        # 2.0 * 1.0 = 2.0.
110
        dinit
111
        _setpr
112
        fmul dr4, dr2
113
        fcmp/eq dr4, dr2
114
        bf wrong3
115
        _clrpr
116
 
117
okay:
118
        pass
119
 
120
wrong3:
121
        fail

powered by: WebSVN 2.1.0

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