diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-12-14 02:26:49 -0800 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2013-12-14 02:26:49 -0800 |
commit | 85c6c88804ce15b8ec8b53894e69984be90b11b0 (patch) | |
tree | 2c947209c8a916c09602faecc068c816c7586b2a /pk | |
parent | 89a0cefd28cb7bdd33e0d17d43cfad5ae6d7e19f (diff) | |
download | pk-85c6c88804ce15b8ec8b53894e69984be90b11b0.zip pk-85c6c88804ce15b8ec8b53894e69984be90b11b0.tar.gz pk-85c6c88804ce15b8ec8b53894e69984be90b11b0.tar.bz2 |
Respect rounding mode for FP -> Int conversions
Diffstat (limited to 'pk')
-rw-r--r-- | pk/fp.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -177,21 +177,21 @@ int emulate_fp(trapframe_t* tf) else if(IS_INSN(FSQRT_D)) DO_WRITEBACK(1, f64_sqrt(frs1d)); else if(IS_INSN(FCVT_W_S)) - XRDR = f32_to_i32_r_minMag(frs1s,true); + XRDR = f32_to_i32(frs1s, softfloat_roundingMode, true); else if(IS_INSN(FCVT_W_D)) - XRDR = f64_to_i32_r_minMag(frs1d,true); + XRDR = f64_to_i32(frs1d, softfloat_roundingMode, true); else if(IS_INSN(FCVT_L_S)) - XRDR = f32_to_i64_r_minMag(frs1s,true); + XRDR = f32_to_i64(frs1s, softfloat_roundingMode, true); else if(IS_INSN(FCVT_L_D)) - XRDR = f64_to_i64_r_minMag(frs1d,true); + XRDR = f64_to_i64(frs1d, softfloat_roundingMode, true); else if(IS_INSN(FCVT_WU_S)) - XRDR = f32_to_ui32_r_minMag(frs1s,true); + XRDR = f32_to_ui32(frs1s, softfloat_roundingMode, true); else if(IS_INSN(FCVT_WU_D)) - XRDR = f64_to_ui32_r_minMag(frs1d,true); + XRDR = f64_to_ui32(frs1d, softfloat_roundingMode, true); else if(IS_INSN(FCVT_LU_S)) - XRDR = f32_to_ui64_r_minMag(frs1s,true); + XRDR = f32_to_ui64(frs1s, softfloat_roundingMode, true); else if(IS_INSN(FCVT_LU_D)) - XRDR = f64_to_ui64_r_minMag(frs1d,true); + XRDR = f64_to_ui64(frs1d, softfloat_roundingMode, true); else return -1; |