| 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 // allocation is undone. | 511 // allocation is undone. |
| 512 void UndoAllocationInNewSpace(Register object, Register scratch); | 512 void UndoAllocationInNewSpace(Register object, Register scratch); |
| 513 | 513 |
| 514 | 514 |
| 515 void AllocateTwoByteString(Register result, | 515 void AllocateTwoByteString(Register result, |
| 516 Register length, | 516 Register length, |
| 517 Register scratch1, | 517 Register scratch1, |
| 518 Register scratch2, | 518 Register scratch2, |
| 519 Register scratch3, | 519 Register scratch3, |
| 520 Label* gc_required); | 520 Label* gc_required); |
| 521 void AllocateAsciiString(Register result, | 521 void AllocateOneByteString(Register result, Register length, |
| 522 Register length, | 522 Register scratch1, Register scratch2, |
| 523 Register scratch1, | 523 Register scratch3, Label* gc_required); |
| 524 Register scratch2, | |
| 525 Register scratch3, | |
| 526 Label* gc_required); | |
| 527 void AllocateTwoByteConsString(Register result, | 524 void AllocateTwoByteConsString(Register result, |
| 528 Register length, | 525 Register length, |
| 529 Register scratch1, | 526 Register scratch1, |
| 530 Register scratch2, | 527 Register scratch2, |
| 531 Label* gc_required); | 528 Label* gc_required); |
| 532 void AllocateAsciiConsString(Register result, | 529 void AllocateOneByteConsString(Register result, Register length, |
| 533 Register length, | 530 Register scratch1, Register scratch2, |
| 534 Register scratch1, | 531 Label* gc_required); |
| 535 Register scratch2, | |
| 536 Label* gc_required); | |
| 537 void AllocateTwoByteSlicedString(Register result, | 532 void AllocateTwoByteSlicedString(Register result, |
| 538 Register length, | 533 Register length, |
| 539 Register scratch1, | 534 Register scratch1, |
| 540 Register scratch2, | 535 Register scratch2, |
| 541 Label* gc_required); | 536 Label* gc_required); |
| 542 void AllocateAsciiSlicedString(Register result, | 537 void AllocateOneByteSlicedString(Register result, Register length, |
| 543 Register length, | 538 Register scratch1, Register scratch2, |
| 544 Register scratch1, | 539 Label* gc_required); |
| 545 Register scratch2, | |
| 546 Label* gc_required); | |
| 547 | 540 |
| 548 // Allocates a heap number or jumps to the gc_required label if the young | 541 // Allocates a heap number or jumps to the gc_required label if the young |
| 549 // space is full and a scavenge is needed. All registers are clobbered also | 542 // space is full and a scavenge is needed. All registers are clobbered also |
| 550 // when control continues at the gc_required label. | 543 // when control continues at the gc_required label. |
| 551 void AllocateHeapNumber(Register result, | 544 void AllocateHeapNumber(Register result, |
| 552 Register scratch1, | 545 Register scratch1, |
| 553 Register scratch2, | 546 Register scratch2, |
| 554 Register heap_number_map, | 547 Register heap_number_map, |
| 555 Label* gc_required, | 548 Label* gc_required, |
| 556 TaggingMode tagging_mode = TAG_RESULT, | 549 TaggingMode tagging_mode = TAG_RESULT, |
| (...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 // the label not_found with only the content of register object unchanged. | 1467 // the label not_found with only the content of register object unchanged. |
| 1475 void LookupNumberStringCache(Register object, | 1468 void LookupNumberStringCache(Register object, |
| 1476 Register result, | 1469 Register result, |
| 1477 Register scratch1, | 1470 Register scratch1, |
| 1478 Register scratch2, | 1471 Register scratch2, |
| 1479 Register scratch3, | 1472 Register scratch3, |
| 1480 Label* not_found); | 1473 Label* not_found); |
| 1481 | 1474 |
| 1482 // Checks if both instance types are sequential ASCII strings and jumps to | 1475 // Checks if both instance types are sequential ASCII strings and jumps to |
| 1483 // label if either is not. | 1476 // label if either is not. |
| 1484 void JumpIfBothInstanceTypesAreNotSequentialAscii( | 1477 void JumpIfBothInstanceTypesAreNotSequentialOneByte( |
| 1485 Register first_object_instance_type, | 1478 Register first_object_instance_type, Register second_object_instance_type, |
| 1486 Register second_object_instance_type, | 1479 Register scratch1, Register scratch2, Label* failure); |
| 1487 Register scratch1, | |
| 1488 Register scratch2, | |
| 1489 Label* failure); | |
| 1490 | 1480 |
| 1491 // Check if instance type is sequential ASCII string and jump to label if | 1481 // Check if instance type is sequential one-byte string and jump to label if |
| 1492 // it is not. | 1482 // it is not. |
| 1493 void JumpIfInstanceTypeIsNotSequentialAscii(Register type, | 1483 void JumpIfInstanceTypeIsNotSequentialOneByte(Register type, Register scratch, |
| 1494 Register scratch, | 1484 Label* failure); |
| 1495 Label* failure); | |
| 1496 | 1485 |
| 1497 void JumpIfNotUniqueName(Register reg, Label* not_unique_name); | 1486 void JumpIfNotUniqueName(Register reg, Label* not_unique_name); |
| 1498 | 1487 |
| 1499 void EmitSeqStringSetCharCheck(Register string, | 1488 void EmitSeqStringSetCharCheck(Register string, |
| 1500 Register index, | 1489 Register index, |
| 1501 Register value, | 1490 Register value, |
| 1502 Register scratch, | 1491 Register scratch, |
| 1503 uint32_t encoding_mask); | 1492 uint32_t encoding_mask); |
| 1504 | 1493 |
| 1505 // Test that both first and second are sequential ASCII strings. | 1494 // Checks if both objects are sequential one-byte strings and jumps to label |
| 1506 // Assume that they are non-smis. | 1495 // if either is not. Assumes that neither object is a smi. |
| 1507 void JumpIfNonSmisNotBothSequentialAsciiStrings(Register first, | 1496 void JumpIfNonSmisNotBothSequentialOneByteStrings(Register first, |
| 1508 Register second, | 1497 Register second, |
| 1509 Register scratch1, | 1498 Register scratch1, |
| 1510 Register scratch2, | 1499 Register scratch2, |
| 1511 Label* failure); | 1500 Label* failure); |
| 1512 | 1501 |
| 1513 // Test that both first and second are sequential ASCII strings. | 1502 // Checks if both objects are sequential one-byte strings and jumps to label |
| 1514 // Check that they are non-smis. | 1503 // if either is not. |
| 1515 void JumpIfNotBothSequentialAsciiStrings(Register first, | 1504 void JumpIfNotBothSequentialOneByteStrings(Register first, Register second, |
| 1516 Register second, | 1505 Register scratch1, |
| 1517 Register scratch1, | 1506 Register scratch2, |
| 1518 Register scratch2, | 1507 Label* not_flat_one_byte_strings); |
| 1519 Label* failure); | |
| 1520 | 1508 |
| 1521 void ClampUint8(Register output_reg, Register input_reg); | 1509 void ClampUint8(Register output_reg, Register input_reg); |
| 1522 | 1510 |
| 1523 void ClampDoubleToUint8(Register result_reg, | 1511 void ClampDoubleToUint8(Register result_reg, |
| 1524 DoubleRegister input_reg, | 1512 DoubleRegister input_reg, |
| 1525 DoubleRegister temp_double_reg); | 1513 DoubleRegister temp_double_reg); |
| 1526 | 1514 |
| 1527 | 1515 |
| 1528 void LoadInstanceDescriptors(Register map, Register descriptors); | 1516 void LoadInstanceDescriptors(Register map, Register descriptors); |
| 1529 void EnumLength(Register dst, Register map); | 1517 void EnumLength(Register dst, Register map); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) | 1710 #define CODE_COVERAGE_TOSTRING(x) CODE_COVERAGE_STRINGIFY(x) |
| 1723 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) | 1711 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) |
| 1724 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> | 1712 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> |
| 1725 #else | 1713 #else |
| 1726 #define ACCESS_MASM(masm) masm-> | 1714 #define ACCESS_MASM(masm) masm-> |
| 1727 #endif | 1715 #endif |
| 1728 | 1716 |
| 1729 } } // namespace v8::internal | 1717 } } // namespace v8::internal |
| 1730 | 1718 |
| 1731 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ | 1719 #endif // V8_MIPS_MACRO_ASSEMBLER_MIPS_H_ |
| OLD | NEW |