зеркало из https://github.com/mozilla/gecko-dev.git
Move canRemat() from Assembler.cpp to each backend. (bug 555255 r=nnethercote+)
--HG-- extra : convert_revision : c12082c4c489498061d8b505f7dae1bf626d849f
This commit is contained in:
Родитель
54bf4c3b11
Коммит
519091121b
|
@ -252,14 +252,6 @@ namespace nanojit
|
|||
_allocator.removeActive(r);
|
||||
_allocator.addFree(r);
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* these instructions don't have to be saved & reloaded to spill,
|
||||
* they can just be recalculated w/out any inputs.
|
||||
*/
|
||||
bool Assembler::canRemat(LIns *i) {
|
||||
return i->isImmAny() || i->isop(LIR_alloc);
|
||||
}
|
||||
|
||||
void Assembler::codeAlloc(NIns *&start, NIns *&end, NIns *&eip
|
||||
|
|
|
@ -367,7 +367,10 @@ namespace nanojit
|
|||
|
||||
void codeAlloc(NIns *&start, NIns *&end, NIns *&eip
|
||||
verbose_only(, size_t &nBytes));
|
||||
bool canRemat(LIns*);
|
||||
|
||||
// These instructions don't have to be saved & reloaded to spill,
|
||||
// they can just be recalculated cheaply.
|
||||
static bool canRemat(LIns*);
|
||||
|
||||
bool deprecated_isKnownReg(Register r) {
|
||||
return r != deprecated_UnknownReg;
|
||||
|
|
|
@ -1230,6 +1230,12 @@ Assembler::asm_store32(LOpcode op, LIns *value, int dr, LIns *base)
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Assembler::canRemat(LIns* ins)
|
||||
{
|
||||
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||
}
|
||||
|
||||
void
|
||||
Assembler::asm_restore(LInsp i, Register r)
|
||||
{
|
||||
|
|
|
@ -1133,6 +1133,11 @@ namespace nanojit
|
|||
value, lirNames[value->opcode()], dr, base, lirNames[base->opcode()]);
|
||||
}
|
||||
|
||||
bool Assembler::canRemat(LIns* ins)
|
||||
{
|
||||
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||
}
|
||||
|
||||
void Assembler::asm_restore(LIns *i, Register r)
|
||||
{
|
||||
int d;
|
||||
|
|
|
@ -627,6 +627,11 @@ namespace nanojit
|
|||
FMR(r, s);
|
||||
}
|
||||
|
||||
bool Assembler::canRemat(LIns* ins)
|
||||
{
|
||||
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||
}
|
||||
|
||||
void Assembler::asm_restore(LIns *i, Register r) {
|
||||
int d;
|
||||
if (i->isop(LIR_alloc)) {
|
||||
|
|
|
@ -250,6 +250,11 @@ namespace nanojit
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool Assembler::canRemat(LIns* ins)
|
||||
{
|
||||
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||
}
|
||||
|
||||
void Assembler::asm_restore(LInsp i, Register r)
|
||||
{
|
||||
underrunProtect(24);
|
||||
|
|
|
@ -1370,6 +1370,10 @@ namespace nanojit
|
|||
UCOMISD(ra, rb);
|
||||
}
|
||||
|
||||
bool Assembler::canRemat(LIns* ins) {
|
||||
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||
}
|
||||
|
||||
// WARNING: the code generated by this function must not affect the
|
||||
// condition codes. See asm_cmp() for details.
|
||||
void Assembler::asm_restore(LIns *ins, Register r) {
|
||||
|
|
|
@ -1148,6 +1148,11 @@ namespace nanojit
|
|||
|
||||
return prefer;
|
||||
}
|
||||
|
||||
bool Assembler::canRemat(LIns* ins)
|
||||
{
|
||||
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||
}
|
||||
|
||||
// WARNING: the code generated by this function must not affect the
|
||||
// condition codes. See asm_cmp().
|
||||
|
|
Загрузка…
Ссылка в новой задаче