| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 5 #ifndef V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 6 #define V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "src/arm64/assembler-arm64.h" | 10 #include "src/arm64/assembler-arm64.h" |
| (...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 // ---- Object Utilities ---- | 1094 // ---- Object Utilities ---- |
| 1095 | 1095 |
| 1096 // Initialize fields with filler values. Fields starting at |current_address| | 1096 // Initialize fields with filler values. Fields starting at |current_address| |
| 1097 // not including |end_address| are overwritten with the value in |filler|. At | 1097 // not including |end_address| are overwritten with the value in |filler|. At |
| 1098 // the end the loop, |current_address| takes the value of |end_address|. | 1098 // the end the loop, |current_address| takes the value of |end_address|. |
| 1099 void InitializeFieldsWithFiller(Register current_address, | 1099 void InitializeFieldsWithFiller(Register current_address, |
| 1100 Register end_address, Register filler); | 1100 Register end_address, Register filler); |
| 1101 | 1101 |
| 1102 // ---- String Utilities ---- | 1102 // ---- String Utilities ---- |
| 1103 | 1103 |
| 1104 | |
| 1105 // Jump to label if either object is not a sequential one-byte string. | |
| 1106 // Optionally perform a smi check on the objects first. | |
| 1107 void JumpIfEitherIsNotSequentialOneByteStrings( | |
| 1108 Register first, Register second, Register scratch1, Register scratch2, | |
| 1109 Label* failure, SmiCheckType smi_check = DO_SMI_CHECK); | |
| 1110 | |
| 1111 // Check if instance type is sequential one-byte string and jump to label if | |
| 1112 // it is not. | |
| 1113 void JumpIfInstanceTypeIsNotSequentialOneByte(Register type, Register scratch, | |
| 1114 Label* failure); | |
| 1115 | |
| 1116 // Checks if both instance types are sequential one-byte strings and jumps to | |
| 1117 // label if either is not. | |
| 1118 void JumpIfEitherInstanceTypeIsNotSequentialOneByte( | |
| 1119 Register first_object_instance_type, Register second_object_instance_type, | |
| 1120 Register scratch1, Register scratch2, Label* failure); | |
| 1121 | |
| 1122 // Checks if both instance types are sequential one-byte strings and jumps to | 1104 // Checks if both instance types are sequential one-byte strings and jumps to |
| 1123 // label if either is not. | 1105 // label if either is not. |
| 1124 void JumpIfBothInstanceTypesAreNotSequentialOneByte( | 1106 void JumpIfBothInstanceTypesAreNotSequentialOneByte( |
| 1125 Register first_object_instance_type, Register second_object_instance_type, | 1107 Register first_object_instance_type, Register second_object_instance_type, |
| 1126 Register scratch1, Register scratch2, Label* failure); | 1108 Register scratch1, Register scratch2, Label* failure); |
| 1127 | 1109 |
| 1128 void JumpIfNotUniqueNameInstanceType(Register type, Label* not_unique_name); | 1110 void JumpIfNotUniqueNameInstanceType(Register type, Label* not_unique_name); |
| 1129 | 1111 |
| 1130 // ---- Calling / Jumping helpers ---- | 1112 // ---- Calling / Jumping helpers ---- |
| 1131 | 1113 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 | 1335 |
| 1354 // FastAllocate is right now only used for folded allocations. It just | 1336 // FastAllocate is right now only used for folded allocations. It just |
| 1355 // increments the top pointer without checking against limit. This can only | 1337 // increments the top pointer without checking against limit. This can only |
| 1356 // be done if it was proved earlier that the allocation will succeed. | 1338 // be done if it was proved earlier that the allocation will succeed. |
| 1357 void FastAllocate(Register object_size, Register result, Register result_end, | 1339 void FastAllocate(Register object_size, Register result, Register result_end, |
| 1358 Register scratch, AllocationFlags flags); | 1340 Register scratch, AllocationFlags flags); |
| 1359 | 1341 |
| 1360 void FastAllocate(int object_size, Register result, Register scratch1, | 1342 void FastAllocate(int object_size, Register result, Register scratch1, |
| 1361 Register scratch2, AllocationFlags flags); | 1343 Register scratch2, AllocationFlags flags); |
| 1362 | 1344 |
| 1363 void AllocateTwoByteString(Register result, | |
| 1364 Register length, | |
| 1365 Register scratch1, | |
| 1366 Register scratch2, | |
| 1367 Register scratch3, | |
| 1368 Label* gc_required); | |
| 1369 void AllocateOneByteString(Register result, Register length, | |
| 1370 Register scratch1, Register scratch2, | |
| 1371 Register scratch3, Label* gc_required); | |
| 1372 void AllocateTwoByteConsString(Register result, | |
| 1373 Register length, | |
| 1374 Register scratch1, | |
| 1375 Register scratch2, | |
| 1376 Label* gc_required); | |
| 1377 void AllocateOneByteConsString(Register result, Register length, | |
| 1378 Register scratch1, Register scratch2, | |
| 1379 Label* gc_required); | |
| 1380 void AllocateTwoByteSlicedString(Register result, | |
| 1381 Register length, | |
| 1382 Register scratch1, | |
| 1383 Register scratch2, | |
| 1384 Label* gc_required); | |
| 1385 void AllocateOneByteSlicedString(Register result, Register length, | |
| 1386 Register scratch1, Register scratch2, | |
| 1387 Label* gc_required); | |
| 1388 | |
| 1389 // Allocates a heap number or jumps to the gc_required label if the young | 1345 // Allocates a heap number or jumps to the gc_required label if the young |
| 1390 // space is full and a scavenge is needed. | 1346 // space is full and a scavenge is needed. |
| 1391 // All registers are clobbered. | 1347 // All registers are clobbered. |
| 1392 // If no heap_number_map register is provided, the function will take care of | 1348 // If no heap_number_map register is provided, the function will take care of |
| 1393 // loading it. | 1349 // loading it. |
| 1394 void AllocateHeapNumber(Register result, | 1350 void AllocateHeapNumber(Register result, |
| 1395 Label* gc_required, | 1351 Label* gc_required, |
| 1396 Register scratch1, | 1352 Register scratch1, |
| 1397 Register scratch2, | 1353 Register scratch2, |
| 1398 CPURegister value = NoFPReg, | 1354 CPURegister value = NoFPReg, |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 class RegisterBits : public BitField<unsigned, 0, 5> {}; | 2185 class RegisterBits : public BitField<unsigned, 0, 5> {}; |
| 2230 class DeltaBits : public BitField<uint32_t, 5, 32-5> {}; | 2186 class DeltaBits : public BitField<uint32_t, 5, 32-5> {}; |
| 2231 }; | 2187 }; |
| 2232 | 2188 |
| 2233 } // namespace internal | 2189 } // namespace internal |
| 2234 } // namespace v8 | 2190 } // namespace v8 |
| 2235 | 2191 |
| 2236 #define ACCESS_MASM(masm) masm-> | 2192 #define ACCESS_MASM(masm) masm-> |
| 2237 | 2193 |
| 2238 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ | 2194 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_H_ |
| OLD | NEW |