diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2020-04-01 11:41:16 +0200 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2020-04-01 11:41:16 +0200 |
commit | f54e11c4f80cfa1b05a5c407adb1df86d1470cf7 (patch) | |
tree | a50c7734ec877e8ee0ac24e81356d6b8ea5b09a8 /runtime/arm/i64_stof.S | |
parent | 7ad6991534ba4ab10fe29d5456393f45cb4e5605 (diff) | |
parent | 76a4ff8f5b37429a614a2a97f628d9d862c93f46 (diff) | |
download | compcert-kvx-f54e11c4f80cfa1b05a5c407adb1df86d1470cf7.tar.gz compcert-kvx-f54e11c4f80cfa1b05a5c407adb1df86d1470cf7.zip |
Merge remote-tracking branch 'origin/master' into attempt-fix-mppa-work
Diffstat (limited to 'runtime/arm/i64_stof.S')
-rw-r--r-- | runtime/arm/i64_stof.S | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/runtime/arm/i64_stof.S b/runtime/arm/i64_stof.S index bcfa471c..11e00a2a 100644 --- a/runtime/arm/i64_stof.S +++ b/runtime/arm/i64_stof.S @@ -39,12 +39,11 @@ @@@ Conversion from signed 64-bit integer to single float FUNCTION(__compcert_i64_stof) - @ Check whether -2^53 <= X < 2^53 - ASR r2, Reg0HI, #21 - ASR r3, Reg0HI, #31 @ (r2,r3) = X >> 53 + @ Check whether -2^53 <= X < 2^53 + ASR r2, Reg0HI, #21 @ r2 = high 32 bits of X >> 53 + @ -2^53 <= X < 2^53 iff r2 is -1 or 0, that is, iff r2 + 1 is 0 or 1 adds r2, r2, #1 - adc r3, r3, #0 @ (r2,r3) = X >> 53 + 1 - cmp r3, #2 + cmp r2, #2 blo 1f @ X is large enough that double rounding can occur. @ Avoid it by nudging X away from the points where double rounding |