aboutsummaryrefslogtreecommitdiff
path: root/target-sh4/op_helper.c
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2011-01-14 20:39:18 +0100
committerAurelien Jarno <aurelien@aurel32.net>2011-01-14 20:39:18 +0100
commit26ac1ea5590c2710d050bfe2630c1546f109d28c (patch)
treeed99be4a6ca155c60d687575b6789e9b78f51293 /target-sh4/op_helper.c
parent442599a340ad04f2915c471430ae8a93cb42b261 (diff)
downloadqemu-26ac1ea5590c2710d050bfe2630c1546f109d28c.zip
qemu-26ac1ea5590c2710d050bfe2630c1546f109d28c.tar.gz
qemu-26ac1ea5590c2710d050bfe2630c1546f109d28c.tar.bz2
target-sh4: define FPSCR constants
Define FPSCR constants for all field and use them instead of hardcoded values. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'target-sh4/op_helper.c')
-rw-r--r--target-sh4/op_helper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c
index 2e5f555..d69b94b 100644
--- a/target-sh4/op_helper.c
+++ b/target-sh4/op_helper.c
@@ -443,11 +443,12 @@ static inline void clr_t(void)
void helper_ld_fpscr(uint32_t val)
{
- env->fpscr = val & 0x003fffff;
- if (val & 0x01)
+ env->fpscr = val & FPSCR_MASK;
+ if ((val & FPSCR_RM_MASK) == FPSCR_RM_ZERO) {
set_float_rounding_mode(float_round_to_zero, &env->fp_status);
- else
+ } else {
set_float_rounding_mode(float_round_nearest_even, &env->fp_status);
+ }
}
uint32_t helper_fabs_FT(uint32_t t0)