b=586387; Problem with Typed Float32 Arrays and canonicalizeNaNs() / LIR_cmovd; r=nnethercote/edwsmith

This commit is contained in:
Andreas Gal 2010-08-14 10:52:08 -07:00
parent c0ae171f24
commit d7b82eb0c4
3 changed files with 21 additions and 9 deletions

View File

@ -2777,13 +2777,14 @@ Assembler::asm_cmov(LIns* ins)
Register rf = findRegFor(iffalse, allow & ~rmask(rr));
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
if (ins->isop(LIR_cmovd)) {
NIns* target = _nIns;
asm_nongp_copy(rr, rf);
asm_branch(false, condval, target);
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
if (rr != rt)
asm_nongp_copy(rr, rt);
freeResourcesOf(ins);
@ -2794,6 +2795,9 @@ Assembler::asm_cmov(LIns* ins)
return;
}
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
// WARNING: We cannot generate any code that affects the condition
// codes between the MRcc generation here and the asm_cmp() call
// below. See asm_cmp() for more details.

View File

@ -1119,13 +1119,14 @@ namespace nanojit
Register rf = findRegFor(iffalse, allow & ~rmask(rr));
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
if (ins->isop(LIR_cmovd)) {
NIns* target = _nIns;
asm_nongp_copy(rr, rf);
asm_branch(false, cond, target);
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
if (rr != rt)
asm_nongp_copy(rr, rt);
freeResourcesOf(ins);
@ -1136,6 +1137,9 @@ namespace nanojit
return;
}
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
// WARNING: We cannot generate any code that affects the condition
// codes between the MRcc generation here and the asm_cmp() call
// below. See asm_cmp() for more details.

View File

@ -2059,13 +2059,14 @@ namespace nanojit
Register rf = findRegFor(iffalse, allow & ~rmask(rr));
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
if (ins->isop(LIR_cmovd)) {
NIns* target = _nIns;
asm_nongp_copy(rr, rf);
asm_branch(false, condval, target);
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
if (rr != rt)
asm_nongp_copy(rr, rt);
freeResourcesOf(ins);
@ -2076,6 +2077,9 @@ namespace nanojit
return;
}
// If 'iftrue' isn't in a register, it can be clobbered by 'ins'.
Register rt = iftrue->isInReg() ? iftrue->getReg() : rr;
NanoAssert(ins->isop(LIR_cmovi));
// WARNING: We cannot generate any code that affects the condition