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_ARM_MACRO_ASSEMBLER_ARM_H_ | 5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/frames.h" | 10 #include "src/frames.h" |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 // remove in a register (or no_reg, if there is nothing to remove). | 601 // remove in a register (or no_reg, if there is nothing to remove). |
602 void LeaveExitFrame(bool save_doubles, Register argument_count, | 602 void LeaveExitFrame(bool save_doubles, Register argument_count, |
603 bool restore_context, | 603 bool restore_context, |
604 bool argument_count_is_length = false); | 604 bool argument_count_is_length = false); |
605 | 605 |
606 // Get the actual activation frame alignment for target environment. | 606 // Get the actual activation frame alignment for target environment. |
607 static int ActivationFrameAlignment(); | 607 static int ActivationFrameAlignment(); |
608 | 608 |
609 void LoadContext(Register dst, int context_chain_length); | 609 void LoadContext(Register dst, int context_chain_length); |
610 | 610 |
| 611 // Load the global proxy from the current context. |
| 612 void LoadGlobalProxy(Register dst); |
| 613 |
611 // Conditionally load the cached Array transitioned map of type | 614 // Conditionally load the cached Array transitioned map of type |
612 // transitioned_kind from the native context if the map in register | 615 // transitioned_kind from the native context if the map in register |
613 // map_in_out is the cached Array map in the native context of | 616 // map_in_out is the cached Array map in the native context of |
614 // expected_kind. | 617 // expected_kind. |
615 void LoadTransitionedArrayMapConditional( | 618 void LoadTransitionedArrayMapConditional( |
616 ElementsKind expected_kind, | 619 ElementsKind expected_kind, |
617 ElementsKind transitioned_kind, | 620 ElementsKind transitioned_kind, |
618 Register map_in_out, | 621 Register map_in_out, |
619 Register scratch, | 622 Register scratch, |
620 Label* no_map_match); | 623 Label* no_map_match); |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 | 943 |
941 void GetWeakValue(Register value, Handle<WeakCell> cell); | 944 void GetWeakValue(Register value, Handle<WeakCell> cell); |
942 | 945 |
943 // Load the value of the weak cell in the value register. Branch to the given | 946 // Load the value of the weak cell in the value register. Branch to the given |
944 // miss label if the weak cell was cleared. | 947 // miss label if the weak cell was cleared. |
945 void LoadWeakValue(Register value, Handle<WeakCell> cell, Label* miss); | 948 void LoadWeakValue(Register value, Handle<WeakCell> cell, Label* miss); |
946 | 949 |
947 // Compare the object in a register to a value from the root list. | 950 // Compare the object in a register to a value from the root list. |
948 // Uses the ip register as scratch. | 951 // Uses the ip register as scratch. |
949 void CompareRoot(Register obj, Heap::RootListIndex index); | 952 void CompareRoot(Register obj, Heap::RootListIndex index); |
| 953 void PushRoot(Heap::RootListIndex index) { |
| 954 LoadRoot(ip, index); |
| 955 Push(ip); |
| 956 } |
950 | 957 |
| 958 // Compare the object in a register to a value and jump if they are equal. |
| 959 void JumpIfRoot(Register with, Heap::RootListIndex index, Label* if_equal) { |
| 960 CompareRoot(with, index); |
| 961 b(eq, if_equal); |
| 962 } |
| 963 |
| 964 // Compare the object in a register to a value and jump if they are not equal. |
| 965 void JumpIfNotRoot(Register with, Heap::RootListIndex index, |
| 966 Label* if_not_equal) { |
| 967 CompareRoot(with, index); |
| 968 b(ne, if_not_equal); |
| 969 } |
951 | 970 |
952 // Load and check the instance type of an object for being a string. | 971 // Load and check the instance type of an object for being a string. |
953 // Loads the type into the second argument register. | 972 // Loads the type into the second argument register. |
954 // Returns a condition that will be enabled if the object was a string | 973 // Returns a condition that will be enabled if the object was a string |
955 // and the passed-in condition passed. If the passed-in condition failed | 974 // and the passed-in condition passed. If the passed-in condition failed |
956 // then flags remain unchanged. | 975 // then flags remain unchanged. |
957 Condition IsObjectStringType(Register obj, | 976 Condition IsObjectStringType(Register obj, |
958 Register type, | 977 Register type, |
959 Condition cond = al) { | 978 Condition cond = al) { |
960 ldr(type, FieldMemOperand(obj, HeapObject::kMapOffset), cond); | 979 ldr(type, FieldMemOperand(obj, HeapObject::kMapOffset), cond); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1281 // Abort execution if argument is a smi, enabled via --debug-code. | 1300 // Abort execution if argument is a smi, enabled via --debug-code. |
1282 void AssertNotSmi(Register object); | 1301 void AssertNotSmi(Register object); |
1283 void AssertSmi(Register object); | 1302 void AssertSmi(Register object); |
1284 | 1303 |
1285 // Abort execution if argument is not a string, enabled via --debug-code. | 1304 // Abort execution if argument is not a string, enabled via --debug-code. |
1286 void AssertString(Register object); | 1305 void AssertString(Register object); |
1287 | 1306 |
1288 // Abort execution if argument is not a name, enabled via --debug-code. | 1307 // Abort execution if argument is not a name, enabled via --debug-code. |
1289 void AssertName(Register object); | 1308 void AssertName(Register object); |
1290 | 1309 |
| 1310 // Abort execution if argument is not a JSFunction, enabled via --debug-code. |
| 1311 void AssertFunction(Register object); |
| 1312 |
1291 // Abort execution if argument is not undefined or an AllocationSite, enabled | 1313 // Abort execution if argument is not undefined or an AllocationSite, enabled |
1292 // via --debug-code. | 1314 // via --debug-code. |
1293 void AssertUndefinedOrAllocationSite(Register object, Register scratch); | 1315 void AssertUndefinedOrAllocationSite(Register object, Register scratch); |
1294 | 1316 |
1295 // Abort execution if reg is not the root value with the given index, | 1317 // Abort execution if reg is not the root value with the given index, |
1296 // enabled via --debug-code. | 1318 // enabled via --debug-code. |
1297 void AssertIsRoot(Register reg, Heap::RootListIndex index); | 1319 void AssertIsRoot(Register reg, Heap::RootListIndex index); |
1298 | 1320 |
1299 // --------------------------------------------------------------------------- | 1321 // --------------------------------------------------------------------------- |
1300 // HeapNumber utilities | 1322 // HeapNumber utilities |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1546 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1568 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
1547 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1569 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
1548 #else | 1570 #else |
1549 #define ACCESS_MASM(masm) masm-> | 1571 #define ACCESS_MASM(masm) masm-> |
1550 #endif | 1572 #endif |
1551 | 1573 |
1552 | 1574 |
1553 } } // namespace v8::internal | 1575 } } // namespace v8::internal |
1554 | 1576 |
1555 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ | 1577 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ |
OLD | NEW |