~ubuntu-branches/ubuntu/vivid/qemu/vivid

« back to all changes in this revision

Viewing changes to include/fpu/softfloat.h

  • Committer: Package Import Robot
  • Author(s): dann frazier
  • Date: 2014-02-11 15:41:53 UTC
  • Revision ID: package-import@ubuntu.com-20140211154153-2d001tf0ium08u81
Tags: 1.7.0+dfsg-3ubuntu2
* Backport changes to enable qemu-user-static support for aarch64
* debian/control: add ppc64el to Architectures
* debian/rules: only install qemu-system-aarch64 on arm64.
  Fixes a FTBFS  when built twice in a row on non-arm64 due to a stale
  debian/qemu-system-aarch64 directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
    float_round_nearest_even = 0,
153
153
    float_round_down         = 1,
154
154
    float_round_up           = 2,
155
 
    float_round_to_zero      = 3
 
155
    float_round_to_zero      = 3,
 
156
    float_round_ties_away    = 4,
156
157
};
157
158
 
158
159
/*----------------------------------------------------------------------------
180
181
    flag default_nan_mode;
181
182
} float_status;
182
183
 
183
 
void set_float_rounding_mode(int val STATUS_PARAM);
184
 
void set_float_exception_flags(int val STATUS_PARAM);
185
184
INLINE void set_float_detect_tininess(int val STATUS_PARAM)
186
185
{
187
186
    STATUS(float_detect_tininess) = val;
188
187
}
 
188
INLINE void set_float_rounding_mode(int val STATUS_PARAM)
 
189
{
 
190
    STATUS(float_rounding_mode) = val;
 
191
}
 
192
INLINE void set_float_exception_flags(int val STATUS_PARAM)
 
193
{
 
194
    STATUS(float_exception_flags) = val;
 
195
}
 
196
INLINE void set_floatx80_rounding_precision(int val STATUS_PARAM)
 
197
{
 
198
    STATUS(floatx80_rounding_precision) = val;
 
199
}
189
200
INLINE void set_flush_to_zero(flag val STATUS_PARAM)
190
201
{
191
202
    STATUS(flush_to_zero) = val;
198
209
{
199
210
    STATUS(default_nan_mode) = val;
200
211
}
 
212
INLINE int get_float_detect_tininess(float_status *status)
 
213
{
 
214
    return STATUS(float_detect_tininess);
 
215
}
 
216
INLINE int get_float_rounding_mode(float_status *status)
 
217
{
 
218
    return STATUS(float_rounding_mode);
 
219
}
201
220
INLINE int get_float_exception_flags(float_status *status)
202
221
{
203
222
    return STATUS(float_exception_flags);
204
223
}
205
 
void set_floatx80_rounding_precision(int val STATUS_PARAM);
 
224
INLINE int get_floatx80_rounding_precision(float_status *status)
 
225
{
 
226
    return STATUS(floatx80_rounding_precision);
 
227
}
 
228
INLINE flag get_flush_to_zero(float_status *status)
 
229
{
 
230
    return STATUS(flush_to_zero);
 
231
}
 
232
INLINE flag get_flush_inputs_to_zero(float_status *status)
 
233
{
 
234
    return STATUS(flush_inputs_to_zero);
 
235
}
 
236
INLINE flag get_default_nan_mode(float_status *status)
 
237
{
 
238
    return STATUS(default_nan_mode);
 
239
}
206
240
 
207
241
/*----------------------------------------------------------------------------
208
242
| Routine to raise any or all of the software IEC/IEEE floating-point
225
259
/*----------------------------------------------------------------------------
226
260
| Software IEC/IEEE integer-to-floating-point conversion routines.
227
261
*----------------------------------------------------------------------------*/
228
 
float32 int32_to_float32( int32 STATUS_PARAM );
229
 
float64 int32_to_float64( int32 STATUS_PARAM );
230
 
float32 uint32_to_float32( uint32 STATUS_PARAM );
231
 
float64 uint32_to_float64( uint32 STATUS_PARAM );
232
 
floatx80 int32_to_floatx80( int32 STATUS_PARAM );
233
 
float128 int32_to_float128( int32 STATUS_PARAM );
234
 
float32 int64_to_float32( int64 STATUS_PARAM );
235
 
float32 uint64_to_float32( uint64 STATUS_PARAM );
236
 
float64 int64_to_float64( int64 STATUS_PARAM );
237
 
float64 uint64_to_float64( uint64 STATUS_PARAM );
238
 
