ARM: Optimize NumberTagU

Optimize register constaints for NumberTagU Lithium instruction, and adjust code
generated to match.

TEST=none
BUG=
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18162 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
m.m.capewell@googlemail.com 2013-11-29 13:21:43 +00:00
parent 4d5ec5e656
commit 662fcc6363
2 changed files with 5 additions and 6 deletions

View File

@ -2016,7 +2016,7 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
LOperand* value = UseRegisterAtStart(val);
if (val->CheckFlag(HInstruction::kUint32)) {
LNumberTagU* result = new(zone()) LNumberTagU(value);
return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
} else if (val->HasRange() && val->range()->IsInSmiRange()) {
return DefineAsRegister(new(zone()) LSmiTag(value));
} else {

View File

@ -4762,14 +4762,13 @@ void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
LNumberTagU* instr_;
};
LOperand* input = instr->value();
ASSERT(input->IsRegister() && input->Equals(instr->result()));
Register reg = ToRegister(input);
Register input = ToRegister(instr->value());
Register result = ToRegister(instr->result());
DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr);
__ cmp(reg, Operand(Smi::kMaxValue));
__ cmp(input, Operand(Smi::kMaxValue));
__ b(hi, deferred->entry());
__ SmiTag(reg, reg);
__ SmiTag(result, input);
__ bind(deferred->exit());
}