Strengthen requirements for fixed registers at calls.

Already done on ia-32. This change is for x64 and ARM.
We now always require fixed input registers at calls to
avoid overlap with temp registers.

This fixes the affected instructions on ARM.

Review URL: http://codereview.chromium.org/6471021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6722 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c0fd0539
...@@ -62,8 +62,7 @@ void LInstruction::VerifyCall() { ...@@ -62,8 +62,7 @@ void LInstruction::VerifyCall() {
// Call instructions can use only fixed registers as // Call instructions can use only fixed registers as
// temporaries and outputs because all registers // temporaries and outputs because all registers
// are blocked by the calling convention. // are blocked by the calling convention.
// Inputs can use either fixed register or have a short lifetime (be // Inputs must use a fixed register.
// used at start of the instruction).
ASSERT(Output() == NULL || ASSERT(Output() == NULL ||
LUnallocated::cast(Output())->HasFixedPolicy() || LUnallocated::cast(Output())->HasFixedPolicy() ||
!LUnallocated::cast(Output())->HasRegisterPolicy()); !LUnallocated::cast(Output())->HasRegisterPolicy());
...@@ -1831,8 +1830,8 @@ LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { ...@@ -1831,8 +1830,8 @@ LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) {
LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) { LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
LOperand* object = UseRegisterAtStart(instr->object()); LOperand* object = UseFixed(instr->object(), r0);
LOperand* key = UseRegisterAtStart(instr->key()); LOperand* key = UseFixed(instr->key(), r1);
LDeleteProperty* result = new LDeleteProperty(object, key); LDeleteProperty* result = new LDeleteProperty(object, key);
return MarkAsCall(DefineFixed(result, r0), instr); return MarkAsCall(DefineFixed(result, r0), instr);
} }
...@@ -1880,7 +1879,7 @@ LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) { ...@@ -1880,7 +1879,7 @@ LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) { LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
LTypeof* result = new LTypeof(UseRegisterAtStart(instr->value())); LTypeof* result = new LTypeof(UseFixed(instr->value(), r0));
return MarkAsCall(DefineFixed(result, r0), instr); return MarkAsCall(DefineFixed(result, r0), instr);
} }
......
...@@ -74,8 +74,7 @@ void LInstruction::VerifyCall() { ...@@ -74,8 +74,7 @@ void LInstruction::VerifyCall() {
// Call instructions can use only fixed registers as // Call instructions can use only fixed registers as
// temporaries and outputs because all registers // temporaries and outputs because all registers
// are blocked by the calling convention. // are blocked by the calling convention.
// Inputs can use either fixed register or have a short lifetime (be // Inputs must use a fixed register.
// used at start of the instruction).
ASSERT(Output() == NULL || ASSERT(Output() == NULL ||
LUnallocated::cast(Output())->HasFixedPolicy() || LUnallocated::cast(Output())->HasFixedPolicy() ||
!LUnallocated::cast(Output())->HasRegisterPolicy()); !LUnallocated::cast(Output())->HasRegisterPolicy());
......
...@@ -74,15 +74,13 @@ void LInstruction::VerifyCall() { ...@@ -74,15 +74,13 @@ void LInstruction::VerifyCall() {
// Call instructions can use only fixed registers as // Call instructions can use only fixed registers as
// temporaries and outputs because all registers // temporaries and outputs because all registers
// are blocked by the calling convention. // are blocked by the calling convention.
// Inputs can use either fixed register or have a short lifetime (be // Inputs must use a fixed register.
// used at start of the instruction).
ASSERT(Output() == NULL || ASSERT(Output() == NULL ||
LUnallocated::cast(Output())->HasFixedPolicy() || LUnallocated::cast(Output())->HasFixedPolicy() ||
!LUnallocated::cast(Output())->HasRegisterPolicy()); !LUnallocated::cast(Output())->HasRegisterPolicy());
for (UseIterator it(this); it.HasNext(); it.Advance()) { for (UseIterator it(this); it.HasNext(); it.Advance()) {
LOperand* operand = it.Next(); LOperand* operand = it.Next();
ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() || ASSERT(LUnallocated::cast(operand)->HasFixedPolicy() ||
LUnallocated::cast(operand)->IsUsedAtStart() ||
!LUnallocated::cast(operand)->HasRegisterPolicy()); !LUnallocated::cast(operand)->HasRegisterPolicy());
} }
for (TempIterator it(this); it.HasNext(); it.Advance()) { for (TempIterator it(this); it.HasNext(); it.Advance()) {
......
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