diff options
Diffstat (limited to 'target-i386/op.c')
-rw-r--r-- | target-i386/op.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/target-i386/op.c b/target-i386/op.c index 37823319d6..fad8a730e7 100644 --- a/target-i386/op.c +++ b/target-i386/op.c @@ -1938,6 +1938,24 @@ void OPPROTO op_fldcw_A0(void) int rnd_type; env->fpuc = lduw((void *)A0); /* set rounding mode */ +#ifdef _BSD + switch(env->fpuc & RC_MASK) { + default: + case RC_NEAR: + rnd_type = FP_RN; + break; + case RC_DOWN: + rnd_type = FP_RM; + break; + case RC_UP: + rnd_type = FP_RP; + break; + case RC_CHOP: + rnd_type = FP_RZ; + break; + } + fpsetround(rnd_type); +#else switch(env->fpuc & RC_MASK) { default: case RC_NEAR: @@ -1954,6 +1972,7 @@ void OPPROTO op_fldcw_A0(void) break; } fesetround(rnd_type); +#endif } void OPPROTO op_fclex(void) |