#define GEN_INPUT_FLUSH1(name, soft_t) \
static inline void name(soft_t *a, float_status *s) \
{ \
- if (likely(!s->flush_inputs_to_zero)) { \
+ if (likely(!get_flush_inputs_to_zero(s))) { \
return; \
} \
soft_t ## _input_flush__nocheck(a, s); \
#define GEN_INPUT_FLUSH2(name, soft_t) \
static inline void name(soft_t *a, soft_t *b, float_status *s) \
{ \
- if (likely(!s->flush_inputs_to_zero)) { \
+ if (likely(!get_flush_inputs_to_zero(s))) { \
return; \
} \
soft_t ## _input_flush__nocheck(a, s); \
#define GEN_INPUT_FLUSH3(name, soft_t) \
static inline void name(soft_t *a, soft_t *b, soft_t *c, float_status *s) \
{ \
- if (likely(!s->flush_inputs_to_zero)) { \
+ if (likely(!get_flush_inputs_to_zero(s))) { \
return; \
} \
soft_t ## _input_flush__nocheck(a, s); \
float16 float16_squash_input_denormal(float16 a, float_status *status)
{
- if (status->flush_inputs_to_zero) {
+ if (get_flush_inputs_to_zero(status)) {
FloatParts64 p = unpack_raw64(&float16_params, a);
if (parts_squash_denormal(p, status)) {
float32 float32_squash_input_denormal(float32 a, float_status *status)
{
- if (status->flush_inputs_to_zero) {
+ if (get_flush_inputs_to_zero(status)) {
FloatParts64 p = unpack_raw64(&float32_params, a);
if (parts_squash_denormal(p, status)) {
float64 float64_squash_input_denormal(float64 a, float_status *status)
{
- if (status->flush_inputs_to_zero) {
+ if (get_flush_inputs_to_zero(status)) {
FloatParts64 p = unpack_raw64(&float64_params, a);
if (parts_squash_denormal(p, status)) {
bfloat16 bfloat16_squash_input_denormal(bfloat16 a, float_status *status)
{
- if (status->flush_inputs_to_zero) {
+ if (get_flush_inputs_to_zero(status)) {
FloatParts64 p = unpack_raw64(&bfloat16_params, a);
if (parts_squash_denormal(p, status)) {
#include "exec/page-protection.h"
#include "exec/target_page.h"
#include "fpu/softfloat-types.h"
+#include "fpu/softfloat-helpers.h"
#include "exec/helper-proto.h"
#include "qemu/qemu-print.h"
#include "system/memory.h"
env->fpcr_exc_enable = ~t & FPCR_STATUS_MASK;
env->fpcr_dyn_round = rm_map[(fpcr & FPCR_DYN_MASK) >> FPCR_DYN_SHIFT];
- env->fp_status.flush_inputs_to_zero = (fpcr & FPCR_DNZ) != 0;
+ set_flush_inputs_to_zero(fpcr & FPCR_DNZ, &env->fp_status);
t = (fpcr & FPCR_UNFD) && (fpcr & FPCR_UNDZ);
#ifdef CONFIG_USER_ONLY