diff options
author | Ulrich Weigand <[email protected]> | 2014-08-04 18:41:00 +0200 |
---|---|---|
committer | Maarten Lankhorst <[email protected]> | 2014-09-06 15:51:58 +0200 |
commit | 0feb977bbfb0d6bb2c8d3178246acb035a739f37 (patch) | |
tree | f0804900506998cc4e19ee887098dcd67c2cdb61 /src/gallium/targets | |
parent | 1f184bc114143acbcea373184260da777b6c6be1 (diff) |
gallivm: Fix Altivec pack intrinsics for little-endian
This patch fixes use of Altivec pack intrinsics on little-endian PowerPC
systems. Since little-endian operation only affects the load and store
instructions, the semantics of pack (and other) instructions that take
two input vectors implicitly change: the pack instructions still fill
a register placing values from the first operand into the "high" parts
of the register, and values from the second operand into the "low" parts
of the register, but since vector loads and stores perform an endian swap,
the high parts end up at high memory addresses.
To still achieve the desired effect, we have to swap the two inputs to
the pack instruction on little-endian systems. This is done automatically
by the back-end for instructions generated by LLVM, but needs to be done
manually when emitting intrisincs (which still result in that instruction
being emitted directly).
Signed-off-by: Ulrich Weigand <[email protected]>
Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'src/gallium/targets')
0 files changed, 0 insertions, 0 deletions