| OLD | NEW |
| 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 #if V8_TARGET_ARCH_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 6 | 6 |
| 7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
| 8 // | 8 // |
| 9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
| 10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
| (...skipping 3923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3934 __ JumpIfSmi(v0, if_false); | 3934 __ JumpIfSmi(v0, if_false); |
| 3935 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); | 3935 __ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 3936 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); | 3936 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
| 3937 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 3937 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
| 3938 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); | 3938 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
| 3939 } | 3939 } |
| 3940 context()->Plug(if_true, if_false); | 3940 context()->Plug(if_true, if_false); |
| 3941 } | 3941 } |
| 3942 | 3942 |
| 3943 | 3943 |
| 3944 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | |
| 3945 __ ld(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | |
| 3946 context()->Plug(v0); | |
| 3947 } | |
| 3948 | |
| 3949 | |
| 3950 Register FullCodeGenerator::result_register() { | 3944 Register FullCodeGenerator::result_register() { |
| 3951 return v0; | 3945 return v0; |
| 3952 } | 3946 } |
| 3953 | 3947 |
| 3954 | 3948 |
| 3955 Register FullCodeGenerator::context_register() { | 3949 Register FullCodeGenerator::context_register() { |
| 3956 return cp; | 3950 return cp; |
| 3957 } | 3951 } |
| 3958 | 3952 |
| 3953 void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { |
| 3954 // DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
| 3955 DCHECK(IsAligned(frame_offset, kPointerSize)); |
| 3956 // __ sw(value, MemOperand(fp, frame_offset)); |
| 3957 __ ld(value, MemOperand(fp, frame_offset)); |
| 3958 } |
| 3959 | 3959 |
| 3960 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 3960 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { |
| 3961 // DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); | 3961 // DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
| 3962 DCHECK(IsAligned(frame_offset, kPointerSize)); | 3962 DCHECK(IsAligned(frame_offset, kPointerSize)); |
| 3963 // __ sw(value, MemOperand(fp, frame_offset)); | 3963 // __ sw(value, MemOperand(fp, frame_offset)); |
| 3964 __ sd(value, MemOperand(fp, frame_offset)); | 3964 __ sd(value, MemOperand(fp, frame_offset)); |
| 3965 } | 3965 } |
| 3966 | 3966 |
| 3967 | 3967 |
| 3968 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 3968 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4129 reinterpret_cast<uint64_t>( | 4129 reinterpret_cast<uint64_t>( |
| 4130 isolate->builtins()->OnStackReplacement()->entry())); | 4130 isolate->builtins()->OnStackReplacement()->entry())); |
| 4131 return ON_STACK_REPLACEMENT; | 4131 return ON_STACK_REPLACEMENT; |
| 4132 } | 4132 } |
| 4133 | 4133 |
| 4134 | 4134 |
| 4135 } // namespace internal | 4135 } // namespace internal |
| 4136 } // namespace v8 | 4136 } // namespace v8 |
| 4137 | 4137 |
| 4138 #endif // V8_TARGET_ARCH_MIPS64 | 4138 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |