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

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

Issue 7015043: Fix the GC branch so it compiles and runs on 64 bit. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 7 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/x64/full-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.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 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 (num_parameters - 1 - i) * kPointerSize; 198 (num_parameters - 1 - i) * kPointerSize;
199 // Load parameter from stack. 199 // Load parameter from stack.
200 __ movq(rax, Operand(rbp, parameter_offset)); 200 __ movq(rax, Operand(rbp, parameter_offset));
201 // Store it in the context. 201 // Store it in the context.
202 int context_offset = Context::SlotOffset(slot->index()); 202 int context_offset = Context::SlotOffset(slot->index());
203 __ movq(Operand(rsi, context_offset), rax); 203 __ movq(Operand(rsi, context_offset), rax);
204 // Update the write barrier. This clobbers all involved 204 // Update the write barrier. This clobbers all involved
205 // registers, so we have use a third register to avoid 205 // registers, so we have use a third register to avoid
206 // clobbering rsi. 206 // clobbering rsi.
207 __ movq(rcx, rsi); 207 __ movq(rcx, rsi);
208 __ RecordWrite(rcx, context_offset, rax, rbx); 208 __ RecordWrite(rcx, context_offset, rax, rbx, kSaveFPRegs);
209 } 209 }
210 } 210 }
211 Comment(";;; End allocate local context"); 211 Comment(";;; End allocate local context");
212 } 212 }
213 213
214 // Trace the call. 214 // Trace the call.
215 if (FLAG_trace) { 215 if (FLAG_trace) {
216 __ CallRuntime(Runtime::kTraceEnter, 0); 216 __ CallRuntime(Runtime::kTraceEnter, 0);
217 } 217 }
218 return !is_aborted(); 218 return !is_aborted();
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
2184 } 2184 }
2185 2185
2186 2186
2187 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) { 2187 void LCodeGen::DoStoreContextSlot(LStoreContextSlot* instr) {
2188 Register context = ToRegister(instr->context()); 2188 Register context = ToRegister(instr->context());
2189 Register value = ToRegister(instr->value()); 2189 Register value = ToRegister(instr->value());
2190 __ movq(ContextOperand(context, instr->slot_index()), value); 2190 __ movq(ContextOperand(context, instr->slot_index()), value);
2191 if (instr->needs_write_barrier()) { 2191 if (instr->needs_write_barrier()) {
2192 int offset = Context::SlotOffset(instr->slot_index()); 2192 int offset = Context::SlotOffset(instr->slot_index());
2193 Register scratch = ToRegister(instr->TempAt(0)); 2193 Register scratch = ToRegister(instr->TempAt(0));
2194 __ RecordWrite(context, offset, value, scratch); 2194 __ RecordWrite(context, offset, value, scratch, kSaveFPRegs);
2195 } 2195 }
2196 } 2196 }
2197 2197
2198 2198
2199 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { 2199 void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
2200 Register object = ToRegister(instr->InputAt(0)); 2200 Register object = ToRegister(instr->InputAt(0));
2201 Register result = ToRegister(instr->result()); 2201 Register result = ToRegister(instr->result());
2202 if (instr->hydrogen()->is_in_object()) { 2202 if (instr->hydrogen()->is_in_object()) {
2203 __ movq(result, FieldOperand(object, instr->hydrogen()->offset())); 2203 __ movq(result, FieldOperand(object, instr->hydrogen()->offset()));
2204 } else { 2204 } else {
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
3056 if (!instr->transition().is_null()) { 3056 if (!instr->transition().is_null()) {
3057 __ Move(FieldOperand(object, HeapObject::kMapOffset), instr->transition()); 3057 __ Move(FieldOperand(object, HeapObject::kMapOffset), instr->transition());
3058 } 3058 }
3059 3059
3060 // Do the store. 3060 // Do the store.
3061 if (instr->is_in_object()) { 3061 if (instr->is_in_object()) {
3062 __ movq(FieldOperand(object, offset), value); 3062 __ movq(FieldOperand(object, offset), value);
3063 if (instr->needs_write_barrier()) { 3063 if (instr->needs_write_barrier()) {
3064 Register temp = ToRegister(instr->TempAt(0)); 3064 Register temp = ToRegister(instr->TempAt(0));
3065 // Update the write barrier for the object for in-object properties. 3065 // Update the write barrier for the object for in-object properties.
3066 __ RecordWrite(object, offset, value, temp); 3066 __ RecordWrite(object, offset, value, temp, kSaveFPRegs);
3067 } 3067 }
3068 } else { 3068 } else {
3069 Register temp = ToRegister(instr->TempAt(0)); 3069 Register temp = ToRegister(instr->TempAt(0));
3070 __ movq(temp, FieldOperand(object, JSObject::kPropertiesOffset)); 3070 __ movq(temp, FieldOperand(object, JSObject::kPropertiesOffset));
3071 __ movq(FieldOperand(temp, offset), value); 3071 __ movq(FieldOperand(temp, offset), value);
3072 if (instr->needs_write_barrier()) { 3072 if (instr->needs_write_barrier()) {
3073 // Update the write barrier for the properties array. 3073 // Update the write barrier for the properties array.
3074 // object is used as a scratch register. 3074 // object is used as a scratch register.
3075 __ RecordWrite(temp, offset, value, object); 3075 __ RecordWrite(temp, offset, value, object, kSaveFPRegs);
3076 } 3076 }
3077 } 3077 }
3078 } 3078 }
3079 3079
3080 3080
3081 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { 3081 void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) {
3082 ASSERT(ToRegister(instr->object()).is(rdx)); 3082 ASSERT(ToRegister(instr->object()).is(rdx));
3083 ASSERT(ToRegister(instr->value()).is(rax)); 3083 ASSERT(ToRegister(instr->value()).is(rax));
3084 3084
3085 __ Move(rcx, instr->hydrogen()->name()); 3085 __ Move(rcx, instr->hydrogen()->name());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3166 FixedArray::kHeaderSize), 3166 FixedArray::kHeaderSize),
3167 value); 3167 value);
3168 } 3168 }
3169 3169
3170 if (instr->hydrogen()->NeedsWriteBarrier()) { 3170 if (instr->hydrogen()->NeedsWriteBarrier()) {
3171 // Compute address of modified element and store it into key register. 3171 // Compute address of modified element and store it into key register.
3172 __ lea(key, FieldOperand(elements, 3172 __ lea(key, FieldOperand(elements,
3173 key, 3173 key,
3174 times_pointer_size, 3174 times_pointer_size,
3175 FixedArray::kHeaderSize)); 3175 FixedArray::kHeaderSize));
3176 __ RecordWrite(elements, key, value); 3176 __ RecordWrite(elements, key, value, kSaveFPRegs);
3177 } 3177 }
3178 } 3178 }
3179 3179
3180 3180
3181 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 3181 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
3182 ASSERT(ToRegister(instr->object()).is(rdx)); 3182 ASSERT(ToRegister(instr->object()).is(rdx));
3183 ASSERT(ToRegister(instr->key()).is(rcx)); 3183 ASSERT(ToRegister(instr->key()).is(rcx));
3184 ASSERT(ToRegister(instr->value()).is(rax)); 3184 ASSERT(ToRegister(instr->value()).is(rax));
3185 3185
3186 Handle<Code> ic = instr->strict_mode() 3186 Handle<Code> ic = instr->strict_mode()
(...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
4102 RegisterEnvironmentForDeoptimization(environment); 4102 RegisterEnvironmentForDeoptimization(environment);
4103 ASSERT(osr_pc_offset_ == -1); 4103 ASSERT(osr_pc_offset_ == -1);
4104 osr_pc_offset_ = masm()->pc_offset(); 4104 osr_pc_offset_ = masm()->pc_offset();
4105 } 4105 }
4106 4106
4107 #undef __ 4107 #undef __
4108 4108
4109 } } // namespace v8::internal 4109 } } // namespace v8::internal
4110 4110
4111 #endif // V8_TARGET_ARCH_X64 4111 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698