OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3911 __ JumpIfSmi(r3, if_false); | 3911 __ JumpIfSmi(r3, if_false); |
3912 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); | 3912 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); |
3913 __ lbz(r4, FieldMemOperand(r3, Map::kBitFieldOffset)); | 3913 __ lbz(r4, FieldMemOperand(r3, Map::kBitFieldOffset)); |
3914 __ andi(r0, r4, Operand(1 << Map::kIsUndetectable)); | 3914 __ andi(r0, r4, Operand(1 << Map::kIsUndetectable)); |
3915 Split(ne, if_true, if_false, fall_through, cr0); | 3915 Split(ne, if_true, if_false, fall_through, cr0); |
3916 } | 3916 } |
3917 context()->Plug(if_true, if_false); | 3917 context()->Plug(if_true, if_false); |
3918 } | 3918 } |
3919 | 3919 |
3920 | 3920 |
3921 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | |
3922 __ LoadP(r3, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | |
3923 context()->Plug(r3); | |
3924 } | |
3925 | |
3926 | |
3927 Register FullCodeGenerator::result_register() { return r3; } | 3921 Register FullCodeGenerator::result_register() { return r3; } |
3928 | 3922 |
3929 | 3923 |
3930 Register FullCodeGenerator::context_register() { return cp; } | 3924 Register FullCodeGenerator::context_register() { return cp; } |
3931 | 3925 |
| 3926 void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { |
| 3927 DCHECK_EQ(static_cast<int>(POINTER_SIZE_ALIGN(frame_offset)), frame_offset); |
| 3928 __ LoadP(value, MemOperand(fp, frame_offset), r0); |
| 3929 } |
3932 | 3930 |
3933 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 3931 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { |
3934 DCHECK_EQ(static_cast<int>(POINTER_SIZE_ALIGN(frame_offset)), frame_offset); | 3932 DCHECK_EQ(static_cast<int>(POINTER_SIZE_ALIGN(frame_offset)), frame_offset); |
3935 __ StoreP(value, MemOperand(fp, frame_offset), r0); | 3933 __ StoreP(value, MemOperand(fp, frame_offset), r0); |
3936 } | 3934 } |
3937 | 3935 |
3938 | 3936 |
3939 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 3937 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
3940 __ LoadP(dst, ContextMemOperand(cp, context_index), r0); | 3938 __ LoadP(dst, ContextMemOperand(cp, context_index), r0); |
3941 } | 3939 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4091 | 4089 |
4092 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 4090 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
4093 | 4091 |
4094 DCHECK(interrupt_address == | 4092 DCHECK(interrupt_address == |
4095 isolate->builtins()->OnStackReplacement()->entry()); | 4093 isolate->builtins()->OnStackReplacement()->entry()); |
4096 return ON_STACK_REPLACEMENT; | 4094 return ON_STACK_REPLACEMENT; |
4097 } | 4095 } |
4098 } // namespace internal | 4096 } // namespace internal |
4099 } // namespace v8 | 4097 } // namespace v8 |
4100 #endif // V8_TARGET_ARCH_PPC | 4098 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |