| 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 | 589 |
| 590 | 590 |
| 591 void Assembler::Align(int m) { | 591 void Assembler::Align(int m) { |
| 592 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); | 592 DCHECK(m >= 4 && base::bits::IsPowerOfTwo32(m)); |
| 593 while ((pc_offset() & (m - 1)) != 0) { | 593 while ((pc_offset() & (m - 1)) != 0) { |
| 594 nop(); | 594 nop(); |
| 595 } | 595 } |
| 596 } | 596 } |
| 597 | 597 |
| 598 | 598 |
| 599 void Assembler::DataAlign(int m) { |
| 600 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
| 601 while ((pc_offset() & (m - 1)) != 0) { |
| 602 db(0); |
| 603 } |
| 604 } |
| 605 |
| 606 |
| 599 void Assembler::CheckLabelLinkChain(Label const * label) { | 607 void Assembler::CheckLabelLinkChain(Label const * label) { |
| 600 #ifdef DEBUG | 608 #ifdef DEBUG |
| 601 if (label->is_linked()) { | 609 if (label->is_linked()) { |
| 602 static const int kMaxLinksToCheck = 64; // Avoid O(n2) behaviour. | 610 static const int kMaxLinksToCheck = 64; // Avoid O(n2) behaviour. |
| 603 int links_checked = 0; | 611 int links_checked = 0; |
| 604 int64_t linkoffset = label->pos(); | 612 int64_t linkoffset = label->pos(); |
| 605 bool end_of_chain = false; | 613 bool end_of_chain = false; |
| 606 while (!end_of_chain) { | 614 while (!end_of_chain) { |
| 607 if (++links_checked > kMaxLinksToCheck) break; | 615 if (++links_checked > kMaxLinksToCheck) break; |
| 608 Instruction * link = InstructionAt(linkoffset); | 616 Instruction * link = InstructionAt(linkoffset); |
| (...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); | 3180 movk(scratch, (target_offset >> 32) & 0xFFFF, 32); |
| 3173 DCHECK((target_offset >> 48) == 0); | 3181 DCHECK((target_offset >> 48) == 0); |
| 3174 add(rd, rd, scratch); | 3182 add(rd, rd, scratch); |
| 3175 } | 3183 } |
| 3176 | 3184 |
| 3177 | 3185 |
| 3178 } // namespace internal | 3186 } // namespace internal |
| 3179 } // namespace v8 | 3187 } // namespace v8 |
| 3180 | 3188 |
| 3181 #endif // V8_TARGET_ARCH_ARM64 | 3189 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |