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/powerpc/i64_utof.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/powerpc/i64_utof.s')
-rw-r--r-- | runtime/powerpc/i64_utof.s | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/powerpc/i64_utof.s b/runtime/powerpc/i64_utof.s index cdb2f867..4a2a172b 100644 --- a/runtime/powerpc/i64_utof.s +++ b/runtime/powerpc/i64_utof.s @@ -48,11 +48,11 @@ __compcert_i64_utof: # X is large enough that double rounding can occur. # Avoid it by nudging X away from the points where double rounding # occurs (the "round to odd" technique) - rlwinm r0, r4, 0, 21, 31 # extract bits 0 to 11 of X - addi r0, r0, 0x7FF # r0 = (X & 0x7FF) + 0x7FF - # bit 12 of r0 is 0 if all low 12 bits of X are 0, 1 otherwise - # bits 13-31 of r0 are 0 - or r4, r4, r0 # correct bit number 12 of X + rlwinm r5, r4, 0, 21, 31 # extract bits 0 to 11 of X + addi r5, r5, 0x7FF # r5 = (X & 0x7FF) + 0x7FF + # bit 12 of r5 is 0 if all low 12 bits of X are 0, 1 otherwise + # bits 13-31 of r5 are 0 + or r4, r4, r5 # correct bit number 12 of X rlwinm r4, r4, 0, 0, 20 # set to 0 bits 0 to 11 of X # Convert to double, then round to single 1: bl __compcert_i64_utod |