gallivm: Altivec vector add/sub intrisics
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Thu, 22 Nov 2012 17:20:42 +0000 (11:20 -0600)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 29 Nov 2012 11:51:53 +0000 (11:51 +0000)
commitdd5c58081672bd495e0ffef1c3cc1229620f0f88
tree851854783ebfe4035e489984d15b610caa70d515
parent2ea7d3dabd01608c1d0b020ef941912bd3893a96
gallivm: Altivec vector add/sub intrisics

This patch add correct vector addition and substraction intrisics when
using Altivec with PPC. Current code uses default path and LLVM backend
ends up issuing carry-out arithmetic instruction while it is expected
saturated ones.

It also includes a fix for PowerPC where char are unsigned by default,
resulting in bogus values for vector shifting.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/gallivm/lp_bld_arit.c
src/gallium/auxiliary/gallivm/lp_bld_swizzle.c