MIPS: Tiny improvement of register constraints in LClassOfTest instructions.

Port r10379 (3399d6).

Original commit message:
The input register does not need to be made writable. We already
allocate enough temp registers and the input register will always
be preserved.

BUG=
TEST=
Review URL: http://codereview.chromium.org/9254025

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10437 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5b81bd0f
...@@ -1862,9 +1862,8 @@ void LCodeGen::DoHasCachedArrayIndexAndBranch( ...@@ -1862,9 +1862,8 @@ void LCodeGen::DoHasCachedArrayIndexAndBranch(
} }
// Branches to a label or falls through with this instance class-name adr // Branches to a label or falls through with the answer in flags. Trashes
// returned in temp reg, available for comparison by the caller. Trashes the // the temp registers, but not the input.
// temp registers, but not the input. Only input and temp2 may alias.
void LCodeGen::EmitClassOfTest(Label* is_true, void LCodeGen::EmitClassOfTest(Label* is_true,
Label* is_false, Label* is_false,
Handle<String>class_name, Handle<String>class_name,
...@@ -1872,7 +1871,9 @@ void LCodeGen::EmitClassOfTest(Label* is_true, ...@@ -1872,7 +1871,9 @@ void LCodeGen::EmitClassOfTest(Label* is_true,
Register temp, Register temp,
Register temp2) { Register temp2) {
ASSERT(!input.is(temp)); ASSERT(!input.is(temp));
ASSERT(!temp.is(temp2)); // But input and temp2 may be the same register. ASSERT(!input.is(temp2));
ASSERT(!temp.is(temp2));
__ JumpIfSmi(input, is_false); __ JumpIfSmi(input, is_false);
if (class_name->IsEqualTo(CStrVector("Function"))) { if (class_name->IsEqualTo(CStrVector("Function"))) {
......
...@@ -1554,7 +1554,7 @@ LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch( ...@@ -1554,7 +1554,7 @@ LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
LInstruction* LChunkBuilder::DoClassOfTestAndBranch( LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
HClassOfTestAndBranch* instr) { HClassOfTestAndBranch* instr) {
ASSERT(instr->value()->representation().IsTagged()); ASSERT(instr->value()->representation().IsTagged());
return new LClassOfTestAndBranch(UseTempRegister(instr->value()), return new LClassOfTestAndBranch(UseRegister(instr->value()),
TempRegister()); TempRegister());
} }
......
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