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 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 5 #ifndef V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 6 #define V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/mips/assembler-mips.h" | 10 #include "src/mips/assembler-mips.h" |
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1317 // abstract parameter passing for the three different ways we call | 1317 // abstract parameter passing for the three different ways we call |
1318 // C functions from generated code. | 1318 // C functions from generated code. |
1319 void MovToFloatParameter(DoubleRegister src); | 1319 void MovToFloatParameter(DoubleRegister src); |
1320 void MovToFloatParameters(DoubleRegister src1, DoubleRegister src2); | 1320 void MovToFloatParameters(DoubleRegister src1, DoubleRegister src2); |
1321 void MovToFloatResult(DoubleRegister src); | 1321 void MovToFloatResult(DoubleRegister src); |
1322 | 1322 |
1323 // Jump to the builtin routine. | 1323 // Jump to the builtin routine. |
1324 void JumpToExternalReference(const ExternalReference& builtin, | 1324 void JumpToExternalReference(const ExternalReference& builtin, |
1325 BranchDelaySlot bd = PROTECT); | 1325 BranchDelaySlot bd = PROTECT); |
1326 | 1326 |
1327 // Invoke specified builtin JavaScript function. Adds an entry to | 1327 // Invoke specified builtin JavaScript function. |
1328 // the unresolved list if the name does not resolve. | 1328 void InvokeBuiltin(int native_context_index, InvokeFlag flag, |
1329 void InvokeBuiltin(Builtins::JavaScript id, | |
1330 InvokeFlag flag, | |
1331 const CallWrapper& call_wrapper = NullCallWrapper()); | 1329 const CallWrapper& call_wrapper = NullCallWrapper()); |
1332 | 1330 |
1333 // Store the code object for the given builtin in the target register and | 1331 // Store the code object for the given builtin in the target register and |
1334 // setup the function in a1. | 1332 // setup the function in a1. |
1335 void GetBuiltinEntry(Register target, Builtins::JavaScript id); | 1333 void GetBuiltinEntry(Register target, int native_context_index); |
1336 | 1334 |
1337 // Store the function for the given builtin in the target register. | 1335 // Store the function for the given builtin in the target register. |
1338 void GetBuiltinFunction(Register target, Builtins::JavaScript id); | 1336 void GetBuiltinFunction(Register target, int native_context_index); |
1339 | 1337 |
1340 struct Unresolved { | 1338 struct Unresolved { |
1341 int pc; | 1339 int pc; |
1342 uint32_t flags; // See Bootstrapper::FixupFlags decoders/encoders. | 1340 uint32_t flags; // See Bootstrapper::FixupFlags decoders/encoders. |
1343 const char* name; | 1341 const char* name; |
1344 }; | 1342 }; |
1345 | 1343 |
1346 Handle<Object> CodeObject() { | 1344 Handle<Object> CodeObject() { |
1347 DCHECK(!code_object_.is_null()); | 1345 DCHECK(!code_object_.is_null()); |
1348 return code_object_; | 1346 return code_object_; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1653 // Helper functions for generating invokes. | 1651 // Helper functions for generating invokes. |
1654 void InvokePrologue(const ParameterCount& expected, | 1652 void InvokePrologue(const ParameterCount& expected, |
1655 const ParameterCount& actual, | 1653 const ParameterCount& actual, |
1656 Handle<Code> code_constant, | 1654 Handle<Code> code_constant, |
1657 Register code_reg, | 1655 Register code_reg, |
1658 Label* done, | 1656 Label* done, |
1659 bool* definitely_mismatches, | 1657 bool* definitely_mismatches, |
1660 InvokeFlag flag, | 1658 InvokeFlag flag, |
1661 const CallWrapper& call_wrapper); | 1659 const CallWrapper& call_wrapper); |
1662 | 1660 |
1663 // Get the code for the given builtin. Returns if able to resolve | |
1664 // the function in the 'resolved' flag. | |
1665 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); | |
1666 | |
1667 void InitializeNewString(Register string, | 1661 void InitializeNewString(Register string, |
1668 Register length, | 1662 Register length, |
1669 Heap::RootListIndex map_index, | 1663 Heap::RootListIndex map_index, |
1670 Register scratch1, | 1664 Register scratch1, |
1671 Register scratch2); | 1665 Register scratch2); |
1672 | 1666 |
1673 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. | 1667 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
1674 void InNewSpace(Register object, | 1668 void InNewSpace(Register object, |
1675 Register scratch, | 1669 Register scratch, |
1676 Condition cond, // eq for new space, ne otherwise. | 1670 Condition cond, // eq for new space, ne otherwise. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1744 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1738 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1745 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1739 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1746 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1740 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1747 #else | 1741 #else |
1748 #define ACCESS_MASM(masm) masm-> | 1742 #define ACCESS_MASM(masm) masm-> |
1749 #endif | 1743 #endif |
1750 | 1744 |
1751 } } // namespace v8::internal | 1745 } } // namespace v8::internal |
1752 | 1746 |
1753 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1747 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |