| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index ca38743b6b1921ab59cd3feae08923c309503370..addc828c7cb67802ed8b3e10594a728956113299 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -1034,6 +1034,26 @@ static const char* LabelType(LLabel* label) {
|
| }
|
|
|
|
|
| +static Condition ComputeCompareCondition(Token::Value op) {
|
| + switch (op) {
|
| + case Token::EQ_STRICT:
|
| + case Token::EQ:
|
| + return eq;
|
| + case Token::LT:
|
| + return lt;
|
| + case Token::GT:
|
| + return gt;
|
| + case Token::LTE:
|
| + return le;
|
| + case Token::GTE:
|
| + return ge;
|
| + default:
|
| + UNREACHABLE();
|
| + return kNoCondition;
|
| + }
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoLabel(LLabel* label) {
|
| Comment(";;; <@%d,#%d> -------------------- B%d%s --------------------",
|
| current_instruction_,
|
| @@ -2212,6 +2232,13 @@ void LCodeGen::DoDebugBreak(LDebugBreak* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoAndBranch(LAndBranch* instr) {
|
| + Condition condition = ComputeCompareCondition(instr->op());
|
| + __ cmp(ToRegister(instr->value()), Operand::Zero());
|
| + EmitBranch(instr, condition);
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoBranch(LBranch* instr) {
|
| Representation r = instr->hydrogen()->value()->representation();
|
| if (r.IsInteger32() || r.IsSmi()) {
|
| @@ -2550,26 +2577,6 @@ void LCodeGen::DoIsUndetectableAndBranch(LIsUndetectableAndBranch* instr) {
|
| }
|
|
|
|
|
| -static Condition ComputeCompareCondition(Token::Value op) {
|
| - switch (op) {
|
| - case Token::EQ_STRICT:
|
| - case Token::EQ:
|
| - return eq;
|
| - case Token::LT:
|
| - return lt;
|
| - case Token::GT:
|
| - return gt;
|
| - case Token::LTE:
|
| - return le;
|
| - case Token::GTE:
|
| - return ge;
|
| - default:
|
| - UNREACHABLE();
|
| - return kNoCondition;
|
| - }
|
| -}
|
| -
|
| -
|
| void LCodeGen::DoStringCompareAndBranch(LStringCompareAndBranch* instr) {
|
| Token::Value op = instr->op();
|
|
|
| @@ -2888,16 +2895,10 @@ void LCodeGen::DoCmpT(LCmpT* instr) {
|
|
|
| Handle<Code> ic = CompareIC::GetUninitialized(isolate(), op);
|
| CallCode(ic, RelocInfo::CODE_TARGET, instr);
|
| - // This instruction also signals no smi code inlined.
|
| - __ cmp(r0, Operand::Zero());
|
| + __ nop();
|
|
|
| - Condition condition = ComputeCompareCondition(op);
|
| - __ LoadRoot(ToRegister(instr->result()),
|
| - Heap::kTrueValueRootIndex,
|
| - condition);
|
| - __ LoadRoot(ToRegister(instr->result()),
|
| - Heap::kFalseValueRootIndex,
|
| - NegateCondition(condition));
|
| + Register res = ToRegister(instr->result());
|
| + if (!res.is(r0)) __ mov(res, r0);
|
| }
|
|
|
|
|
|
|