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 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 | 1525 |
1526 if (!csp.Is(StackPointer())) { | 1526 if (!csp.Is(StackPointer())) { |
1527 BumpSystemStackPointer(size); | 1527 BumpSystemStackPointer(size); |
1528 } | 1528 } |
1529 | 1529 |
1530 Sub(StackPointer(), StackPointer(), size); | 1530 Sub(StackPointer(), StackPointer(), size); |
1531 } | 1531 } |
1532 | 1532 |
1533 | 1533 |
1534 void MacroAssembler::ClaimBySMI(const Register& count_smi, uint64_t unit_size) { | 1534 void MacroAssembler::ClaimBySMI(const Register& count_smi, uint64_t unit_size) { |
1535 ASSERT(IsPowerOf2(unit_size)); | 1535 ASSERT(unit_size == 0 || IsPowerOf2(unit_size)); |
1536 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits) - kSmiShift; | 1536 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits) - kSmiShift; |
1537 const Operand size(count_smi, | 1537 const Operand size(count_smi, |
1538 (shift >= 0) ? (LSL) : (LSR), | 1538 (shift >= 0) ? (LSL) : (LSR), |
1539 (shift >= 0) ? (shift) : (-shift)); | 1539 (shift >= 0) ? (shift) : (-shift)); |
1540 | 1540 |
1541 if (size.IsZero()) { | 1541 if (size.IsZero()) { |
1542 return; | 1542 return; |
1543 } | 1543 } |
1544 | 1544 |
1545 if (!csp.Is(StackPointer())) { | 1545 if (!csp.Is(StackPointer())) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 if (!csp.Is(StackPointer()) && emit_debug_code()) { | 1586 if (!csp.Is(StackPointer()) && emit_debug_code()) { |
1587 // It is safe to leave csp where it is when unwinding the JavaScript stack, | 1587 // It is safe to leave csp where it is when unwinding the JavaScript stack, |
1588 // but if we keep it matching StackPointer, the simulator can detect memory | 1588 // but if we keep it matching StackPointer, the simulator can detect memory |
1589 // accesses in the now-free part of the stack. | 1589 // accesses in the now-free part of the stack. |
1590 Mov(csp, StackPointer()); | 1590 Mov(csp, StackPointer()); |
1591 } | 1591 } |
1592 } | 1592 } |
1593 | 1593 |
1594 | 1594 |
1595 void MacroAssembler::DropBySMI(const Register& count_smi, uint64_t unit_size) { | 1595 void MacroAssembler::DropBySMI(const Register& count_smi, uint64_t unit_size) { |
1596 ASSERT(IsPowerOf2(unit_size)); | 1596 ASSERT(unit_size == 0 || IsPowerOf2(unit_size)); |
1597 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits) - kSmiShift; | 1597 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits) - kSmiShift; |
1598 const Operand size(count_smi, | 1598 const Operand size(count_smi, |
1599 (shift >= 0) ? (LSL) : (LSR), | 1599 (shift >= 0) ? (LSL) : (LSR), |
1600 (shift >= 0) ? (shift) : (-shift)); | 1600 (shift >= 0) ? (shift) : (-shift)); |
1601 | 1601 |
1602 if (size.IsZero()) { | 1602 if (size.IsZero()) { |
1603 return; | 1603 return; |
1604 } | 1604 } |
1605 | 1605 |
1606 Add(StackPointer(), StackPointer(), size); | 1606 Add(StackPointer(), StackPointer(), size); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1686 // characters are reserved for controlling features of the instrumentation. | 1686 // characters are reserved for controlling features of the instrumentation. |
1687 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1])); | 1687 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1])); |
1688 | 1688 |
1689 InstructionAccurateScope scope(this, 1); | 1689 InstructionAccurateScope scope(this, 1); |
1690 movn(xzr, (marker_name[1] << 8) | marker_name[0]); | 1690 movn(xzr, (marker_name[1] << 8) | marker_name[0]); |
1691 } | 1691 } |
1692 | 1692 |
1693 } } // namespace v8::internal | 1693 } } // namespace v8::internal |
1694 | 1694 |
1695 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ | 1695 #endif // V8_ARM64_MACRO_ASSEMBLER_ARM64_INL_H_ |
OLD | NEW |