arm64: fix fesetround().
The FE_* rounding mode constants have different values on different
architectures, so you can't just copy & paste the validity check from
one to another, like I did here...
Bug: http://b/254501880
Test: treehugger
Change-Id: I2ffa766ffcbe22c1afcd28eab4bd964100dc2d98
diff --git a/libm/arm64/fenv.c b/libm/arm64/fenv.c
index 369140b..0f28d0c 100644
--- a/libm/arm64/fenv.c
+++ b/libm/arm64/fenv.c
@@ -111,7 +111,7 @@
}
int fesetround(int round) {
- if (round < FE_TONEAREST || round > FE_UPWARD) return -1;
+ if (round < FE_TONEAREST || round > FE_TOWARDZERO) return -1;
fpu_control_t fpcr;
__get_fpcr(fpcr);
fpu_control_t new_fpcr = fpcr & ~(FE_TOWARDZERO << FPCR_RMODE_SHIFT);