Bug 1115742 - OdinMonkey: Don't canonicalize NaNs in asm.js mode r=luke

This commit is contained in:
Dan Gohman 2014-12-29 22:15:28 -08:00
Родитель 526e14e40f
Коммит f6b7a4582a
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -2191,7 +2191,12 @@ CodeGeneratorX86Shared::visitSimdExtractElementF(LSimdExtractElementF *ins)
uint32_t mask = MacroAssembler::ComputeShuffleMask(lane);
masm.shuffleFloat32(mask, input, output);
}
masm.canonicalizeFloat(output);
// NaNs contained within SIMD values are not enforced to be canonical, so
// when we extract an element into a "regular" scalar JS value, we have to
// canonicalize. In asm.js code, we can skip this, as asm.js only has to
// canonicalize NaNs at FFI boundaries.
if (!gen->compilingAsmJS())
masm.canonicalizeFloat(output);
}
void