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

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

Issue 148513009: A64: Avoid generating simulator specific instructions if we are building a snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Fallthrough if serializer is enabled. Created 6 years, 10 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 1748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 1759
1760 1760
1761 void Assembler::brk(int code) { 1761 void Assembler::brk(int code) {
1762 ASSERT(is_uint16(code)); 1762 ASSERT(is_uint16(code));
1763 Emit(BRK | ImmException(code)); 1763 Emit(BRK | ImmException(code));
1764 } 1764 }
1765 1765
1766 1766
1767 void Assembler::debug(const char* message, uint32_t code, Instr params) { 1767 void Assembler::debug(const char* message, uint32_t code, Instr params) {
1768 #ifdef USE_SIMULATOR 1768 #ifdef USE_SIMULATOR
1769 // The arguments to the debug marker need to be contiguous in memory, so make 1769 // Don't generate simulator specific code if we are building a snapshot, which
1770 // sure we don't try to emit a literal pool. 1770 // might be run on real hardware.
1771 BlockConstPoolScope scope(this); 1771 if (!Serializer::enabled()) {
1772 #ifdef DEBUG
1773 Serializer::TooLateToEnableNow();
1774 #endif
1775 // The arguments to the debug marker need to be contiguous in memory, so
1776 // make sure we don't try to emit a literal pool.
1777 BlockConstPoolScope scope(this);
1772 1778
1773 Label start; 1779 Label start;
1774 bind(&start); 1780 bind(&start);
1775 1781
1776 // Refer to instructions-a64.h for a description of the marker and its 1782 // Refer to instructions-a64.h for a description of the marker and its
1777 // arguments. 1783 // arguments.
1778 hlt(kImmExceptionIsDebug); 1784 hlt(kImmExceptionIsDebug);
1779 ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugCodeOffset); 1785 ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugCodeOffset);
1780 dc32(code); 1786 dc32(code);
1781 ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugParamsOffset); 1787 ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugParamsOffset);
1782 dc32(params); 1788 dc32(params);
1783 ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugMessageOffset); 1789 ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugMessageOffset);
1784 EmitStringData(message); 1790 EmitStringData(message);
1785 hlt(kImmExceptionIsUnreachable); 1791 hlt(kImmExceptionIsUnreachable);
1786 #else 1792
1793 return;
1794 }
1795 // Fall through if Serializer is enabled.
1796 #endif
1797
1787 if (params & BREAK) { 1798 if (params & BREAK) {
1788 hlt(kImmExceptionIsDebug); 1799 hlt(kImmExceptionIsDebug);
1789 } 1800 }
1790 #endif
1791 } 1801 }
1792 1802
1793 1803
1794 void Assembler::Logical(const Register& rd, 1804 void Assembler::Logical(const Register& rd,
1795 const Register& rn, 1805 const Register& rn,
1796 const Operand& operand, 1806 const Operand& operand,
1797 LogicalOp op) { 1807 LogicalOp op) {
1798 ASSERT(rd.SizeInBits() == rn.SizeInBits()); 1808 ASSERT(rd.SizeInBits() == rn.SizeInBits());
1799 ASSERT(!operand.NeedsRelocation()); 1809 ASSERT(!operand.NeedsRelocation());
1800 if (operand.IsImmediate()) { 1810 if (operand.IsImmediate()) {
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 // code. 2495 // code.
2486 #ifdef ENABLE_DEBUGGER_SUPPORT 2496 #ifdef ENABLE_DEBUGGER_SUPPORT
2487 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); 2497 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size));
2488 #endif 2498 #endif
2489 } 2499 }
2490 2500
2491 2501
2492 } } // namespace v8::internal 2502 } } // namespace v8::internal
2493 2503
2494 #endif // V8_TARGET_ARCH_A64 2504 #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