Move canRemat() from Assembler.cpp to each backend. (bug 555255 r=nnethercote+)

--HG--
extra : convert_revision : c12082c4c489498061d8b505f7dae1bf626d849f
This commit is contained in:
Edwin Smith 2010-04-19 20:16:09 -04:00
Родитель 54bf4c3b11
Коммит 519091121b
8 изменённых файлов: 34 добавлений и 9 удалений

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

@ -254,14 +254,6 @@ namespace nanojit
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
verbose_only(, size_t &nBytes))
{

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

@ -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) {

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

@ -1149,6 +1149,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().
void Assembler::asm_restore(LInsp ins, Register r)