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

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

Issue 19562003: Add support for IncrementCounter in Hydrogen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More code style Created 7 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
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 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1640 1640
1641 1641
1642 void LCodeGen::DoConstantD(LConstantD* instr) { 1642 void LCodeGen::DoConstantD(LConstantD* instr) {
1643 ASSERT(instr->result()->IsDoubleRegister()); 1643 ASSERT(instr->result()->IsDoubleRegister());
1644 DoubleRegister result = ToDoubleRegister(instr->result()); 1644 DoubleRegister result = ToDoubleRegister(instr->result());
1645 double v = instr->value(); 1645 double v = instr->value();
1646 __ Move(result, v); 1646 __ Move(result, v);
1647 } 1647 }
1648 1648
1649 1649
1650 void LCodeGen::DoConstantE(LConstantE* instr) {
1651 __ li(ToRegister(instr->result()), Operand(instr->value()));
1652 }
1653
1654
1650 void LCodeGen::DoConstantT(LConstantT* instr) { 1655 void LCodeGen::DoConstantT(LConstantT* instr) {
1651 Handle<Object> value = instr->value(); 1656 Handle<Object> value = instr->value();
1652 AllowDeferredHandleDereference smi_check; 1657 AllowDeferredHandleDereference smi_check;
1653 __ LoadObject(ToRegister(instr->result()), value); 1658 __ LoadObject(ToRegister(instr->result()), value);
1654 } 1659 }
1655 1660
1656 1661
1657 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { 1662 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) {
1658 Register result = ToRegister(instr->result()); 1663 Register result = ToRegister(instr->result());
1659 Register map = ToRegister(instr->value()); 1664 Register map = ToRegister(instr->value());
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2860 } 2865 }
2861 2866
2862 __ bind(&skip_assignment); 2867 __ bind(&skip_assignment);
2863 } 2868 }
2864 2869
2865 2870
2866 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 2871 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
2867 HObjectAccess access = instr->hydrogen()->access(); 2872 HObjectAccess access = instr->hydrogen()->access();
2868 int offset = access.offset(); 2873 int offset = access.offset();
2869 Register object = ToRegister(instr->object()); 2874 Register object = ToRegister(instr->object());
2875
2876 if (access.IsExternalMemory()) {
2877 Register result = ToRegister(instr->result());
2878 __ lw(result, MemOperand(object, offset));
2879 return;
2880 }
2881
2870 if (instr->hydrogen()->representation().IsDouble()) { 2882 if (instr->hydrogen()->representation().IsDouble()) {
2871 DoubleRegister result = ToDoubleRegister(instr->result()); 2883 DoubleRegister result = ToDoubleRegister(instr->result());
2872 __ ldc1(result, FieldMemOperand(object, offset)); 2884 __ ldc1(result, FieldMemOperand(object, offset));
2873 return; 2885 return;
2874 } 2886 }
2875 2887
2876 Register result = ToRegister(instr->result()); 2888 Register result = ToRegister(instr->result());
2877 if (access.IsInobject()) { 2889 if (access.IsInobject()) {
2878 __ lw(result, FieldMemOperand(object, offset)); 2890 __ lw(result, FieldMemOperand(object, offset));
2879 } else { 2891 } else {
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
4097 4109
4098 4110
4099 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4111 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4100 Representation representation = instr->representation(); 4112 Representation representation = instr->representation();
4101 4113
4102 Register object = ToRegister(instr->object()); 4114 Register object = ToRegister(instr->object());
4103 Register scratch = scratch0(); 4115 Register scratch = scratch0();
4104 HObjectAccess access = instr->hydrogen()->access(); 4116 HObjectAccess access = instr->hydrogen()->access();
4105 int offset = access.offset(); 4117 int offset = access.offset();
4106 4118
4119 if (access.IsExternalMemory()) {
4120 Register value = ToRegister(instr->value());
4121 __ sw(value, MemOperand(object, offset));
4122 return;
4123 }
4124
4107 Handle<Map> transition = instr->transition(); 4125 Handle<Map> transition = instr->transition();
4108 4126
4109 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { 4127 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
4110 Register value = ToRegister(instr->value()); 4128 Register value = ToRegister(instr->value());
4111 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 4129 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
4112 __ And(scratch, value, Operand(kSmiTagMask)); 4130 __ And(scratch, value, Operand(kSmiTagMask));
4113 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); 4131 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
4114 } 4132 }
4115 } else if (FLAG_track_double_fields && representation.IsDouble()) { 4133 } else if (FLAG_track_double_fields && representation.IsDouble()) {
4116 ASSERT(transition.is_null()); 4134 ASSERT(transition.is_null());
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
5847 __ Subu(scratch, result, scratch); 5865 __ Subu(scratch, result, scratch);
5848 __ lw(result, FieldMemOperand(scratch, 5866 __ lw(result, FieldMemOperand(scratch,
5849 FixedArray::kHeaderSize - kPointerSize)); 5867 FixedArray::kHeaderSize - kPointerSize));
5850 __ bind(&done); 5868 __ bind(&done);
5851 } 5869 }
5852 5870
5853 5871
5854 #undef __ 5872 #undef __
5855 5873
5856 } } // namespace v8::internal 5874 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698