Bug 965767 - Ionmonkey ARM: Correct the load-immediate-float32 instruction encoding. r=mjrosenb

This commit is contained in:
Douglas Crosher 2014-02-08 15:32:05 +11:00
parent 0bf692ed40
commit dc2a4545b4
2 changed files with 2111 additions and 4 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1528,10 +1528,19 @@ MacroAssemblerARM::ma_vimm_f32(float value, FloatRegister dest, Condition cc)
return;
}
VFPImm enc(DoubleHighWord(double(value)));
if (enc.isValid()) {
as_vimm(vd, enc, cc);
return;
// Note that the vimm immediate float32 instruction encoding differs from the
// vimm immediate double encoding, but this difference matches the difference
// in the floating point formats, so it is possible to convert the float32 to
// a double and then use the double encoding paths. It is still necessary to
// firstly check that the double low word is zero because some float32
// numbers set these bits and this can not be ignored.
double doubleValue = value;
if (DoubleLowWord(value) == 0) {
VFPImm enc(DoubleHighWord(doubleValue));
if (enc.isValid()) {
as_vimm(vd, enc, cc);
return;
}
}
}
// Fall back to putting the value in a pool.