Sfoglia il codice sorgente

gallivm: Fix 8bit comparisons.

tags/mesa-7.9-rc1
José Fonseca 15 anni fa
parent
commit
b3d4e5bd26
1 ha cambiato i file con 3 aggiunte e 5 eliminazioni
  1. 3
    5
      src/gallium/auxiliary/gallivm/lp_bld_logic.c

+ 3
- 5
src/gallium/auxiliary/gallivm/lp_bld_logic.c Vedi File

@@ -187,12 +187,10 @@ lp_build_compare(LLVMBuilderRef builder,
return lp_build_undef(type);
}

/* There are no signed byte and unsigned word/dword comparison
* instructions. So flip the sign bit so that the results match.
/* There are no unsigned comparison instructions. So flip the sign bit
* so that the results match.
*/
if(table[func].gt &&
((type.width == 8 && type.sign) ||
(type.width != 8 && !type.sign))) {
if (table[func].gt && !type.sign) {
LLVMValueRef msb = lp_build_const_int_vec(type, (unsigned long long)1 << (type.width - 1));
a = LLVMBuildXor(builder, a, msb, "");
b = LLVMBuildXor(builder, b, msb, "");

Loading…
Annulla
Salva