|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
|
- * Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved.
|
|
|
+ * Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved.
|
|
|
*
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
@@ -683,7 +683,7 @@ uint32_t HELPER(conv_sf2uw)(CPUHexagonState *env, float32 RsV)
|
|
|
uint32_t RdV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float32_is_neg(RsV) && !float32_is_any_nan(RsV)) {
|
|
|
+ if (float32_is_neg(RsV) && !float32_is_any_nan(RsV) && !float32_is_zero(RsV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RdV = 0;
|
|
|
} else {
|
|
@@ -713,7 +713,7 @@ uint64_t HELPER(conv_sf2ud)(CPUHexagonState *env, float32 RsV)
|
|
|
uint64_t RddV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float32_is_neg(RsV) && !float32_is_any_nan(RsV)) {
|
|
|
+ if (float32_is_neg(RsV) && !float32_is_any_nan(RsV) && !float32_is_zero(RsV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RddV = 0;
|
|
|
} else {
|
|
@@ -743,7 +743,7 @@ uint32_t HELPER(conv_df2uw)(CPUHexagonState *env, float64 RssV)
|
|
|
uint32_t RdV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float64_is_neg(RssV) && !float64_is_any_nan(RssV)) {
|
|
|
+ if (float64_is_neg(RssV) && !float64_is_any_nan(RssV) && !float64_is_zero(RssV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RdV = 0;
|
|
|
} else {
|
|
@@ -773,7 +773,7 @@ uint64_t HELPER(conv_df2ud)(CPUHexagonState *env, float64 RssV)
|
|
|
uint64_t RddV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float64_is_neg(RssV) && !float64_is_any_nan(RssV)) {
|
|
|
+ if (float64_is_neg(RssV) && !float64_is_any_nan(RssV) && !float64_is_zero(RssV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RddV = 0;
|
|
|
} else {
|
|
@@ -803,7 +803,7 @@ uint32_t HELPER(conv_sf2uw_chop)(CPUHexagonState *env, float32 RsV)
|
|
|
uint32_t RdV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float32_is_neg(RsV) && !float32_is_any_nan(RsV)) {
|
|
|
+ if (float32_is_neg(RsV) && !float32_is_any_nan(RsV) && !float32_is_zero(RsV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RdV = 0;
|
|
|
} else {
|
|
@@ -833,7 +833,7 @@ uint64_t HELPER(conv_sf2ud_chop)(CPUHexagonState *env, float32 RsV)
|
|
|
uint64_t RddV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float32_is_neg(RsV) && !float32_is_any_nan(RsV)) {
|
|
|
+ if (float32_is_neg(RsV) && !float32_is_any_nan(RsV) && !float32_is_zero(RsV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RddV = 0;
|
|
|
} else {
|
|
@@ -863,7 +863,7 @@ uint32_t HELPER(conv_df2uw_chop)(CPUHexagonState *env, float64 RssV)
|
|
|
uint32_t RdV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float64_is_neg(RssV) && !float64_is_any_nan(RssV)) {
|
|
|
+ if (float64_is_neg(RssV) && !float64_is_any_nan(RssV) && !float64_is_zero(RssV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RdV = 0;
|
|
|
} else {
|
|
@@ -893,7 +893,7 @@ uint64_t HELPER(conv_df2ud_chop)(CPUHexagonState *env, float64 RssV)
|
|
|
uint64_t RddV;
|
|
|
arch_fpop_start(env);
|
|
|
/* Hexagon checks the sign before rounding */
|
|
|
- if (float64_is_neg(RssV) && !float64_is_any_nan(RssV)) {
|
|
|
+ if (float64_is_neg(RssV) && !float64_is_any_nan(RssV) && !float64_is_zero(RssV)) {
|
|
|
float_raise(float_flag_invalid, &env->fp_status);
|
|
|
RddV = 0;
|
|
|
} else {
|