Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: src/ia32/lithium-codegen-ia32.cc

Issue 7290006: Relax register constraints for instructions that support memory operands on IA32. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 EmitCmpI(left, right); 1489 EmitCmpI(left, right);
1490 } 1490 }
1491 1491
1492 Condition cc = TokenToCondition(instr->op(), instr->is_double()); 1492 Condition cc = TokenToCondition(instr->op(), instr->is_double());
1493 EmitBranch(true_block, false_block, cc); 1493 EmitBranch(true_block, false_block, cc);
1494 } 1494 }
1495 1495
1496 1496
1497 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { 1497 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) {
1498 Register left = ToRegister(instr->InputAt(0)); 1498 Register left = ToRegister(instr->InputAt(0));
1499 Register right = ToRegister(instr->InputAt(1)); 1499 Operand right = ToOperand(instr->InputAt(1));
1500 int false_block = chunk_->LookupDestination(instr->false_block_id()); 1500 int false_block = chunk_->LookupDestination(instr->false_block_id());
1501 int true_block = chunk_->LookupDestination(instr->true_block_id()); 1501 int true_block = chunk_->LookupDestination(instr->true_block_id());
1502 1502
1503 __ cmp(left, Operand(right)); 1503 __ cmp(left, Operand(right));
1504 EmitBranch(true_block, false_block, equal); 1504 EmitBranch(true_block, false_block, equal);
1505 } 1505 }
1506 1506
1507 1507
1508 void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) { 1508 void LCodeGen::DoCmpConstantEqAndBranch(LCmpConstantEqAndBranch* instr) {
1509 Register left = ToRegister(instr->InputAt(0)); 1509 Register left = ToRegister(instr->InputAt(0));
(...skipping 2167 matching lines...) Expand 10 before | Expand all | Expand 10 after
3677 __ and_(result_reg, 1); 3677 __ and_(result_reg, 1);
3678 DeoptimizeIf(not_zero, instr->environment()); 3678 DeoptimizeIf(not_zero, instr->environment());
3679 } 3679 }
3680 __ bind(&done); 3680 __ bind(&done);
3681 } 3681 }
3682 } 3682 }
3683 3683
3684 3684
3685 void LCodeGen::DoCheckSmi(LCheckSmi* instr) { 3685 void LCodeGen::DoCheckSmi(LCheckSmi* instr) {
3686 LOperand* input = instr->InputAt(0); 3686 LOperand* input = instr->InputAt(0);
3687 __ test(ToRegister(input), Immediate(kSmiTagMask)); 3687 __ test(ToOperand(input), Immediate(kSmiTagMask));
3688 DeoptimizeIf(not_zero, instr->environment()); 3688 DeoptimizeIf(not_zero, instr->environment());
3689 } 3689 }
3690 3690
3691 3691
3692 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) { 3692 void LCodeGen::DoCheckNonSmi(LCheckNonSmi* instr) {
3693 LOperand* input = instr->InputAt(0); 3693 LOperand* input = instr->InputAt(0);
3694 __ test(ToRegister(input), Immediate(kSmiTagMask)); 3694 __ test(ToOperand(input), Immediate(kSmiTagMask));
3695 DeoptimizeIf(zero, instr->environment()); 3695 DeoptimizeIf(zero, instr->environment());
3696 } 3696 }
3697 3697
3698 3698
3699 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { 3699 void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
3700 Register input = ToRegister(instr->InputAt(0)); 3700 Register input = ToRegister(instr->InputAt(0));
3701 Register temp = ToRegister(instr->TempAt(0)); 3701 Register temp = ToRegister(instr->TempAt(0));
3702 3702
3703 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset)); 3703 __ mov(temp, FieldOperand(input, HeapObject::kMapOffset));
3704 3704
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
3736 __ and_(temp, mask); 3736 __ and_(temp, mask);
3737 __ cmpb(Operand(temp), tag); 3737 __ cmpb(Operand(temp), tag);
3738 DeoptimizeIf(not_equal, instr->environment()); 3738 DeoptimizeIf(not_equal, instr->environment());
3739 } 3739 }
3740 } 3740 }
3741 } 3741 }
3742 3742
3743 3743
3744 void LCodeGen::DoCheckFunction(LCheckFunction* instr) { 3744 void LCodeGen::DoCheckFunction(LCheckFunction* instr) {
3745 ASSERT(instr->InputAt(0)->IsRegister()); 3745 ASSERT(instr->InputAt(0)->IsRegister());
3746 Register reg = ToRegister(instr->InputAt(0)); 3746 Operand operand = ToOperand(instr->InputAt(0));
3747 __ cmp(reg, instr->hydrogen()->target()); 3747 __ cmp(operand, instr->hydrogen()->target());
3748 DeoptimizeIf(not_equal, instr->environment()); 3748 DeoptimizeIf(not_equal, instr->environment());
3749 } 3749 }
3750 3750
3751 3751
3752 void LCodeGen::DoCheckMap(LCheckMap* instr) { 3752 void LCodeGen::DoCheckMap(LCheckMap* instr) {
3753 LOperand* input = instr->InputAt(0); 3753 LOperand* input = instr->InputAt(0);
3754 ASSERT(input->IsRegister()); 3754 ASSERT(input->IsRegister());
3755 Register reg = ToRegister(input); 3755 Register reg = ToRegister(input);
3756 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 3756 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
3757 instr->hydrogen()->map()); 3757 instr->hydrogen()->map());
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
4222 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); 4222 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4223 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4223 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4224 } 4224 }
4225 4225
4226 4226
4227 #undef __ 4227 #undef __
4228 4228
4229 } } // namespace v8::internal 4229 } } // namespace v8::internal
4230 4230
4231 #endif // V8_TARGET_ARCH_IA32 4231 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698