forked from tacanslabs/softfloat-sys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helper.c
46 lines (37 loc) · 977 Bytes
/
helper.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// SPDX-License-Identifier: BSD-3-Clause
// See Notices.txt for copyright information
#include <stdint.h>
#include <softfloat.h>
// read/write helpers since Rust doesn't support C-style _Thread_local
uint_fast8_t softfloat_detectTininess_read_helper(void)
{
return softfloat_detectTininess;
}
void softfloat_detectTininess_write_helper(uint_fast8_t v)
{
softfloat_detectTininess = v;
}
uint_fast8_t softfloat_roundingMode_read_helper(void)
{
return softfloat_roundingMode;
}
void softfloat_roundingMode_write_helper(uint_fast8_t v)
{
softfloat_roundingMode = v;
}
uint_fast8_t softfloat_exceptionFlags_read_helper(void)
{
return softfloat_exceptionFlags;
}
void softfloat_exceptionFlags_write_helper(uint_fast8_t v)
{
softfloat_exceptionFlags = v;
}
uint_fast8_t extF80_roundingPrecision_read_helper(void)
{
return extF80_roundingPrecision;
}
void extF80_roundingPrecision_write_helper(uint_fast8_t v)
{
extF80_roundingPrecision = v;
}