Go to file
Ulrich Weigand f236bb1b5b Fix ppcf128 component access on little-endian systems
The PowerPC 128-bit long double data type (ppcf128 in LLVM) is in fact a
pair of two doubles, where one is considered the "high" or
more-significant part, and the other is considered the "low" or
less-significant part.  When a ppcf128 value is stored in memory or a
register pair, the high part always comes first, i.e. at the lower
memory address or in the lower-numbered register, and the low part
always comes second.  This is true both on big-endian and little-endian
PowerPC systems.  (Similar to how with a complex number, the real part
always comes first and the imaginary part second, no matter the byte
order of the system.)

This was implemented incorrectly for little-endian systems in LLVM.
This commit fixes three related issues:

- When printing an immediate ppcf128 constant to assembler output
  in emitGlobalConstantFP, emit the high part first on both big-
  and little-endian systems.

- When lowering a ppcf128 type to a pair of f64 types in SelectionDAG
  (which is used e.g. when generating code to load an argument into a
  register pair), use correct low/high part ordering on little-endian
  systems.

- In a related issue, because lowering ppcf128 into a pair of f64 must
  operate differently from lowering an int128 into a pair of i64,
  bitcasts between ppcf128 and int128 must not be optimized away by the
  DAG combiner on little-endian systems, but must effect a word-swap.

Reviewed by Hal Finkel.

llvm-svn: 212274
2014-07-03 15:06:47 +00:00
clang Add the __qdbl intrinsic to the arm_acle.h header 2014-07-03 10:14:52 +00:00
clang-tools-extra clang-tidy: Instantiate llvm::Registry<clang::tidy::ClangTidyModule>. 2014-07-03 14:12:47 +00:00
compiler-rt [asan] i686-linux-android support. 2014-07-03 14:20:56 +00:00
debuginfo-tests relax testcase for LLDB output format compatibility. 2014-03-19 23:06:18 +00:00
libclc OpenCL 1.1 does not define CL_VERSION_1_2 so use hardcoded number instead 2014-06-26 15:26:38 +00:00
libcxx Minor cleanup for string_view; mostly from suggestions by Richard Smith. Also, make the tests pass under c++03 2014-07-02 15:45:57 +00:00
libcxxabi Fix a warning about undeclared call to abort(). 2014-07-02 22:44:35 +00:00
lld [mach-o]: remove dylib install-name test with a.out 2014-07-03 12:50:23 +00:00
lldb Fix compilation errors introduced by host Pipe abstraction 2014-07-03 05:20:28 +00:00
llvm Fix ppcf128 component access on little-endian systems 2014-07-03 15:06:47 +00:00
openmp CMake: remove duplicated source file from list 2014-06-02 13:09:24 +00:00
polly Derive run-time conditions for delinearization 2014-07-02 17:47:48 +00:00