[PATCH] D54911: [compiler-rt][builtins][PowerPC] Add ___fixunstfti builtin compiler-rt method support for PowerPC
Amy Kwan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 20 11:59:48 PST 2018
amyk marked an inline comment as done.
amyk added inline comments.
================
Comment at: compiler-rt/lib/builtins/ppc/fixunstfti.c:75
+ /* If the double does not fit within 64 bits, scale it to fit in int128. */
+ shift = lo_expo - 54; /* Calculate the amount to scale the double by. */
+ lo_bits.x &= 0x800fffffffffffffll; /* Clear all of the exponent bits. */
----------------
nemanjai wrote:
> This code seems like it's just a repeat of what we do for the bits in the high `double` above. Can we common this up into a macro?
I have considered putting the common code into a macro and have previously done so. However, doing so still requires me to place an if-condition inside since the high and low double cases are not exactly identical. Due to this, discussions with Robert has lead to letting the duplicated code stay as it is since the two code segments are not entirely the same.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54911/new/
https://reviews.llvm.org/D54911
More information about the llvm-commits
mailing list