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

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: 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);
1792
1793 return;
Rodolph Perfetta (ARM) 2014/02/10 15:18:19 not necessary.
rmcilroy 2014/02/10 16:18:33 Actually, what I meant to do was fall through to t
1794 }
1786 #else 1795 #else
1787 if (params & BREAK) { 1796 if (params & BREAK) {
1788 hlt(kImmExceptionIsDebug); 1797 hlt(kImmExceptionIsDebug);
1789 } 1798 }
1790 #endif 1799 #endif
1791 } 1800 }
1792 1801
1793 1802
1794 void Assembler::Logical(const Register& rd, 1803 void Assembler::Logical(const Register& rd,
1795 const Register& rn, 1804 const Register& rn,
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
2485 // code. 2494 // code.
2486 #ifdef ENABLE_DEBUGGER_SUPPORT 2495 #ifdef ENABLE_DEBUGGER_SUPPORT
2487 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size)); 2496 RecordRelocInfo(RelocInfo::CONST_POOL, static_cast<intptr_t>(size));
2488 #endif 2497 #endif
2489 } 2498 }
2490 2499
2491 2500
2492 } } // namespace v8::internal 2501 } } // namespace v8::internal
2493 2502
2494 #endif // V8_TARGET_ARCH_A64 2503 #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