Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Side by Side Diff: src/a64/assembler-a64.cc

Issue 201613005: Better handling of constant-pool-like parts of the instruction stream. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 // It is still worth asserting the marker is complete. 609 // It is still worth asserting the marker is complete.
610 // 4: blr xzr 610 // 4: blr xzr
611 ASSERT(!result || (instr->following()->IsBranchAndLinkToRegister() && 611 ASSERT(!result || (instr->following()->IsBranchAndLinkToRegister() &&
612 instr->following()->Rn() == xzr.code())); 612 instr->following()->Rn() == xzr.code()));
613 613
614 return result; 614 return result;
615 } 615 }
616 616
617 617
618 int Assembler::ConstantPoolSizeAt(Instruction* instr) { 618 int Assembler::ConstantPoolSizeAt(Instruction* instr) {
619 #ifdef USE_SIMULATOR
620 // Assembler::debug() embeds constants directly into the instruction stream.
621 // Although this is not a genuine constant pool, treat it like one to avoid
622 // disassembling the constants.
623 if ((instr->Mask(ExceptionMask) == HLT) &&
624 (instr->ImmException() == kImmExceptionIsDebug)) {
625 const char* message =
626 reinterpret_cast<const char*>(
627 instr->InstructionAtOffset(kDebugMessageOffset));
628 int size = kDebugMessageOffset + strlen(message) + 1;
629 return RoundUp(size, kInstructionSize) / kInstructionSize;
630 }
631 // Same for printf support, see MacroAssembler::CallPrintf().
632 if ((instr->Mask(ExceptionMask) == HLT) &&
633 (instr->ImmException() == kImmExceptionIsPrintf)) {
634 return kPrintfLength / kInstructionSize;
635 }
636 #endif
619 if (IsConstantPoolAt(instr)) { 637 if (IsConstantPoolAt(instr)) {
620 return instr->ImmLLiteral(); 638 return instr->ImmLLiteral();
621 } else { 639 } else {
622 return -1; 640 return -1;
623 } 641 }
624 } 642 }
625 643
626 644
627 void Assembler::ConstantPoolMarker(uint32_t size) { 645 void Assembler::ConstantPoolMarker(uint32_t size) {
628 ASSERT(is_const_pool_blocked()); 646 ASSERT(is_const_pool_blocked());
(...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2772 // code. 2790 // code.
2773 #ifdef ENABLE_DEBUGGER_SUPPORT 2791 #ifdef ENABLE_DEBUGGER_SUPPORT
2774 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); 2792 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size));
2775 #endif 2793 #endif
2776 } 2794 }
2777 2795
2778 2796
2779 } } // namespace v8::internal 2797 } } // namespace v8::internal
2780 2798
2781 #endif // V8_TARGET_ARCH_A64 2799 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698