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

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: And another try Created 7 years, 4 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 | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('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 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 1651
1652 1652
1653 void LCodeGen::DoConstantD(LConstantD* instr) { 1653 void LCodeGen::DoConstantD(LConstantD* instr) {
1654 ASSERT(instr->result()->IsDoubleRegister()); 1654 ASSERT(instr->result()->IsDoubleRegister());
1655 DoubleRegister result = ToDoubleRegister(instr->result()); 1655 DoubleRegister result = ToDoubleRegister(instr->result());
1656 double v = instr->value(); 1656 double v = instr->value();
1657 __ Move(result, v); 1657 __ Move(result, v);
1658 } 1658 }
1659 1659
1660 1660
1661 void LCodeGen::DoConstantE(LConstantE* instr) {
1662 __ li(ToRegister(instr->result()), Operand(instr->value()));
1663 }
1664
1665
1661 void LCodeGen::DoConstantT(LConstantT* instr) { 1666 void LCodeGen::DoConstantT(LConstantT* instr) {
1662 Handle<Object> value = instr->value(); 1667 Handle<Object> value = instr->value();
1663 AllowDeferredHandleDereference smi_check; 1668 AllowDeferredHandleDereference smi_check;
1664 __ LoadObject(ToRegister(instr->result()), value); 1669 __ LoadObject(ToRegister(instr->result()), value);
1665 } 1670 }
1666 1671
1667 1672
1668 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) { 1673 void LCodeGen::DoMapEnumLength(LMapEnumLength* instr) {
1669 Register result = ToRegister(instr->result()); 1674 Register result = ToRegister(instr->result());
1670 Register map = ToRegister(instr->value()); 1675 Register map = ToRegister(instr->value());
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 } 2876 }
2872 2877
2873 __ bind(&skip_assignment); 2878 __ bind(&skip_assignment);
2874 } 2879 }
2875 2880
2876 2881
2877 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 2882 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
2878 HObjectAccess access = instr->hydrogen()->access(); 2883 HObjectAccess access = instr->hydrogen()->access();
2879 int offset = access.offset(); 2884 int offset = access.offset();
2880 Register object = ToRegister(instr->object()); 2885 Register object = ToRegister(instr->object());
2886
2887 if (access.IsExternalMemory()) {
2888 Register result = ToRegister(instr->result());
2889 __ lw(result, MemOperand(object, offset));
2890 return;
2891 }
2892
2881 if (instr->hydrogen()->representation().IsDouble()) { 2893 if (instr->hydrogen()->representation().IsDouble()) {
2882 DoubleRegister result = ToDoubleRegister(instr->result()); 2894 DoubleRegister result = ToDoubleRegister(instr->result());
2883 __ ldc1(result, FieldMemOperand(object, offset)); 2895 __ ldc1(result, FieldMemOperand(object, offset));
2884 return; 2896 return;
2885 } 2897 }
2886 2898
2887 Register result = ToRegister(instr->result()); 2899 Register result = ToRegister(instr->result());
2888 if (access.IsInobject()) { 2900 if (access.IsInobject()) {
2889 __ lw(result, FieldMemOperand(object, offset)); 2901 __ lw(result, FieldMemOperand(object, offset));
2890 } else { 2902 } else {
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
4108 4120
4109 4121
4110 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) { 4122 void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
4111 Representation representation = instr->representation(); 4123 Representation representation = instr->representation();
4112 4124
4113 Register object = ToRegister(instr->object()); 4125 Register object = ToRegister(instr->object());
4114 Register scratch = scratch0(); 4126 Register scratch = scratch0();
4115 HObjectAccess access = instr->hydrogen()->access(); 4127 HObjectAccess access = instr->hydrogen()->access();
4116 int offset = access.offset(); 4128 int offset = access.offset();
4117 4129
4130 if (access.IsExternalMemory()) {
4131 Register value = ToRegister(instr->value());
4132 __ sw(value, MemOperand(object, offset));
4133 return;
4134 }
4135
4118 Handle<Map> transition = instr->transition(); 4136 Handle<Map> transition = instr->transition();
4119 4137
4120 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { 4138 if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
4121 Register value = ToRegister(instr->value()); 4139 Register value = ToRegister(instr->value());
4122 if (!instr->hydrogen()->value()->type().IsHeapObject()) { 4140 if (!instr->hydrogen()->value()->type().IsHeapObject()) {
4123 __ And(scratch, value, Operand(kSmiTagMask)); 4141 __ And(scratch, value, Operand(kSmiTagMask));
4124 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); 4142 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
4125 } 4143 }
4126 } else if (FLAG_track_double_fields && representation.IsDouble()) { 4144 } else if (FLAG_track_double_fields && representation.IsDouble()) {
4127 ASSERT(transition.is_null()); 4145 ASSERT(transition.is_null());
(...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 __ Subu(scratch, result, scratch); 5854 __ Subu(scratch, result, scratch);
5837 __ lw(result, FieldMemOperand(scratch, 5855 __ lw(result, FieldMemOperand(scratch,
5838 FixedArray::kHeaderSize - kPointerSize)); 5856 FixedArray::kHeaderSize - kPointerSize));
5839 __ bind(&done); 5857 __ bind(&done);
5840 } 5858 }
5841 5859
5842 5860
5843 #undef __ 5861 #undef __
5844 5862
5845 } } // namespace v8::internal 5863 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698