зеркало из 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
|
@ -254,14 +254,6 @@ namespace nanojit
|
||||||
return 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
|
void Assembler::codeAlloc(NIns *&start, NIns *&end, NIns *&eip
|
||||||
verbose_only(, size_t &nBytes))
|
verbose_only(, size_t &nBytes))
|
||||||
{
|
{
|
||||||
|
|
|
@ -367,7 +367,10 @@ namespace nanojit
|
||||||
|
|
||||||
void codeAlloc(NIns *&start, NIns *&end, NIns *&eip
|
void codeAlloc(NIns *&start, NIns *&end, NIns *&eip
|
||||||
verbose_only(, size_t &nBytes));
|
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) {
|
bool deprecated_isKnownReg(Register r) {
|
||||||
return r != deprecated_UnknownReg;
|
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
|
void
|
||||||
Assembler::asm_restore(LInsp i, Register r)
|
Assembler::asm_restore(LInsp i, Register r)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1133,6 +1133,11 @@ namespace nanojit
|
||||||
value, lirNames[value->opcode()], dr, base, lirNames[base->opcode()]);
|
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)
|
void Assembler::asm_restore(LIns *i, Register r)
|
||||||
{
|
{
|
||||||
int d;
|
int d;
|
||||||
|
|
|
@ -627,6 +627,11 @@ namespace nanojit
|
||||||
FMR(r, s);
|
FMR(r, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Assembler::canRemat(LIns* ins)
|
||||||
|
{
|
||||||
|
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||||
|
}
|
||||||
|
|
||||||
void Assembler::asm_restore(LIns *i, Register r) {
|
void Assembler::asm_restore(LIns *i, Register r) {
|
||||||
int d;
|
int d;
|
||||||
if (i->isop(LIR_alloc)) {
|
if (i->isop(LIR_alloc)) {
|
||||||
|
|
|
@ -250,6 +250,11 @@ namespace nanojit
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Assembler::canRemat(LIns* ins)
|
||||||
|
{
|
||||||
|
return ins->isImmAny() || ins->isop(LIR_alloc);
|
||||||
|
}
|
||||||
|
|
||||||
void Assembler::asm_restore(LInsp i, Register r)
|
void Assembler::asm_restore(LInsp i, Register r)
|
||||||
{
|
{
|
||||||
underrunProtect(24);
|
underrunProtect(24);
|
||||||
|
|
|
@ -1370,6 +1370,10 @@ namespace nanojit
|
||||||
UCOMISD(ra, rb);
|
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
|
// WARNING: the code generated by this function must not affect the
|
||||||
// condition codes. See asm_cmp() for details.
|
// condition codes. See asm_cmp() for details.
|
||||||
void Assembler::asm_restore(LIns *ins, Register r) {
|
void Assembler::asm_restore(LIns *ins, Register r) {
|
||||||
|
|
|
@ -1149,6 +1149,11 @@ namespace nanojit
|
||||||
return prefer;
|
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
|
// WARNING: the code generated by this function must not affect the
|
||||||
// condition codes. See asm_cmp().
|
// condition codes. See asm_cmp().
|
||||||
void Assembler::asm_restore(LInsp ins, Register r)
|
void Assembler::asm_restore(LInsp ins, Register r)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче