llvm-6502/test
Ulrich Weigand 1ef2cec146 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212274 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-03 15:06:47 +00:00
..
Analysis
Assembler IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
Bindings
Bitcode Add some test files for r211710. 2014-06-25 15:41:39 +00:00
BugPoint
CodeGen Fix ppcf128 component access on little-endian systems 2014-07-03 15:06:47 +00:00
DebugInfo DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself. 2014-07-02 18:32:05 +00:00
ExecutionEngine Fix this test to not write to the source tree, and instead to write to 2014-06-28 05:18:49 +00:00
Feature IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
FileCheck
Instrumentation [msan] Stop propagating shadow in blacklisted functions. 2014-07-03 11:56:30 +00:00
Integer
JitListener
Linker IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
LTO
MC [X86] AVX512: Add writemask variants for vperm*2* 2014-07-02 21:25:54 +00:00
Object Add the -reverse-sort flag (aka -r) to llvm-nm 2014-07-02 23:23:58 +00:00
Other
TableGen
tools llvm-cov: Support specifying multiple source files 2014-06-27 20:41:25 +00:00
Transforms Add new lines to debugging information. 2014-07-03 02:11:49 +00:00
Unit
Verifier IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh