changed polarity of is_min bit in range operation to better match vrange* instructions immediate encoding

This commit is contained in:
Stanislav Shwartsman 2014-08-04 21:08:00 +00:00
parent fefa61a7cb
commit 63a4130311
2 changed files with 8 additions and 8 deletions

View File

@ -1334,7 +1334,7 @@ float32 float32_max(float32 a, float32 b, float_status_t &status)
| Standard for Binary Floating-Point Arithmetic.
*----------------------------------------------------------------------------*/
float32 float32_minmax(float32 a, float32 b, int is_min, int is_abs, float_status_t &status)
float32 float32_minmax(float32 a, float32 b, int is_max, int is_abs, float_status_t &status)
{
if (get_denormals_are_zeros(status)) {
a = float32_denormal_to_zero(a);
@ -1360,13 +1360,13 @@ float32 float32_minmax(float32 a, float32 b, int is_min, int is_abs, float_statu
float_raise(status, float_flag_denormal);
if (aSign != bSign) {
if (is_min) {
if (! is_max) {
return aSign ? a : b;
} else {
return aSign ? b : a;
}
} else {
if (is_min) {
if (! is_max) {
return (aSign ^ (a < b)) ? a : b;
} else {
return (aSign ^ (a < b)) ? b : a;
@ -2543,7 +2543,7 @@ float64 float64_max(float64 a, float64 b, float_status_t &status)
| Standard for Binary Floating-Point Arithmetic.
*----------------------------------------------------------------------------*/
float64 float64_minmax(float64 a, float64 b, int is_min, int is_abs, float_status_t &status)
float64 float64_minmax(float64 a, float64 b, int is_max, int is_abs, float_status_t &status)
{
if (get_denormals_are_zeros(status)) {
a = float64_denormal_to_zero(a);
@ -2569,13 +2569,13 @@ float64 float64_minmax(float64 a, float64 b, int is_min, int is_abs, float_statu
float_raise(status, float_flag_denormal);
if (aSign != bSign) {
if (is_min) {
if (! is_max) {
return aSign ? a : b;
} else {
return aSign ? b : a;
}
} else {
if (is_min) {
if (! is_max) {
return (aSign ^ (a < b)) ? a : b;
} else {
return (aSign ^ (a < b)) ? b : a;

View File

@ -311,7 +311,7 @@ int float32_is_denormal(float32);
float32 float32_min(float32 a, float32 b, float_status_t &status);
float32 float32_max(float32 a, float32 b, float_status_t &status);
float32 float32_minmax(float32 a, float32 b, int is_min, int is_abs, float_status_t &status);
float32 float32_minmax(float32 a, float32 b, int is_max, int is_abs, float_status_t &status);
float32 float32_getexp(float32 a, float_status_t &status);
float32 float32_getmant(float32 a, float_status_t &status, int sign_ctrl, int interv);
@ -386,7 +386,7 @@ int float64_is_denormal(float64);
float64 float64_min(float64 a, float64 b, float_status_t &status);
float64 float64_max(float64 a, float64 b, float_status_t &status);
float64 float64_minmax(float64 a, float64 b, int is_min, int is_abs, float_status_t &status);
float64 float64_minmax(float64 a, float64 b, int is_max, int is_abs, float_status_t &status);
float64 float64_getexp(float64 a, float_status_t &status);
float64 float64_getmant(float64 a, float_status_t &status, int sign_ctrl, int interv);