| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 // CodeGenerator::ProcessDeferred(). | 285 // CodeGenerator::ProcessDeferred(). |
| 286 // Currently the branch delay slot is filled by the MacroAssembler. | 286 // Currently the branch delay slot is filled by the MacroAssembler. |
| 287 // Use rather b(Label) for code generation. | 287 // Use rather b(Label) for code generation. |
| 288 void jmp(Label* L) { | 288 void jmp(Label* L) { |
| 289 Branch(L); | 289 Branch(L); |
| 290 } | 290 } |
| 291 | 291 |
| 292 void Load(Register dst, const MemOperand& src, Representation r); | 292 void Load(Register dst, const MemOperand& src, Representation r); |
| 293 void Store(Register src, const MemOperand& dst, Representation r); | 293 void Store(Register src, const MemOperand& dst, Representation r); |
| 294 | 294 |
| 295 void PushRoot(Heap::RootListIndex index) { | |
| 296 LoadRoot(at, index); | |
| 297 Push(at); | |
| 298 } | |
| 299 | |
| 300 // Compare the object in a register to a value and jump if they are equal. | |
| 301 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal) { | |
| 302 LoadRoot(at, index); | |
| 303 Branch(if_equal, eq, with, Operand(at)); | |
| 304 } | |
| 305 | |
| 306 // Compare the object in a register to a value and jump if they are not equal. | |
| 307 void JumpIfNotRoot(Register with, Heap::RootListIndex index, | |
| 308 Label* if_not_equal) { | |
| 309 LoadRoot(at, index); | |
| 310 Branch(if_not_equal, ne, with, Operand(at)); | |
| 311 } | |
| 312 | |
| 313 // Load an object from the root table. | 295 // Load an object from the root table. |
| 314 void LoadRoot(Register destination, | 296 void LoadRoot(Register destination, |
| 315 Heap::RootListIndex index); | 297 Heap::RootListIndex index); |
| 316 void LoadRoot(Register destination, | 298 void LoadRoot(Register destination, |
| 317 Heap::RootListIndex index, | 299 Heap::RootListIndex index, |
| 318 Condition cond, Register src1, const Operand& src2); | 300 Condition cond, Register src1, const Operand& src2); |
| 319 | 301 |
| 320 // Store an object to the root table. | 302 // Store an object to the root table. |
| 321 void StoreRoot(Register source, | 303 void StoreRoot(Register source, |
| 322 Heap::RootListIndex index); | 304 Heap::RootListIndex index); |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 bool argument_count_is_length = false); | 916 bool argument_count_is_length = false); |
| 935 | 917 |
| 936 // Get the actual activation frame alignment for target environment. | 918 // Get the actual activation frame alignment for target environment. |
| 937 static int ActivationFrameAlignment(); | 919 static int ActivationFrameAlignment(); |
| 938 | 920 |
| 939 // Make sure the stack is aligned. Only emits code in debug mode. | 921 // Make sure the stack is aligned. Only emits code in debug mode. |
| 940 void AssertStackIsAligned(); | 922 void AssertStackIsAligned(); |
| 941 | 923 |
| 942 void LoadContext(Register dst, int context_chain_length); | 924 void LoadContext(Register dst, int context_chain_length); |
| 943 | 925 |
| 944 // Load the global proxy from the current context. | |
| 945 void LoadGlobalProxy(Register dst); | |
| 946 | |
| 947 // Conditionally load the cached Array transitioned map of type | 926 // Conditionally load the cached Array transitioned map of type |
| 948 // transitioned_kind from the native context if the map in register | 927 // transitioned_kind from the native context if the map in register |
| 949 // map_in_out is the cached Array map in the native context of | 928 // map_in_out is the cached Array map in the native context of |
| 950 // expected_kind. | 929 // expected_kind. |
| 951 void LoadTransitionedArrayMapConditional( | 930 void LoadTransitionedArrayMapConditional( |
| 952 ElementsKind expected_kind, | 931 ElementsKind expected_kind, |
| 953 ElementsKind transitioned_kind, | 932 ElementsKind transitioned_kind, |
| 954 Register map_in_out, | 933 Register map_in_out, |
| 955 Register scratch, | 934 Register scratch, |
| 956 Label* no_map_match); | 935 Label* no_map_match); |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1478 // Abort execution if argument is a smi, enabled via --debug-code. | 1457 // Abort execution if argument is a smi, enabled via --debug-code. |
| 1479 void AssertNotSmi(Register object); | 1458 void AssertNotSmi(Register object); |
| 1480 void AssertSmi(Register object); | 1459 void AssertSmi(Register object); |
| 1481 | 1460 |
| 1482 // Abort execution if argument is not a string, enabled via --debug-code. | 1461 // Abort execution if argument is not a string, enabled via --debug-code. |
| 1483 void AssertString(Register object); | 1462 void AssertString(Register object); |
| 1484 | 1463 |
| 1485 // Abort execution if argument is not a name, enabled via --debug-code. | 1464 // Abort execution if argument is not a name, enabled via --debug-code. |
| 1486 void AssertName(Register object); | 1465 void AssertName(Register object); |
| 1487 | 1466 |
| 1488 // Abort execution if argument is not a JSFunction, enabled via --debug-code. | |
| 1489 void AssertFunction(Register object); | |
| 1490 | |
| 1491 // Abort execution if argument is not undefined or an AllocationSite, enabled | 1467 // Abort execution if argument is not undefined or an AllocationSite, enabled |
| 1492 // via --debug-code. | 1468 // via --debug-code. |
| 1493 void AssertUndefinedOrAllocationSite(Register object, Register scratch); | 1469 void AssertUndefinedOrAllocationSite(Register object, Register scratch); |
| 1494 | 1470 |
| 1495 // Abort execution if reg is not the root value with the given index, | 1471 // Abort execution if reg is not the root value with the given index, |
| 1496 // enabled via --debug-code. | 1472 // enabled via --debug-code. |
| 1497 void AssertIsRoot(Register reg, Heap::RootListIndex index); | 1473 void AssertIsRoot(Register reg, Heap::RootListIndex index); |
| 1498 | 1474 |
| 1499 // --------------------------------------------------------------------------- | 1475 // --------------------------------------------------------------------------- |
| 1500 // HeapNumber utilities. | 1476 // HeapNumber utilities. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1728 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 1753 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1729 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1754 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1730 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1755 #else | 1731 #else |
| 1756 #define ACCESS_MASM(masm) masm-> | 1732 #define ACCESS_MASM(masm) masm-> |
| 1757 #endif | 1733 #endif |
| 1758 | 1734 |
| 1759 } } // namespace v8::internal | 1735 } } // namespace v8::internal |
| 1760 | 1736 |
| 1761 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1737 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| OLD | NEW |