Refactor float to integer conversion to share the same code.
authorJoerg Sonnenberger <joerg@bec.de>
Wed, 11 Mar 2015 21:13:56 +0000 (21:13 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Wed, 11 Mar 2015 21:13:56 +0000 (21:13 +0000)
commit91bd698eafe5014cd2852d3bb6f5119b73128c6e
tree96ddcff3b700a5cb291bc4f10693e601d379ef29
parentd6c9bd509eafe6e087a3a58a727c021c6406f3e4
Refactor float to integer conversion to share the same code.
80bit Intel/PPC long double is excluded due to lacking support
for the abstraction. Consistently provide saturation logic.
Extend to long double on 128bit IEEE extended platforms.

Initial patch with test cases from GuanHong Liu.
Reviewed by Steve Canon.

Differential Revision: http://reviews.llvm.org/D2804

llvm-svn: 231965
27 files changed:
compiler-rt/lib/builtins/fixdfdi.c
compiler-rt/lib/builtins/fixdfsi.c
compiler-rt/lib/builtins/fixdfti.c
compiler-rt/lib/builtins/fixsfdi.c
compiler-rt/lib/builtins/fixsfsi.c
compiler-rt/lib/builtins/fixsfti.c
compiler-rt/lib/builtins/fixtfdi.c [new file with mode: 0644]
compiler-rt/lib/builtins/fixtfsi.c [new file with mode: 0644]
compiler-rt/lib/builtins/fixtfti.c [new file with mode: 0644]
compiler-rt/lib/builtins/fixunsdfdi.c
compiler-rt/lib/builtins/fixunsdfsi.c
compiler-rt/lib/builtins/fixunsdfti.c
compiler-rt/lib/builtins/fixunssfdi.c
compiler-rt/lib/builtins/fixunssfsi.c
compiler-rt/lib/builtins/fixunssfti.c
compiler-rt/lib/builtins/fixunstfdi.c [new file with mode: 0644]
compiler-rt/lib/builtins/fixunstfsi.c [new file with mode: 0644]
compiler-rt/lib/builtins/fixunstfti.c [new file with mode: 0644]
compiler-rt/lib/builtins/fixunsxfdi.c
compiler-rt/lib/builtins/fixunsxfsi.c
compiler-rt/lib/builtins/fixunsxfti.c
compiler-rt/lib/builtins/fixxfdi.c
compiler-rt/lib/builtins/fixxfti.c
compiler-rt/lib/builtins/fp_fixint_impl.inc [new file with mode: 0644]
compiler-rt/lib/builtins/fp_fixuint_impl.inc [new file with mode: 0644]
compiler-rt/test/builtins/Unit/fixtfsi_test.c [new file with mode: 0644]
compiler-rt/test/builtins/Unit/fixunstfsi_test.c [new file with mode: 0644]