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

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

Issue 1334793004: MIPS64: Add big-endian support for mips64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase ToT. Created 5 years, 2 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
« no previous file with comments | « src/mips64/constants-mips64.h ('k') | src/mips64/macro-assembler-mips64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/hydrogen-osr.h" 7 #include "src/hydrogen-osr.h"
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 #include "src/ic/stub-cache.h" 9 #include "src/ic/stub-cache.h"
10 #include "src/mips64/lithium-codegen-mips64.h" 10 #include "src/mips64/lithium-codegen-mips64.h"
(...skipping 2963 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 if (FLAG_debug_code) { 2974 if (FLAG_debug_code) {
2975 // Verify this is really an Smi. 2975 // Verify this is really an Smi.
2976 Register scratch = scratch0(); 2976 Register scratch = scratch0();
2977 __ Load(scratch, FieldMemOperand(object, offset), representation); 2977 __ Load(scratch, FieldMemOperand(object, offset), representation);
2978 __ AssertSmi(scratch); 2978 __ AssertSmi(scratch);
2979 } 2979 }
2980 2980
2981 // Read int value directly from upper half of the smi. 2981 // Read int value directly from upper half of the smi.
2982 STATIC_ASSERT(kSmiTag == 0); 2982 STATIC_ASSERT(kSmiTag == 0);
2983 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); 2983 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
2984 offset += kPointerSize / 2; 2984 offset = SmiWordOffset(offset);
2985 representation = Representation::Integer32(); 2985 representation = Representation::Integer32();
2986 } 2986 }
2987 __ Load(result, FieldMemOperand(object, offset), representation); 2987 __ Load(result, FieldMemOperand(object, offset), representation);
2988 } 2988 }
2989 2989
2990 2990
2991 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { 2991 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2992 DCHECK(ToRegister(instr->context()).is(cp)); 2992 DCHECK(ToRegister(instr->context()).is(cp));
2993 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 2993 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2994 DCHECK(ToRegister(instr->result()).is(v0)); 2994 DCHECK(ToRegister(instr->result()).is(v0));
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
3248 DCHECK(!hinstr->RequiresHoleCheck()); 3248 DCHECK(!hinstr->RequiresHoleCheck());
3249 if (FLAG_debug_code) { 3249 if (FLAG_debug_code) {
3250 Register temp = scratch1(); 3250 Register temp = scratch1();
3251 __ Load(temp, MemOperand(store_base, offset), Representation::Smi()); 3251 __ Load(temp, MemOperand(store_base, offset), Representation::Smi());
3252 __ AssertSmi(temp); 3252 __ AssertSmi(temp);
3253 } 3253 }
3254 3254
3255 // Read int value directly from upper half of the smi. 3255 // Read int value directly from upper half of the smi.
3256 STATIC_ASSERT(kSmiTag == 0); 3256 STATIC_ASSERT(kSmiTag == 0);
3257 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); 3257 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
3258 offset += kPointerSize / 2; 3258 offset = SmiWordOffset(offset);
3259 } 3259 }
3260 3260
3261 __ Load(result, MemOperand(store_base, offset), representation); 3261 __ Load(result, MemOperand(store_base, offset), representation);
3262 3262
3263 // Check for the hole value. 3263 // Check for the hole value.
3264 if (hinstr->RequiresHoleCheck()) { 3264 if (hinstr->RequiresHoleCheck()) {
3265 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { 3265 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) {
3266 __ SmiTst(result, scratch); 3266 __ SmiTst(result, scratch);
3267 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch, 3267 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch,
3268 Operand(zero_reg)); 3268 Operand(zero_reg));
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
4195 } 4195 }
4196 4196
4197 if (representation.IsSmi() && SmiValuesAre32Bits() && 4197 if (representation.IsSmi() && SmiValuesAre32Bits() &&
4198 instr->hydrogen()->value()->representation().IsInteger32()) { 4198 instr->hydrogen()->value()->representation().IsInteger32()) {
4199 DCHECK(instr->hydrogen()->store_mode() == STORE_TO_INITIALIZED_ENTRY); 4199 DCHECK(instr->hydrogen()->store_mode() == STORE_TO_INITIALIZED_ENTRY);
4200 if (FLAG_debug_code) { 4200 if (FLAG_debug_code) {
4201 __ Load(scratch2, FieldMemOperand(destination, offset), representation); 4201 __ Load(scratch2, FieldMemOperand(destination, offset), representation);
4202 __ AssertSmi(scratch2); 4202 __ AssertSmi(scratch2);
4203 } 4203 }
4204 // Store int value directly to upper half of the smi. 4204 // Store int value directly to upper half of the smi.
4205 offset += kPointerSize / 2; 4205 offset = SmiWordOffset(offset);
4206 representation = Representation::Integer32(); 4206 representation = Representation::Integer32();
4207 } 4207 }
4208 MemOperand operand = FieldMemOperand(destination, offset); 4208 MemOperand operand = FieldMemOperand(destination, offset);
4209 4209
4210 if (FLAG_unbox_double_fields && representation.IsDouble()) { 4210 if (FLAG_unbox_double_fields && representation.IsDouble()) {
4211 DCHECK(access.IsInobject()); 4211 DCHECK(access.IsInobject());
4212 DoubleRegister value = ToDoubleRegister(instr->value()); 4212 DoubleRegister value = ToDoubleRegister(instr->value());
4213 __ sdc1(value, operand); 4213 __ sdc1(value, operand);
4214 } else { 4214 } else {
4215 DCHECK(instr->value()->IsRegister()); 4215 DCHECK(instr->value()->IsRegister());
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
4461 DCHECK(instr->hydrogen()->elements_kind() == FAST_SMI_ELEMENTS); 4461 DCHECK(instr->hydrogen()->elements_kind() == FAST_SMI_ELEMENTS);
4462 if (FLAG_debug_code) { 4462 if (FLAG_debug_code) {
4463 Register temp = scratch1(); 4463 Register temp = scratch1();
4464 __ Load(temp, MemOperand(store_base, offset), Representation::Smi()); 4464 __ Load(temp, MemOperand(store_base, offset), Representation::Smi());
4465 __ AssertSmi(temp); 4465 __ AssertSmi(temp);
4466 } 4466 }
4467 4467
4468 // Store int value directly to upper half of the smi. 4468 // Store int value directly to upper half of the smi.
4469 STATIC_ASSERT(kSmiTag == 0); 4469 STATIC_ASSERT(kSmiTag == 0);
4470 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); 4470 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
4471 offset += kPointerSize / 2; 4471 offset = SmiWordOffset(offset);
4472 representation = Representation::Integer32(); 4472 representation = Representation::Integer32();
4473 } 4473 }
4474 4474
4475 __ Store(value, MemOperand(store_base, offset), representation); 4475 __ Store(value, MemOperand(store_base, offset), representation);
4476 4476
4477 if (instr->hydrogen()->NeedsWriteBarrier()) { 4477 if (instr->hydrogen()->NeedsWriteBarrier()) {
4478 SmiCheck check_needed = 4478 SmiCheck check_needed =
4479 instr->hydrogen()->value()->type().IsHeapObject() 4479 instr->hydrogen()->value()->type().IsHeapObject()
4480 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 4480 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
4481 // Compute address of modified element and store it into key register. 4481 // Compute address of modified element and store it into key register.
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
6085 __ Push(at, ToRegister(instr->function())); 6085 __ Push(at, ToRegister(instr->function()));
6086 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6086 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6087 RecordSafepoint(Safepoint::kNoLazyDeopt); 6087 RecordSafepoint(Safepoint::kNoLazyDeopt);
6088 } 6088 }
6089 6089
6090 6090
6091 #undef __ 6091 #undef __
6092 6092
6093 } // namespace internal 6093 } // namespace internal
6094 } // namespace v8 6094 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/constants-mips64.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698