OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // |
| 3 // Copyright IBM Corp. 2012, 2013. All rights reserved. |
| 4 // |
2 // Use of this source code is governed by a BSD-style license that can be | 5 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 6 // found in the LICENSE file. |
4 | 7 |
5 | 8 #ifndef V8_PPC_CODEGEN_PPC_H_ |
6 #ifndef V8_MIPS_CODEGEN_MIPS_H_ | 9 #define V8_PPC_CODEGEN_PPC_H_ |
7 #define V8_MIPS_CODEGEN_MIPS_H_ | |
8 | |
9 | 10 |
10 #include "src/ast.h" | 11 #include "src/ast.h" |
11 #include "src/ic-inl.h" | 12 #include "src/ic-inl.h" |
12 | 13 |
13 namespace v8 { | 14 namespace v8 { |
14 namespace internal { | 15 namespace internal { |
15 | 16 |
16 | 17 |
17 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF }; | 18 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF }; |
18 | 19 |
19 | 20 |
20 class StringCharLoadGenerator : public AllStatic { | 21 class StringCharLoadGenerator : public AllStatic { |
21 public: | 22 public: |
22 // Generates the code for handling different string types and loading the | 23 // Generates the code for handling different string types and loading the |
23 // indexed character into |result|. We expect |index| as untagged input and | 24 // indexed character into |result|. We expect |index| as untagged input and |
24 // |result| as untagged output. | 25 // |result| as untagged output. |
25 static void Generate(MacroAssembler* masm, | 26 static void Generate(MacroAssembler* masm, |
26 Register string, | 27 Register string, |
27 Register index, | 28 Register index, |
28 Register result, | 29 Register result, |
29 Label* call_runtime); | 30 Label* call_runtime); |
30 | 31 |
31 private: | 32 private: |
32 DISALLOW_COPY_AND_ASSIGN(StringCharLoadGenerator); | 33 DISALLOW_COPY_AND_ASSIGN(StringCharLoadGenerator); |
33 }; | 34 }; |
34 | 35 |
35 | |
36 class MathExpGenerator : public AllStatic { | 36 class MathExpGenerator : public AllStatic { |
37 public: | 37 public: |
38 // Register input isn't modified. All other registers are clobbered. | 38 // Register input isn't modified. All other registers are clobbered. |
39 static void EmitMathExp(MacroAssembler* masm, | 39 static void EmitMathExp(MacroAssembler* masm, |
40 DoubleRegister input, | 40 DoubleRegister input, |
41 DoubleRegister result, | 41 DoubleRegister result, |
42 DoubleRegister double_scratch1, | 42 DoubleRegister double_scratch1, |
43 DoubleRegister double_scratch2, | 43 DoubleRegister double_scratch2, |
44 Register temp1, | 44 Register temp1, |
45 Register temp2, | 45 Register temp2, |
46 Register temp3); | 46 Register temp3); |
47 | 47 |
48 private: | 48 private: |
49 DISALLOW_COPY_AND_ASSIGN(MathExpGenerator); | 49 DISALLOW_COPY_AND_ASSIGN(MathExpGenerator); |
50 }; | 50 }; |
51 | 51 |
52 } } // namespace v8::internal | 52 } } // namespace v8::internal |
53 | 53 |
54 #endif // V8_MIPS_CODEGEN_MIPS_H_ | 54 #endif // V8_PPC_CODEGEN_PPC_H_ |
OLD | NEW |