Files
archived-llvm-mirror/test/CodeGen/PowerPC
Ulrich Weigand 7f6ccb0182 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
..
2014-04-12 01:26:00 +00:00
2013-03-27 06:52:27 +00:00
2013-07-03 17:59:07 +00:00
2010-07-16 22:51:10 +00:00
2010-03-28 07:58:37 +00:00
2013-08-19 05:01:02 +00:00
2013-04-05 23:29:01 +00:00
2012-12-20 17:47:27 +00:00
2013-08-06 17:03:03 +00:00
2013-04-01 15:58:15 +00:00
2012-08-28 02:10:15 +00:00
2011-05-02 15:58:16 +00:00
2012-08-28 02:10:33 +00:00
2010-11-14 22:22:14 +00:00
2013-04-27 00:43:16 +00:00
2013-12-20 18:08:54 +00:00
2010-11-14 22:22:14 +00:00
2014-06-19 19:41:26 +00:00
2012-12-19 15:49:14 +00:00