diff options
author | Eric Fiselier <eric@efcs.ca> | 2018-12-17 20:17:43 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2018-12-17 20:17:43 +0000 |
commit | 2a58b11a8ae5dd832f81cf0bca083a25a68df9ea (patch) | |
tree | 8541b56be4f423a740f8cc81936ff4145b07817a /libcxx/test/support | |
parent | 4ca86d289fccf91db3536b9204d350d342f600ad (diff) | |
download | bcm5719-llvm-2a58b11a8ae5dd832f81cf0bca083a25a68df9ea.tar.gz bcm5719-llvm-2a58b11a8ae5dd832f81cf0bca083a25a68df9ea.zip |
Fix FP comparisons when SSE isn't available
llvm-svn: 349387
Diffstat (limited to 'libcxx/test/support')
-rw-r--r-- | libcxx/test/support/truncate_fp.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libcxx/test/support/truncate_fp.h b/libcxx/test/support/truncate_fp.h new file mode 100644 index 00000000000..83b2b2cffeb --- /dev/null +++ b/libcxx/test/support/truncate_fp.h @@ -0,0 +1,23 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +inline long double truncate_fp(long double val) { + volatile long double sink = val; + return sink; +} + +inline double truncate_fp(double val) { + volatile double sink = val; + return sink; +} + +inline float truncate_fp(float val) { + volatile float sink = val; + return sink; +} |