зеркало из https://github.com/mozilla/pjs.git
Bug 522413 - remove uses of static avmcore::config, r=gal.
This commit is contained in:
Родитель
539d6e3258
Коммит
0751d10c4f
|
@ -9484,7 +9484,7 @@ TraceRecorder::getThis(LIns*& this_ins)
|
||||||
*/
|
*/
|
||||||
this_ins = lir->ins_choose(lir->ins_peq0(stobj_get_parent(this_ins)),
|
this_ins = lir->ins_choose(lir->ins_peq0(stobj_get_parent(this_ins)),
|
||||||
INS_CONSTOBJ(wrappedGlobal),
|
INS_CONSTOBJ(wrappedGlobal),
|
||||||
this_ins);
|
this_ins, avmplus::AvmCore::use_cmov());
|
||||||
return RECORD_CONTINUE;
|
return RECORD_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9509,7 +9509,8 @@ TraceRecorder::getStringLength(LIns* str_ins)
|
||||||
lir->ins2(LIR_piand,
|
lir->ins2(LIR_piand,
|
||||||
len_ins,
|
len_ins,
|
||||||
INS_CONSTWORD(JSString::DEPENDENT_LENGTH_MASK)),
|
INS_CONSTWORD(JSString::DEPENDENT_LENGTH_MASK)),
|
||||||
masked_len_ins));
|
masked_len_ins, avmplus::AvmCore::use_cmov()),
|
||||||
|
avmplus::AvmCore::use_cmov());
|
||||||
return p2i(real_len);
|
return p2i(real_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10633,7 +10634,7 @@ TraceRecorder::callNative(uintN argc, JSOp mode)
|
||||||
lir->ins_choose(lir->ins2((native == js_math_min)
|
lir->ins_choose(lir->ins2((native == js_math_min)
|
||||||
? LIR_lt
|
? LIR_lt
|
||||||
: LIR_gt, a, b),
|
: LIR_gt, a, b),
|
||||||
a, b)));
|
a, b, avmplus::AvmCore::use_cmov())));
|
||||||
pendingSpecializedNative = IGNORE_NATIVE_CALL_COMPLETE_CALLBACK;
|
pendingSpecializedNative = IGNORE_NATIVE_CALL_COMPLETE_CALLBACK;
|
||||||
return RECORD_CONTINUE;
|
return RECORD_CONTINUE;
|
||||||
}
|
}
|
||||||
|
@ -10714,7 +10715,7 @@ TraceRecorder::callNative(uintN argc, JSOp mode)
|
||||||
|
|
||||||
this_ins = lir->ins_choose(lir->ins_peq0(stobj_get_parent(this_ins)),
|
this_ins = lir->ins_choose(lir->ins_peq0(stobj_get_parent(this_ins)),
|
||||||
INS_CONSTOBJ(globalObj),
|
INS_CONSTOBJ(globalObj),
|
||||||
this_ins);
|
this_ins, avmplus::AvmCore::use_cmov());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this_ins = box_jsval(vp[1], this_ins);
|
this_ins = box_jsval(vp[1], this_ins);
|
||||||
|
@ -12273,8 +12274,8 @@ TraceRecorder::record_NativeCallComplete()
|
||||||
v_ins = lir->insLoad(LIR_ldp, native_rval_ins, 0);
|
v_ins = lir->insLoad(LIR_ldp, native_rval_ins, 0);
|
||||||
if (*pc == JSOP_NEW) {
|
if (*pc == JSOP_NEW) {
|
||||||
LIns* x = lir->ins_peq0(lir->ins2(LIR_piand, v_ins, INS_CONSTWORD(JSVAL_TAGMASK)));
|
LIns* x = lir->ins_peq0(lir->ins2(LIR_piand, v_ins, INS_CONSTWORD(JSVAL_TAGMASK)));
|
||||||
x = lir->ins_choose(x, v_ins, INS_CONSTWORD(0));
|
x = lir->ins_choose(x, v_ins, INS_CONSTWORD(0), avmplus::AvmCore::use_cmov());
|
||||||
v_ins = lir->ins_choose(lir->ins_peq0(x), newobj_ins, x);
|
v_ins = lir->ins_choose(lir->ins_peq0(x), newobj_ins, x, avmplus::AvmCore::use_cmov());
|
||||||
}
|
}
|
||||||
set(&v, v_ins);
|
set(&v, v_ins);
|
||||||
|
|
||||||
|
|
|
@ -891,7 +891,7 @@ namespace nanojit
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
LIns* LirWriter::ins_choose(LIns* cond, LIns* iftrue, LIns* iffalse)
|
LIns* LirWriter::ins_choose(LIns* cond, LIns* iftrue, LIns* iffalse, bool use_cmov)
|
||||||
{
|
{
|
||||||
// if not a conditional, make it implicitly an ==0 test (then flop results)
|
// if not a conditional, make it implicitly an ==0 test (then flop results)
|
||||||
if (!cond->isCmp())
|
if (!cond->isCmp())
|
||||||
|
@ -902,7 +902,7 @@ namespace nanojit
|
||||||
iffalse = tmp;
|
iffalse = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avmplus::AvmCore::use_cmov())
|
if (use_cmov)
|
||||||
return ins3((iftrue->isQuad() || iffalse->isQuad()) ? LIR_qcmov : LIR_cmov, cond, iftrue, iffalse);
|
return ins3((iftrue->isQuad() || iffalse->isQuad()) ? LIR_qcmov : LIR_cmov, cond, iftrue, iffalse);
|
||||||
|
|
||||||
LInsp ncond = ins1(LIR_neg, cond); // cond ? -1 : 0
|
LInsp ncond = ins1(LIR_neg, cond); // cond ? -1 : 0
|
||||||
|
@ -925,10 +925,10 @@ namespace nanojit
|
||||||
ArgSize sizes[MAXARGS];
|
ArgSize sizes[MAXARGS];
|
||||||
int32_t argc = ci->get_sizes(sizes);
|
int32_t argc = ci->get_sizes(sizes);
|
||||||
|
|
||||||
if (AvmCore::config.soft_float) {
|
#ifdef NJ_SOFTFLOAT
|
||||||
if (op == LIR_fcall)
|
if (!ARM_VFP && (op == LIR_fcall || op == LIR_qcall))
|
||||||
op = LIR_callh;
|
op = LIR_callh;
|
||||||
}
|
#endif
|
||||||
|
|
||||||
NanoAssert(argc <= (int)MAXARGS);
|
NanoAssert(argc <= (int)MAXARGS);
|
||||||
|
|
||||||
|
|
|
@ -1081,7 +1081,7 @@ namespace nanojit
|
||||||
|
|
||||||
// Inserts a conditional to execute and branches to execute if
|
// Inserts a conditional to execute and branches to execute if
|
||||||
// the condition is true and false respectively.
|
// the condition is true and false respectively.
|
||||||
LIns* ins_choose(LIns* cond, LIns* iftrue, LIns* iffalse);
|
LIns* ins_choose(LIns* cond, LIns* iftrue, LIns* iffalse, bool use_cmov);
|
||||||
// Inserts an integer comparison to 0
|
// Inserts an integer comparison to 0
|
||||||
LIns* ins_eq0(LIns* oprnd1);
|
LIns* ins_eq0(LIns* oprnd1);
|
||||||
// Inserts a pointer comparison to 0
|
// Inserts a pointer comparison to 0
|
||||||
|
|
|
@ -152,7 +152,7 @@ namespace nanojit
|
||||||
|
|
||||||
static const RegisterMask AllowableFlagRegs = 1<<EAX |1<<ECX | 1<<EDX | 1<<EBX;
|
static const RegisterMask AllowableFlagRegs = 1<<EAX |1<<ECX | 1<<EDX | 1<<EBX;
|
||||||
|
|
||||||
static inline bool isValidDisplacement(int32_t d) {
|
static inline bool isValidDisplacement(int32_t) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче