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/arm/lithium-codegen-arm.cc

Issue 66783007: Merged r17441 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
Patch Set: Created 7 years, 1 month 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 | « src/arm/lithium-arm.cc ('k') | src/hydrogen-uint32-analysis.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 4631 matching lines...) Expand 10 before | Expand all | Expand 10 after
4642 __ vmov(single_scratch, scratch); 4642 __ vmov(single_scratch, scratch);
4643 } else { 4643 } else {
4644 __ vmov(single_scratch, ToRegister(input)); 4644 __ vmov(single_scratch, ToRegister(input));
4645 } 4645 }
4646 __ vcvt_f64_s32(ToDoubleRegister(output), single_scratch); 4646 __ vcvt_f64_s32(ToDoubleRegister(output), single_scratch);
4647 } 4647 }
4648 4648
4649 4649
4650 void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) { 4650 void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) {
4651 LOperand* input = instr->value(); 4651 LOperand* input = instr->value();
4652 ASSERT(input->IsRegister());
4653 LOperand* output = instr->result(); 4652 LOperand* output = instr->result();
4654 ASSERT(output->IsRegister());
4655 __ SmiTag(ToRegister(output), ToRegister(input), SetCC); 4653 __ SmiTag(ToRegister(output), ToRegister(input), SetCC);
4656 if (!instr->hydrogen()->value()->HasRange() || 4654 if (!instr->hydrogen()->value()->HasRange() ||
4657 !instr->hydrogen()->value()->range()->IsInSmiRange()) { 4655 !instr->hydrogen()->value()->range()->IsInSmiRange()) {
4658 DeoptimizeIf(vs, instr->environment()); 4656 DeoptimizeIf(vs, instr->environment());
4659 } 4657 }
4660 } 4658 }
4661 4659
4662 4660
4663 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { 4661 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
4664 LOperand* input = instr->value(); 4662 LOperand* input = instr->value();
4665 LOperand* output = instr->result(); 4663 LOperand* output = instr->result();
4666 4664
4667 SwVfpRegister flt_scratch = double_scratch0().low(); 4665 SwVfpRegister flt_scratch = double_scratch0().low();
4668 __ vmov(flt_scratch, ToRegister(input)); 4666 __ vmov(flt_scratch, ToRegister(input));
4669 __ vcvt_f64_u32(ToDoubleRegister(output), flt_scratch); 4667 __ vcvt_f64_u32(ToDoubleRegister(output), flt_scratch);
4670 } 4668 }
4671 4669
4672 4670
4671 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) {
4672 LOperand* input = instr->value();
4673 LOperand* output = instr->result();
4674 if (!instr->hydrogen()->value()->HasRange() ||
4675 !instr->hydrogen()->value()->range()->IsInSmiRange()) {
4676 __ tst(ToRegister(input), Operand(0xc0000000));
4677 DeoptimizeIf(ne, instr->environment());
4678 }
4679 __ SmiTag(ToRegister(output), ToRegister(input));
4680 }
4681
4682
4673 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 4683 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
4674 class DeferredNumberTagI V8_FINAL : public LDeferredCode { 4684 class DeferredNumberTagI V8_FINAL : public LDeferredCode {
4675 public: 4685 public:
4676 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) 4686 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
4677 : LDeferredCode(codegen), instr_(instr) { } 4687 : LDeferredCode(codegen), instr_(instr) { }
4678 virtual void Generate() V8_OVERRIDE { 4688 virtual void Generate() V8_OVERRIDE {
4679 codegen()->DoDeferredNumberTagI(instr_, 4689 codegen()->DoDeferredNumberTagI(instr_,
4680 instr_->value(), 4690 instr_->value(),
4681 SIGNED_INT32); 4691 SIGNED_INT32);
4682 } 4692 }
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
5777 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5787 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5778 __ ldr(result, FieldMemOperand(scratch, 5788 __ ldr(result, FieldMemOperand(scratch,
5779 FixedArray::kHeaderSize - kPointerSize)); 5789 FixedArray::kHeaderSize - kPointerSize));
5780 __ bind(&done); 5790 __ bind(&done);
5781 } 5791 }
5782 5792
5783 5793
5784 #undef __ 5794 #undef __
5785 5795
5786 } } // namespace v8::internal 5796 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-uint32-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698