Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef V8_PPC_CODEGEN_PPC_H_ |
| 6 | #define V8_PPC_CODEGEN_PPC_H_ |
| 7 | |
| 8 | #include "src/ast.h" |
| 9 | #include "src/macro-assembler.h" |
| 10 | |
| 11 | namespace v8 { |
| 12 | namespace internal { |
| 13 | |
| 14 | |
| 15 | enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF }; |
| 16 | |
| 17 | |
| 18 | class StringCharLoadGenerator : public AllStatic { |
| 19 | public: |
| 20 | // Generates the code for handling different string types and loading the |
| 21 | // indexed character into |result|. We expect |index| as untagged input and |
| 22 | // |result| as untagged output. |
| 23 | static void Generate(MacroAssembler* masm, Register string, Register index, |
| 24 | Register result, Label* call_runtime); |
| 25 | |
| 26 | private: |
| 27 | DISALLOW_COPY_AND_ASSIGN(StringCharLoadGenerator); |
| 28 | }; |
| 29 | |
| 30 | class MathExpGenerator : public AllStatic { |
| 31 | public: |
| 32 | // Register input isn't modified. All other registers are clobbered. |
| 33 | static void EmitMathExp(MacroAssembler* masm, DoubleRegister input, |
| 34 | DoubleRegister result, DoubleRegister double_scratch1, |
| 35 | DoubleRegister double_scratch2, Register temp1, |
| 36 | Register temp2, Register temp3); |
| 37 | |
| 38 | private: |
| 39 | DISALLOW_COPY_AND_ASSIGN(MathExpGenerator); |
| 40 | }; |
| 41 | } |
| 42 | } // namespace v8::internal |
| 43 | |
| 44 | #endif // V8_PPC_CODEGEN_PPC_H_ |