Fix FP comparisons when SSE isn't available
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349387 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
23
test/support/truncate_fp.h
Normal file
23
test/support/truncate_fp.h
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user