OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1506 ASSERT(size % 16 == 0); | 1506 ASSERT(size % 16 == 0); |
1507 } else { | 1507 } else { |
1508 BumpSystemStackPointer(size); | 1508 BumpSystemStackPointer(size); |
1509 } | 1509 } |
1510 | 1510 |
1511 Sub(StackPointer(), StackPointer(), size); | 1511 Sub(StackPointer(), StackPointer(), size); |
1512 } | 1512 } |
1513 | 1513 |
1514 | 1514 |
1515 void MacroAssembler::Claim(const Register& count, uint64_t unit_size) { | 1515 void MacroAssembler::Claim(const Register& count, uint64_t unit_size) { |
| 1516 if (unit_size == 0) return; |
1516 ASSERT(IsPowerOf2(unit_size)); | 1517 ASSERT(IsPowerOf2(unit_size)); |
1517 | 1518 |
1518 if (unit_size == 0) { | |
1519 return; | |
1520 } | |
1521 | |
1522 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits); | 1519 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits); |
1523 const Operand size(count, LSL, shift); | 1520 const Operand size(count, LSL, shift); |
1524 | 1521 |
1525 if (size.IsZero()) { | 1522 if (size.IsZero()) { |
1526 return; | 1523 return; |
1527 } | 1524 } |
1528 | 1525 |
1529 if (!csp.Is(StackPointer())) { | 1526 if (!csp.Is(StackPointer())) { |
1530 BumpSystemStackPointer(size); | 1527 BumpSystemStackPointer(size); |
1531 } | 1528 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 } else if (emit_debug_code()) { | 1564 } else if (emit_debug_code()) { |
1568 // It is safe to leave csp where it is when unwinding the JavaScript stack, | 1565 // It is safe to leave csp where it is when unwinding the JavaScript stack, |
1569 // but if we keep it matching StackPointer, the simulator can detect memory | 1566 // but if we keep it matching StackPointer, the simulator can detect memory |
1570 // accesses in the now-free part of the stack. | 1567 // accesses in the now-free part of the stack. |
1571 Mov(csp, StackPointer()); | 1568 Mov(csp, StackPointer()); |
1572 } | 1569 } |
1573 } | 1570 } |
1574 | 1571 |
1575 | 1572 |
1576 void MacroAssembler::Drop(const Register& count, uint64_t unit_size) { | 1573 void MacroAssembler::Drop(const Register& count, uint64_t unit_size) { |
| 1574 if (unit_size == 0) return; |
1577 ASSERT(IsPowerOf2(unit_size)); | 1575 ASSERT(IsPowerOf2(unit_size)); |
1578 | 1576 |
1579 if (unit_size == 0) { | |
1580 return; | |
1581 } | |
1582 | |
1583 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits); | 1577 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits); |
1584 const Operand size(count, LSL, shift); | 1578 const Operand size(count, LSL, shift); |
1585 | 1579 |
1586 if (size.IsZero()) { | 1580 if (size.IsZero()) { |
1587 return; | 1581 return; |
1588 } | 1582 } |
1589 | 1583 |
1590 Add(StackPointer(), StackPointer(), size); | 1584 Add(StackPointer(), StackPointer(), size); |
1591 | 1585 |
1592 if (!csp.Is(StackPointer()) && emit_debug_code()) { | 1586 if (!csp.Is(StackPointer()) && emit_debug_code()) { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 // characters are reserved for controlling features of the instrumentation. | 1686 // characters are reserved for controlling features of the instrumentation. |
1693 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1])); | 1687 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1])); |
1694 | 1688 |
1695 InstructionAccurateScope scope(this, 1); | 1689 InstructionAccurateScope scope(this, 1); |
1696 movn(xzr, (marker_name[1] << 8) | marker_name[0]); | 1690 movn(xzr, (marker_name[1] << 8) | marker_name[0]); |
1697 } | 1691 } |
1698 | 1692 |
1699 } } // namespace v8::internal | 1693 } } // namespace v8::internal |
1700 | 1694 |
1701 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 1695 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
OLD | NEW |