Revision: 19243
Author: [email protected]
Date: Mon Feb 10 21:33:23 2014 UTC
Log: A64: Avoid generating simulator specific instructions if we are
building a snapshot.
[email protected], [email protected]
Review URL: https://codereview.chromium.org/148513009
http://code.google.com/p/v8/source/detail?r=19243
Modified:
/branches/experimental/a64/src/a64/assembler-a64.cc
=======================================
--- /branches/experimental/a64/src/a64/assembler-a64.cc Thu Feb 6 13:19:27
2014 UTC
+++ /branches/experimental/a64/src/a64/assembler-a64.cc Mon Feb 10 21:33:23
2014 UTC
@@ -1766,28 +1766,38 @@
void Assembler::debug(const char* message, uint32_t code, Instr params) {
#ifdef USE_SIMULATOR
- // The arguments to the debug marker need to be contiguous in memory, so
make
- // sure we don't try to emit a literal pool.
- BlockConstPoolScope scope(this);
+ // Don't generate simulator specific code if we are building a snapshot,
which
+ // might be run on real hardware.
+ if (!Serializer::enabled()) {
+#ifdef DEBUG
+ Serializer::TooLateToEnableNow();
+#endif
+ // The arguments to the debug marker need to be contiguous in memory,
so
+ // make sure we don't try to emit a literal pool.
+ BlockConstPoolScope scope(this);
- Label start;
- bind(&start);
+ Label start;
+ bind(&start);
- // Refer to instructions-a64.h for a description of the marker and its
- // arguments.
- hlt(kImmExceptionIsDebug);
- ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugCodeOffset);
- dc32(code);
- ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugParamsOffset);
- dc32(params);
- ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugMessageOffset);
- EmitStringData(message);
- hlt(kImmExceptionIsUnreachable);
-#else
+ // Refer to instructions-a64.h for a description of the marker and its
+ // arguments.
+ hlt(kImmExceptionIsDebug);
+ ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugCodeOffset);
+ dc32(code);
+ ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugParamsOffset);
+ dc32(params);
+ ASSERT(SizeOfCodeGeneratedSince(&start) == kDebugMessageOffset);
+ EmitStringData(message);
+ hlt(kImmExceptionIsUnreachable);
+
+ return;
+ }
+ // Fall through if Serializer is enabled.
+#endif
+
if (params & BREAK) {
hlt(kImmExceptionIsDebug);
}
-#endif
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.