Support debug system bus access.
[riscv-isa-sim.git] / softfloat / softfloat_state.c
index d93087dddf0428b660bcc91eeb363bd42fbefde0..a105e6f6473989f8bdc9207199b07953f3f586b9 100644 (file)
@@ -2,10 +2,10 @@
 /*============================================================================
 
 This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
-Package, Release 3a, by John R. Hauser.
+Package, Release 3d, by John R. Hauser.
 
-Copyright 2011, 2012, 2013, 2014 The Regents of the University of California.
-All Rights Reserved.
+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
+California.  All Rights Reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
@@ -40,9 +40,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "specialize.h"
 #include "softfloat.h"
 
-uint_fast8_t softfloat_roundingMode = softfloat_round_near_even;
-uint_fast8_t softfloat_detectTininess = init_detectTininess;
-uint_fast8_t softfloat_exceptionFlags = 0;
+#ifndef THREAD_LOCAL
+#define THREAD_LOCAL
+#endif
 
-uint_fast8_t extF80_roundingPrecision = 80;
+THREAD_LOCAL uint_fast8_t softfloat_roundingMode = softfloat_round_near_even;
+THREAD_LOCAL uint_fast8_t softfloat_detectTininess = init_detectTininess;
+THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags = 0;
+
+THREAD_LOCAL uint_fast8_t extF80_roundingPrecision = 80;