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/mips64/assembler-mips64.h" | 10 #include "src/mips64/assembler-mips64.h" |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1364 // abstract parameter passing for the three different ways we call | 1364 // abstract parameter passing for the three different ways we call |
1365 // C functions from generated code. | 1365 // C functions from generated code. |
1366 void MovToFloatParameter(DoubleRegister src); | 1366 void MovToFloatParameter(DoubleRegister src); |
1367 void MovToFloatParameters(DoubleRegister src1, DoubleRegister src2); | 1367 void MovToFloatParameters(DoubleRegister src1, DoubleRegister src2); |
1368 void MovToFloatResult(DoubleRegister src); | 1368 void MovToFloatResult(DoubleRegister src); |
1369 | 1369 |
1370 // Jump to the builtin routine. | 1370 // Jump to the builtin routine. |
1371 void JumpToExternalReference(const ExternalReference& builtin, | 1371 void JumpToExternalReference(const ExternalReference& builtin, |
1372 BranchDelaySlot bd = PROTECT); | 1372 BranchDelaySlot bd = PROTECT); |
1373 | 1373 |
1374 // Invoke specified builtin JavaScript function. Adds an entry to | 1374 // Invoke specified builtin JavaScript function. |
1375 // the unresolved list if the name does not resolve. | 1375 void InvokeBuiltin(int native_context_index, InvokeFlag flag, |
1376 void InvokeBuiltin(Builtins::JavaScript id, | |
1377 InvokeFlag flag, | |
1378 const CallWrapper& call_wrapper = NullCallWrapper()); | 1376 const CallWrapper& call_wrapper = NullCallWrapper()); |
1379 | 1377 |
1380 // Store the code object for the given builtin in the target register and | 1378 // Store the code object for the given builtin in the target register and |
1381 // setup the function in a1. | 1379 // setup the function in a1. |
1382 void GetBuiltinEntry(Register target, Builtins::JavaScript id); | 1380 void GetBuiltinEntry(Register target, int native_context_index); |
1383 | 1381 |
1384 // Store the function for the given builtin in the target register. | 1382 // Store the function for the given builtin in the target register. |
1385 void GetBuiltinFunction(Register target, Builtins::JavaScript id); | 1383 void GetBuiltinFunction(Register target, int native_context_index); |
1386 | 1384 |
1387 struct Unresolved { | 1385 struct Unresolved { |
1388 int pc; | 1386 int pc; |
1389 uint32_t flags; // See Bootstrapper::FixupFlags decoders/encoders. | 1387 uint32_t flags; // See Bootstrapper::FixupFlags decoders/encoders. |
1390 const char* name; | 1388 const char* name; |
1391 }; | 1389 }; |
1392 | 1390 |
1393 Handle<Object> CodeObject() { | 1391 Handle<Object> CodeObject() { |
1394 DCHECK(!code_object_.is_null()); | 1392 DCHECK(!code_object_.is_null()); |
1395 return code_object_; | 1393 return code_object_; |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1739 // Helper functions for generating invokes. | 1737 // Helper functions for generating invokes. |
1740 void InvokePrologue(const ParameterCount& expected, | 1738 void InvokePrologue(const ParameterCount& expected, |
1741 const ParameterCount& actual, | 1739 const ParameterCount& actual, |
1742 Handle<Code> code_constant, | 1740 Handle<Code> code_constant, |
1743 Register code_reg, | 1741 Register code_reg, |
1744 Label* done, | 1742 Label* done, |
1745 bool* definitely_mismatches, | 1743 bool* definitely_mismatches, |
1746 InvokeFlag flag, | 1744 InvokeFlag flag, |
1747 const CallWrapper& call_wrapper); | 1745 const CallWrapper& call_wrapper); |
1748 | 1746 |
1749 // Get the code for the given builtin. Returns if able to resolve | |
1750 // the function in the 'resolved' flag. | |
1751 Handle<Code> ResolveBuiltin(Builtins::JavaScript id, bool* resolved); | |
1752 | |
1753 void InitializeNewString(Register string, | 1747 void InitializeNewString(Register string, |
1754 Register length, | 1748 Register length, |
1755 Heap::RootListIndex map_index, | 1749 Heap::RootListIndex map_index, |
1756 Register scratch1, | 1750 Register scratch1, |
1757 Register scratch2); | 1751 Register scratch2); |
1758 | 1752 |
1759 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. | 1753 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. |
1760 void InNewSpace(Register object, | 1754 void InNewSpace(Register object, |
1761 Register scratch, | 1755 Register scratch, |
1762 Condition cond, // eq for new space, ne otherwise. | 1756 Condition cond, // eq for new space, ne otherwise. |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1830 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1824 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1831 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1825 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1832 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1826 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1833 #else | 1827 #else |
1834 #define ACCESS_MASM(masm) masm-> | 1828 #define ACCESS_MASM(masm) masm-> |
1835 #endif | 1829 #endif |
1836 | 1830 |
1837 } } // namespace v8::internal | 1831 } } // namespace v8::internal |
1838 | 1832 |
1839 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1833 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |