| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Redistribution and use in source and binary forms, with or without | 3 // Redistribution and use in source and binary forms, with or without |
| 4 // modification, are permitted provided that the following conditions are | 4 // modification, are permitted provided that the following conditions are |
| 5 // met: | 5 // met: |
| 6 // | 6 // |
| 7 // * Redistributions of source code must retain the above copyright | 7 // * Redistributions of source code must retain the above copyright |
| 8 // notice, this list of conditions and the following disclaimer. | 8 // notice, this list of conditions and the following disclaimer. |
| 9 // * Redistributions in binary form must reproduce the above | 9 // * Redistributions in binary form must reproduce the above |
| 10 // copyright notice, this list of conditions and the following | 10 // copyright notice, this list of conditions and the following |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); | 596 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); |
| 597 while ((pc_offset() & (m - 1)) != 0) { | 597 while ((pc_offset() & (m - 1)) != 0) { |
| 598 nop(); | 598 nop(); |
| 599 } | 599 } |
| 600 } | 600 } |
| 601 | 601 |
| 602 | 602 |
| 603 void Assembler::CheckLabelLinkChain(Label const * label) { | 603 void Assembler::CheckLabelLinkChain(Label const * label) { |
| 604 #ifdef DEBUG | 604 #ifdef DEBUG |
| 605 if (label->is_linked()) { | 605 if (label->is_linked()) { |
| 606 static const int kMaxLinksToCheck = 256; // Avoid O(n2) behaviour. |
| 607 int links_checked = 0; |
| 606 int linkoffset = label->pos(); | 608 int linkoffset = label->pos(); |
| 607 bool end_of_chain = false; | 609 bool end_of_chain = false; |
| 608 while (!end_of_chain) { | 610 while (!end_of_chain) { |
| 611 if (++links_checked > kMaxLinksToCheck) break; |
| 609 Instruction * link = InstructionAt(linkoffset); | 612 Instruction * link = InstructionAt(linkoffset); |
| 610 int linkpcoffset = link->ImmPCOffset(); | 613 int linkpcoffset = link->ImmPCOffset(); |
| 611 int prevlinkoffset = linkoffset + linkpcoffset; | 614 int prevlinkoffset = linkoffset + linkpcoffset; |
| 612 | 615 |
| 613 end_of_chain = (linkoffset == prevlinkoffset); | 616 end_of_chain = (linkoffset == prevlinkoffset); |
| 614 linkoffset = linkoffset + linkpcoffset; | 617 linkoffset = linkoffset + linkpcoffset; |
| 615 } | 618 } |
| 616 } | 619 } |
| 617 #endif | 620 #endif |
| 618 } | 621 } |
| (...skipping 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3129 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); | 3132 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); |
| 3130 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3133 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
| 3131 DCHECK((target_offset >> 48) == 0); | 3134 DCHECK((target_offset >> 48) == 0); |
| 3132 add(rd, rd, scratch); | 3135 add(rd, rd, scratch); |
| 3133 } | 3136 } |
| 3134 | 3137 |
| 3135 | 3138 |
| 3136 } } // namespace v8::internal | 3139 } } // namespace v8::internal |
| 3137 | 3140 |
| 3138 #endif // V8_TARGET_ARCH_ARM64 | 3141 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |