зеркало из https://github.com/mozilla/gecko-dev.git
Bug 998173 - SpiderMonkey: Harmonize x86 and x64's MacroAssembler finish functions. r=bbouvier
This commit is contained in:
Родитель
c6211f7aa7
Коммит
e2b7f5013f
|
@ -82,18 +82,16 @@ MacroAssemblerX64::loadConstantFloat32(float f, const FloatRegister &dest)
|
|||
void
|
||||
MacroAssemblerX64::finish()
|
||||
{
|
||||
JS_STATIC_ASSERT(CodeAlignment >= sizeof(double));
|
||||
|
||||
if (!doubles_.empty() || !floats_.empty())
|
||||
if (!doubles_.empty())
|
||||
masm.align(sizeof(double));
|
||||
|
||||
for (size_t i = 0; i < doubles_.length(); i++) {
|
||||
Double &dbl = doubles_[i];
|
||||
bind(&dbl.uses);
|
||||
masm.doubleConstant(dbl.value);
|
||||
}
|
||||
|
||||
// No need to align on sizeof(float) as we are aligned on sizeof(double);
|
||||
if (!floats_.empty())
|
||||
masm.align(sizeof(float));
|
||||
for (size_t i = 0; i < floats_.length(); i++) {
|
||||
Float &flt = floats_[i];
|
||||
bind(&flt.uses);
|
||||
|
|
|
@ -113,10 +113,8 @@ MacroAssemblerX86::addConstantFloat32(float f, const FloatRegister &dest)
|
|||
void
|
||||
MacroAssemblerX86::finish()
|
||||
{
|
||||
if (doubles_.empty() && floats_.empty())
|
||||
return;
|
||||
|
||||
masm.align(sizeof(double));
|
||||
if (!doubles_.empty())
|
||||
masm.align(sizeof(double));
|
||||
for (size_t i = 0; i < doubles_.length(); i++) {
|
||||
CodeLabel cl(doubles_[i].uses);
|
||||
writeDoubleConstant(doubles_[i].value, cl.src());
|
||||
|
@ -124,6 +122,9 @@ MacroAssemblerX86::finish()
|
|||
if (!enoughMemory_)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!floats_.empty())
|
||||
masm.align(sizeof(float));
|
||||
for (size_t i = 0; i < floats_.length(); i++) {
|
||||
CodeLabel cl(floats_[i].uses);
|
||||
writeFloatConstant(floats_[i].value, cl.src());
|
||||
|
|
Загрузка…
Ссылка в новой задаче