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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [test-code-or1k/] [testfloat/] [systfloat.S] - Blame information for rev 749

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

Line No. Rev Author Line
1 346 jeremybenn
/* =============================================================================
2 233 julius
 
3
This GNU assembler source file is part of TestFloat, Release 2a, a package
4
of programs for testing the correctness of floating-point arithmetic
5
complying to the IEC/IEEE Standard for Floating-Point.
6
 
7
Written by John R. Hauser.  More information is available through the Web
8
page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'.
9
 
10
THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
11
has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
12
TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
13
PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
14
AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
15
 
16
Derivative works are acceptable, even for commercial purposes, so long as
17
(1) they include prominent notice that the work is derivative, and (2) they
18
include prominent notice akin to these four paragraphs for those parts of
19
this code that are retained.
20
 
21 346 jeremybenn
Modified for use with or1ksim's testsuite. Updated for GCC 4.5.1.
22 233 julius
 
23
Contributor Julius Baxter 
24 346 jeremybenn
Contributor Jeremy Bennett 
25
 
26
============================================================================= */
27 233 julius
 
28
        .text
29
 
30
/*
31
-------------------------------------------------------------------------------
32
-------------------------------------------------------------------------------
33
*/
34 346 jeremybenn
        .align  4
35
        .global syst_int32_to_float32
36
syst_int32_to_float32:
37 233 julius
        lf.itof.s r11, r3
38 346 jeremybenn
        l.jr    r9
39 233 julius
        l.nop
40
 
41
 
42
 
43
 
44
/*
45
-------------------------------------------------------------------------------
46
-------------------------------------------------------------------------------
47
*/
48 346 jeremybenn
        .align  4
49
        .global syst_float32_to_int32_round_to_zero
50
syst_float32_to_int32_round_to_zero:
51 233 julius
        lf.ftoi.s r11, r3
52 346 jeremybenn
        l.jr    r9
53 233 julius
        l.nop
54
 
55
/*
56
-------------------------------------------------------------------------------
57
-------------------------------------------------------------------------------
58
*/
59 346 jeremybenn
        .align  4
60
        .global syst_float32_to_int32
61
syst_float32_to_int32:
62 233 julius
        lf.ftoi.s r11, r3
63 346 jeremybenn
        l.jr    r9
64 233 julius
        l.nop
65
 
66
/*
67
-------------------------------------------------------------------------------
68
-------------------------------------------------------------------------------
69
*/
70 346 jeremybenn
        .align  4
71
        .global syst_float32_round_to_int
72
syst_float32_round_to_int:
73 233 julius
        lf.ftoi.s r11, r3
74 346 jeremybenn
        l.jr    r9
75 233 julius
        l.nop
76
 
77
/*
78
-------------------------------------------------------------------------------
79
-------------------------------------------------------------------------------
80
*/
81 346 jeremybenn
        .align  4
82
        .global syst_float32_add
83
syst_float32_add:
84 233 julius
        lf.add.s r11, r3, r4
85 346 jeremybenn
        l.jr    r9
86 233 julius
        l.nop
87
 
88
/*
89
-------------------------------------------------------------------------------
90
-------------------------------------------------------------------------------
91
*/
92 346 jeremybenn
        .align  4
93
        .global syst_float32_sub
94
syst_float32_sub:
95 233 julius
        lf.sub.s r11, r3, r4
96 346 jeremybenn
        l.jr    r9
97 233 julius
        l.nop
98
 
99
/*
100
-------------------------------------------------------------------------------
101
-------------------------------------------------------------------------------
102
*/
103 346 jeremybenn
        .align  4
104
        .global syst_float32_mul
105
syst_float32_mul:
106 233 julius
        lf.mul.s r11, r3, r4
107 346 jeremybenn
        l.jr    r9
108 233 julius
        l.nop
109
 
110
/*
111
-------------------------------------------------------------------------------
112
-------------------------------------------------------------------------------
113
*/
114 346 jeremybenn
        .align  4
115
        .global syst_float32_div
116
syst_float32_div:
117 233 julius
        lf.div.s r11, r3, r4
118 346 jeremybenn
        l.jr    r9
119 233 julius
        l.nop
120
 
121
/*
122
-------------------------------------------------------------------------------
123
-------------------------------------------------------------------------------
124
*/
125 346 jeremybenn
        .align  4
126
        .global syst_float32_eq
127
syst_float32_eq:
128 233 julius
        lf.sfeq.s r3, r4
129 346 jeremybenn
        l.bnf   1f
130
        l.addi  r11, r0, 0
131
        l.addi  r11, r0, 1
132
1:      l.jr    r9
133 233 julius
        l.nop
134
 
135
/*
136
-------------------------------------------------------------------------------
137
-------------------------------------------------------------------------------
138
*/
139 346 jeremybenn
        .align  4
140
        .global syst_float32_le
141
syst_float32_le:
142 233 julius
        lf.sfle.s r3, r4
143 346 jeremybenn
        l.bnf   1f
144
        l.addi  r11, r0, 0
145
        l.addi  r11, r0, 1
146
1:      l.jr    r9
147 233 julius
        l.nop
148
 
149
        /*
150
-------------------------------------------------------------------------------
151
-------------------------------------------------------------------------------
152
*/
153 346 jeremybenn
        .align  4
154
        .global syst_float32_lt
155
syst_float32_lt:
156 233 julius
        lf.sflt.s r3, r4
157 346 jeremybenn
        l.bnf   1f
158
        l.addi  r11, r0, 0
159
        l.addi  r11, r0, 1
160
1:      l.jr    r9
161 233 julius
        l.nop

powered by: WebSVN 2.1.0

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