floatx80 int64_to_floatx80( int64 STATUS_PARAM );
239
 
float128 int64_to_float128( int64 STATUS_PARAM );
240
 
float128 uint64_to_float128( uint64 STATUS_PARAM );
 
262
float32 int32_to_float32(int32_t STATUS_PARAM);
 
263
float64 int32_to_float64(int32_t STATUS_PARAM);
 
264
float32 uint32_to_float32(uint32_t STATUS_PARAM);
 
265
float64 uint32_to_float64(uint32_t STATUS_PARAM);
 
266
floatx80 int32_to_floatx80(int32_t STATUS_PARAM);
 
267
float128 int32_to_float128(int32_t STATUS_PARAM);
 
268
float32 int64_to_float32(int64_t STATUS_PARAM);
 
269
float32 uint64_to_float32(uint64_t STATUS_PARAM);
 
270
float64 int64_to_float64(int64_t STATUS_PARAM);
 
271
float64 uint64_to_float64(uint64_t STATUS_PARAM);
 
272
floatx80 int64_to_floatx80(int64_t STATUS_PARAM);
 
273
float128 int64_to_float128(int64_t STATUS_PARAM);
 
274
float128 uint64_to_float128(uint64_t STATUS_PARAM);
 
275
 
 
276
/* We provide the int16 versions for symmetry of API with float-to-int */
 
277
INLINE float32 int16_to_float32(int16_t v STATUS_PARAM)
 
278
{
 
279
    return int32_to_float32(v STATUS_VAR);
 
280
}
 
281
 
 
282
INLINE float32 uint16_to_float32(uint16_t v STATUS_PARAM)
 
283
{
 
284
    return uint32_to_float32(v STATUS_VAR);
 
285
}
 
286
 
 
287
INLINE float64 int16_to_float64(int16_t v STATUS_PARAM)
 
288
{
 
289
    return int32_to_float64(v STATUS_VAR);
 
290
}
 
291
 
 
292
INLINE float64 uint16_to_float64(uint16_t v STATUS_PARAM)
 
293
{
 
294
    return uint32_to_float64(v STATUS_VAR);
 
295
}
241
296
 
242
297
/*----------------------------------------------------------------------------
243
298
| Software half-precision conversion routines.
244
299
*----------------------------------------------------------------------------*/
245
300
float16 float32_to_float16( float32, flag STATUS_PARAM );
246
301
float32 float16_to_float32( float16, flag STATUS_PARAM );
 
302
float16 float64_to_float16(float64 a, flag ieee STATUS_PARAM);
 
303
float64 float16_to_float64(float16 a, flag ieee STATUS_PARAM);
247
304
 
248
305
/*----------------------------------------------------------------------------
249
306
| Software half-precision operations.
265
322
/*----------------------------------------------------------------------------
266
323
| Software IEC/IEEE single-precision conversion routines.
267
324
*----------------------------------------------------------------------------*/
 
325
int_fast16_t float32_to_int16(float32 STATUS_PARAM);
 
326
uint_fast16_t float32_to_uint16(float32 STATUS_PARAM);
268
327
int_fast16_t float32_to_int16_round_to_zero(float32 STATUS_PARAM);
269
328
uint_fast16_t float32_to_uint16_round_to_zero(float32 STATUS_PARAM);
270
329
int32 float32_to_int32( float32 STATUS_PARAM );
272
331
uint32 float32_to_uint32( float32 STATUS_PARAM );
273
332
uint32 float32_to_uint32_round_to_zero( float32 STATUS_PARAM );
274
333
int64 float32_to_int64( float32 STATUS_PARAM );
 
334
uint64 float32_to_uint64(float32 STATUS_PARAM);
275
335
int64 float32_to_int64_round_to_zero( float32 STATUS_PARAM );
276
336
float64 float32_to_float64( float32 STATUS_PARAM );
277
337
floatx80 float32_to_floatx80( float32 STATUS_PARAM );
371
431
/*----------------------------------------------------------------------------
372
432
| Software IEC/IEEE double-precision conversion routines.
373
433
*----------------------------------------------------------------------------*/
 
434
int_fast16_t float64_to_int16(float64 STATUS_PARAM);
 
435
uint_fast16_t float64_to_uint16(float64 STATUS_PARAM);
374
436
int_fast16_t float64_to_int16_round_to_zero(float64 STATUS_PARAM);
375
437
uint_fast16_t float64_to_uint16_round_to_zero(float64 STATUS_PARAM);
376
438
int32 float64_to_int32( float64 STATUS_PARAM );