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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
10 #include "src/frames.h" | 10 #include "src/frames.h" |
11 #include "src/macro-assembler.h" | 11 #include "src/macro-assembler.h" |
12 | 12 |
13 #include "src/ppc/assembler-ppc.h" | 13 #include "src/ppc/assembler-ppc.h" |
14 #include "src/ppc/assembler-ppc-inl.h" | 14 #include "src/ppc/assembler-ppc-inl.h" |
15 #include "src/ppc/macro-assembler-ppc.h" | 15 #include "src/ppc/macro-assembler-ppc.h" |
16 | 16 |
17 namespace v8 { | 17 namespace v8 { |
18 namespace internal { | 18 namespace internal { |
19 | 19 |
20 | 20 |
21 Register JavaScriptFrame::fp_register() { return v8::internal::fp; } | 21 Register JavaScriptFrame::fp_register() { return v8::internal::fp; } |
22 Register JavaScriptFrame::context_register() { return cp; } | 22 Register JavaScriptFrame::context_register() { return cp; } |
23 Register JavaScriptFrame::constant_pool_pointer_register() { | 23 Register JavaScriptFrame::constant_pool_pointer_register() { |
24 #if V8_OOL_CONSTANT_POOL | |
25 DCHECK(FLAG_enable_ool_constant_pool); | |
26 return kConstantPoolRegister; | |
27 #else | |
28 UNREACHABLE(); | 24 UNREACHABLE(); |
29 return no_reg; | 25 return no_reg; |
30 #endif | |
31 } | 26 } |
32 | 27 |
33 | 28 |
34 Register StubFailureTrampolineFrame::fp_register() { return v8::internal::fp; } | 29 Register StubFailureTrampolineFrame::fp_register() { return v8::internal::fp; } |
35 Register StubFailureTrampolineFrame::context_register() { return cp; } | 30 Register StubFailureTrampolineFrame::context_register() { return cp; } |
36 Register StubFailureTrampolineFrame::constant_pool_pointer_register() { | 31 Register StubFailureTrampolineFrame::constant_pool_pointer_register() { |
37 #if V8_OOL_CONSTANT_POOL | |
38 DCHECK(FLAG_enable_ool_constant_pool); | |
39 return kConstantPoolRegister; | |
40 #else | |
41 UNREACHABLE(); | 32 UNREACHABLE(); |
42 return no_reg; | 33 return no_reg; |
43 #endif | |
44 } | 34 } |
45 | 35 |
46 | 36 |
47 Object*& ExitFrame::constant_pool_slot() const { | 37 Object*& ExitFrame::constant_pool_slot() const { |
48 #if V8_OOL_CONSTANT_POOL | |
49 DCHECK(FLAG_enable_ool_constant_pool); | |
50 const int offset = ExitFrameConstants::kConstantPoolOffset; | |
51 return Memory::Object_at(fp() + offset); | |
52 #else | |
53 UNREACHABLE(); | 38 UNREACHABLE(); |
54 return Memory::Object_at(NULL); | 39 return Memory::Object_at(NULL); |
55 #endif | |
56 } | 40 } |
57 } | 41 } |
58 } // namespace v8::internal | 42 } // namespace v8::internal |
59 | 43 |
60 #endif // V8_TARGET_ARCH_PPC | 44 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |