Commit aaeca64d authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Never hchange nan-hole to hole or hole to nan-hole. Only allow changing...

MIPS: Never hchange nan-hole to hole or hole to nan-hole. Only allow changing hole to nan if all uses allow undefined as nan.

Port r16183 (1858bc57)

BUG=

Review URL: https://codereview.chromium.org/23130006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 48ff2783
This diff is collapsed.
......@@ -277,16 +277,16 @@ class LCodeGen BASE_EMBEDDED {
void RegisterEnvironmentForDeoptimization(LEnvironment* environment,
Safepoint::DeoptMode mode);
void DeoptimizeIf(Condition cc,
void DeoptimizeIf(Condition condition,
LEnvironment* environment,
Deoptimizer::BailoutType bailout_type,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
void DeoptimizeIf(Condition cc,
void DeoptimizeIf(Condition condition,
LEnvironment* environment,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
void ApplyCheckIf(Condition cc,
void ApplyCheckIf(Condition condition,
LBoundsCheck* check,
Register src1 = zero_reg,
const Operand& src2 = Operand(zero_reg));
......@@ -329,14 +329,19 @@ class LCodeGen BASE_EMBEDDED {
void EmitGoto(int block);
template<class InstrType>
void EmitBranch(InstrType instr,
Condition cc,
Condition condition,
Register src1,
const Operand& src2);
template<class InstrType>
void EmitBranchF(InstrType instr,
Condition cc,
Condition condition,
FPURegister src1,
FPURegister src2);
template<class InstrType>
void EmitFalseBranchF(InstrType instr,
Condition condition,
FPURegister src1,
FPURegister src2);
void EmitCmpI(LOperand* left, LOperand* right);
void EmitNumberUntagD(Register input,
DoubleRegister result,
......
......@@ -1652,6 +1652,13 @@ LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
}
LInstruction* LChunkBuilder::DoCompareHoleAndBranch(
HCompareHoleAndBranch* instr) {
LOperand* object = UseRegisterAtStart(instr->object());
return new(zone()) LCmpHoleAndBranch(object);
}
LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) {
ASSERT(instr->value()->representation().IsTagged());
LOperand* temp = TempRegister();
......
......@@ -74,6 +74,7 @@ class LCodeGen;
V(ClassOfTestAndBranch) \
V(CompareNumericAndBranch) \
V(CmpObjectEqAndBranch) \
V(CmpHoleAndBranch) \
V(CmpMapAndBranch) \
V(CmpT) \
V(ConstantD) \
......@@ -887,12 +888,24 @@ class LCmpObjectEqAndBranch: public LControlInstruction<2, 0> {
LOperand* left() { return inputs_[0]; }
LOperand* right() { return inputs_[1]; }
DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch,
"cmp-object-eq-and-branch")
DECLARE_CONCRETE_INSTRUCTION(CmpObjectEqAndBranch, "cmp-object-eq-and-branch")
DECLARE_HYDROGEN_ACCESSOR(CompareObjectEqAndBranch)
};
class LCmpHoleAndBranch: public LControlInstruction<1, 0> {
public:
explicit LCmpHoleAndBranch(LOperand* object) {
inputs_[0] = object;
}
LOperand* object() { return inputs_[0]; }
DECLARE_CONCRETE_INSTRUCTION(CmpHoleAndBranch, "cmp-hole-and-branch")
DECLARE_HYDROGEN_ACCESSOR(CompareHoleAndBranch)
};
class LIsObjectAndBranch: public LControlInstruction<1, 1> {
public:
LIsObjectAndBranch(LOperand* value, LOperand* temp) {
......
......@@ -235,6 +235,14 @@ class MacroAssembler: public Assembler {
mfc1(dst_high, FPURegister::from_code(src.code() + 1));
}
inline void FmoveHigh(Register dst_high, FPURegister src) {
mfc1(dst_high, FPURegister::from_code(src.code() + 1));
}
inline void FmoveLow(Register dst_low, FPURegister src) {
mfc1(dst_low, src);
}
inline void Move(FPURegister dst, Register src_low, Register src_high) {
mtc1(src_low, dst);
mtc1(src_high, FPURegister::from_code(dst.code() + 1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment