| 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. | 606 static const int kMaxLinksToCheck = 64; // Avoid O(n2) behaviour. |
| 607 int links_checked = 0; | 607 int links_checked = 0; |
| 608 int linkoffset = label->pos(); | 608 int linkoffset = label->pos(); |
| 609 bool end_of_chain = false; | 609 bool end_of_chain = false; |
| 610 while (!end_of_chain) { | 610 while (!end_of_chain) { |
| 611 if (++links_checked > kMaxLinksToCheck) break; | 611 if (++links_checked > kMaxLinksToCheck) break; |
| 612 Instruction * link = InstructionAt(linkoffset); | 612 Instruction * link = InstructionAt(linkoffset); |
| 613 int linkpcoffset = link->ImmPCOffset(); | 613 int linkpcoffset = link->ImmPCOffset(); |
| 614 int prevlinkoffset = linkoffset + linkpcoffset; | 614 int prevlinkoffset = linkoffset + linkpcoffset; |
| 615 | 615 |
| 616 end_of_chain = (linkoffset == prevlinkoffset); | 616 end_of_chain = (linkoffset == prevlinkoffset); |
| (...skipping 2515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3132 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); | 3132 movz(scratch, (target_offset >> 16) & 0xFFFF, 16); |
| 3133 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3133 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
| 3134 DCHECK((target_offset >> 48) == 0); | 3134 DCHECK((target_offset >> 48) == 0); |
| 3135 add(rd, rd, scratch); | 3135 add(rd, rd, scratch); |
| 3136 } | 3136 } |
| 3137 | 3137 |
| 3138 | 3138 |
| 3139 } } // namespace v8::internal | 3139 } } // namespace v8::internal |
| 3140 | 3140 |
| 3141 #endif // V8_TARGET_ARCH_ARM64 | 3141 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |