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

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

Issue 23703014: Orthogonalize Lithium binary op instructions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4707 matching lines...) Expand 10 before | Expand all | Expand 10 after
4718 codegen()->DoDeferredTaggedToI(instr_, done()); 4718 codegen()->DoDeferredTaggedToI(instr_, done());
4719 } 4719 }
4720 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } 4720 virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
4721 private: 4721 private:
4722 LTaggedToI* instr_; 4722 LTaggedToI* instr_;
4723 }; 4723 };
4724 4724
4725 LOperand* input = instr->value(); 4725 LOperand* input = instr->value();
4726 ASSERT(input->IsRegister()); 4726 ASSERT(input->IsRegister());
4727 ASSERT(input->Equals(instr->result())); 4727 ASSERT(input->Equals(instr->result()));
4728 Register input_reg = ToRegister(input);
4728 4729
4729 Register input_reg = ToRegister(input); 4730 if (instr->hydrogen()->value()->representation().IsSmi()) {
4730 DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr); 4731 __ SmiToInteger32(input_reg, input_reg);
4731 __ JumpIfNotSmi(input_reg, deferred->entry()); 4732 } else {
4732 __ SmiToInteger32(input_reg, input_reg); 4733 DeferredTaggedToI* deferred = new(zone()) DeferredTaggedToI(this, instr);
4733 __ bind(deferred->exit()); 4734 __ JumpIfNotSmi(input_reg, deferred->entry());
4735 __ SmiToInteger32(input_reg, input_reg);
4736 __ bind(deferred->exit());
4737 }
4734 } 4738 }
4735 4739
4736 4740
4737 void LCodeGen::DoNumberUntagD(LNumberUntagD* instr) { 4741 void LCodeGen::DoNumberUntagD(LNumberUntagD* instr) {
4738 LOperand* input = instr->value(); 4742 LOperand* input = instr->value();
4739 ASSERT(input->IsRegister()); 4743 ASSERT(input->IsRegister());
4740 LOperand* result = instr->result(); 4744 LOperand* result = instr->result();
4741 ASSERT(result->IsDoubleRegister()); 4745 ASSERT(result->IsDoubleRegister());
4742 4746
4743 Register input_reg = ToRegister(input); 4747 Register input_reg = ToRegister(input);
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
5497 FixedArray::kHeaderSize - kPointerSize)); 5501 FixedArray::kHeaderSize - kPointerSize));
5498 __ bind(&done); 5502 __ bind(&done);
5499 } 5503 }
5500 5504
5501 5505
5502 #undef __ 5506 #undef __
5503 5507
5504 } } // namespace v8::internal 5508 } } // namespace v8::internal
5505 5509
5506 #endif // V8_TARGET_ARCH_X64 5510 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698