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