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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // CodeGenerator::ProcessDeferred(). | 306 // CodeGenerator::ProcessDeferred(). |
307 // Currently the branch delay slot is filled by the MacroAssembler. | 307 // Currently the branch delay slot is filled by the MacroAssembler. |
308 // Use rather b(Label) for code generation. | 308 // Use rather b(Label) for code generation. |
309 void jmp(Label* L) { | 309 void jmp(Label* L) { |
310 Branch(L); | 310 Branch(L); |
311 } | 311 } |
312 | 312 |
313 void Load(Register dst, const MemOperand& src, Representation r); | 313 void Load(Register dst, const MemOperand& src, Representation r); |
314 void Store(Register src, const MemOperand& dst, Representation r); | 314 void Store(Register src, const MemOperand& dst, Representation r); |
315 | 315 |
316 void PushRoot(Heap::RootListIndex index) { | |
317 LoadRoot(at, index); | |
318 Push(at); | |
319 } | |
320 | |
321 // Compare the object in a register to a value and jump if they are equal. | |
322 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal) { | |
323 LoadRoot(at, index); | |
324 Branch(if_equal, eq, with, Operand(at)); | |
325 } | |
326 | |
327 // Compare the object in a register to a value and jump if they are not equal. | |
328 void JumpIfNotRoot(Register with, Heap::RootListIndex index, | |
329 Label* if_not_equal) { | |
330 LoadRoot(at, index); | |
331 Branch(if_not_equal, ne, with, Operand(at)); | |
332 } | |
333 | |
334 // Load an object from the root table. | 316 // Load an object from the root table. |
335 void LoadRoot(Register destination, | 317 void LoadRoot(Register destination, |
336 Heap::RootListIndex index); | 318 Heap::RootListIndex index); |
337 void LoadRoot(Register destination, | 319 void LoadRoot(Register destination, |
338 Heap::RootListIndex index, | 320 Heap::RootListIndex index, |
339 Condition cond, Register src1, const Operand& src2); | 321 Condition cond, Register src1, const Operand& src2); |
340 | 322 |
341 // Store an object to the root table. | 323 // Store an object to the root table. |
342 void StoreRoot(Register source, | 324 void StoreRoot(Register source, |
343 Heap::RootListIndex index); | 325 Heap::RootListIndex index); |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 bool argument_count_is_length = false); | 946 bool argument_count_is_length = false); |
965 | 947 |
966 // Get the actual activation frame alignment for target environment. | 948 // Get the actual activation frame alignment for target environment. |
967 static int ActivationFrameAlignment(); | 949 static int ActivationFrameAlignment(); |
968 | 950 |
969 // Make sure the stack is aligned. Only emits code in debug mode. | 951 // Make sure the stack is aligned. Only emits code in debug mode. |
970 void AssertStackIsAligned(); | 952 void AssertStackIsAligned(); |
971 | 953 |
972 void LoadContext(Register dst, int context_chain_length); | 954 void LoadContext(Register dst, int context_chain_length); |
973 | 955 |
974 // Load the global proxy from the current context. | |
975 void LoadGlobalProxy(Register dst); | |
976 | |
977 // Conditionally load the cached Array transitioned map of type | 956 // Conditionally load the cached Array transitioned map of type |
978 // transitioned_kind from the native context if the map in register | 957 // transitioned_kind from the native context if the map in register |
979 // map_in_out is the cached Array map in the native context of | 958 // map_in_out is the cached Array map in the native context of |
980 // expected_kind. | 959 // expected_kind. |
981 void LoadTransitionedArrayMapConditional( | 960 void LoadTransitionedArrayMapConditional( |
982 ElementsKind expected_kind, | 961 ElementsKind expected_kind, |
983 ElementsKind transitioned_kind, | 962 ElementsKind transitioned_kind, |
984 Register map_in_out, | 963 Register map_in_out, |
985 Register scratch, | 964 Register scratch, |
986 Label* no_map_match); | 965 Label* no_map_match); |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1571 // Abort execution if argument is a smi, enabled via --debug-code. | 1550 // Abort execution if argument is a smi, enabled via --debug-code. |
1572 void AssertNotSmi(Register object); | 1551 void AssertNotSmi(Register object); |
1573 void AssertSmi(Register object); | 1552 void AssertSmi(Register object); |
1574 | 1553 |
1575 // Abort execution if argument is not a string, enabled via --debug-code. | 1554 // Abort execution if argument is not a string, enabled via --debug-code. |
1576 void AssertString(Register object); | 1555 void AssertString(Register object); |
1577 | 1556 |
1578 // Abort execution if argument is not a name, enabled via --debug-code. | 1557 // Abort execution if argument is not a name, enabled via --debug-code. |
1579 void AssertName(Register object); | 1558 void AssertName(Register object); |
1580 | 1559 |
1581 // Abort execution if argument is not a JSFunction, enabled via --debug-code. | |
1582 void AssertFunction(Register object); | |
1583 | |
1584 // Abort execution if argument is not undefined or an AllocationSite, enabled | 1560 // Abort execution if argument is not undefined or an AllocationSite, enabled |
1585 // via --debug-code. | 1561 // via --debug-code. |
1586 void AssertUndefinedOrAllocationSite(Register object, Register scratch); | 1562 void AssertUndefinedOrAllocationSite(Register object, Register scratch); |
1587 | 1563 |
1588 // Abort execution if reg is not the root value with the given index, | 1564 // Abort execution if reg is not the root value with the given index, |
1589 // enabled via --debug-code. | 1565 // enabled via --debug-code. |
1590 void AssertIsRoot(Register reg, Heap::RootListIndex index); | 1566 void AssertIsRoot(Register reg, Heap::RootListIndex index); |
1591 | 1567 |
1592 // --------------------------------------------------------------------------- | 1568 // --------------------------------------------------------------------------- |
1593 // HeapNumber utilities. | 1569 // HeapNumber utilities. |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1815 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
1840 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1816 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1841 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1817 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1842 #else | 1818 #else |
1843 #define ACCESS_MASM(masm) masm-> | 1819 #define ACCESS_MASM(masm) masm-> |
1844 #endif | 1820 #endif |
1845 | 1821 |
1846 } } // namespace v8::internal | 1822 } } // namespace v8::internal |
1847 | 1823 |
1848 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1824 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
OLD | NEW |