[PowerPC][compiler-rt][builtins]Fix __fixunstfti builtin on PowerPC
authorLei Huang <lei@ca.ibm.com>
Fri, 8 Nov 2019 17:39:05 +0000 (11:39 -0600)
committerLei Huang <lei@ca.ibm.com>
Fri, 8 Nov 2019 17:57:09 +0000 (11:57 -0600)
commit71f4761431a79794b5be24c1d863bcc0c4577e60
tree2a7bf05a330c6a2681a3aeb196b6edec4452384f
parent8204d9ff7ef59bbec9137a5b6679718d03b9cb1b
[PowerPC][compiler-rt][builtins]Fix __fixunstfti builtin on PowerPC

__fixunstfti converts a long double (IBM double-double) to an unsigned 128 bit
integer.  This patch enables it to handle a previously unhandled case in which
a negative low double may impact the result of the conversion.

Collaborated with @masoud.ataei and @renenkel.
Patch By: Baptiste Saleil

Differential Revision: https://reviews.llvm.org/D69193
compiler-rt/lib/builtins/ppc/fixunstfti.c
compiler-rt/test/builtins/Unit/ppc/fixunstfti_test.h