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

Unified Diff: src/arm/macro-assembler-arm.cc

Issue 155109: - Update comments and fix a small glitch in the ARM disassembler.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/arm/macro-assembler-arm.cc
===================================================================
--- src/arm/macro-assembler-arm.cc (revision 2364)
+++ src/arm/macro-assembler-arm.cc (working copy)
@@ -290,11 +290,24 @@
// Align the stack at this point. After this point we have 5 pushes,
// so in fact we have to unalign here! See also the assert on the
// alignment immediately below.
- if (OS::ActivationFrameAlignment() != kPointerSize) {
+#if !defined(V8_HOST_ARCH_ARM)
+ // If we are using the simulator then we should always align to the expected
+ // alignment. As the simulator is used to generate snapshots we do not know
+ // if the target platform will need alignment, so we will always align at
+ // this point here.
+ int activation_frame_alignment = 2 * kPointerSize;
+#elif // !defined(V8_HOST_ARCH_ARM)
Erik Corry 2009/07/07 08:14:16 I find the comment clearer without the ! here.
iposva 2009/07/08 21:33:26 Done by avoiding the need for "!".
+ // Running on the real platform. Use the alignment as mandated by the local
+ // environment.
+ // Note: This will break if we ever start generating snapshots on one ARM
+ // platform for another ARM platform with a different alignment.
+ int activation_frame_alignment = OS::ActivationFrameAlignment();
+#endif // !defined(V8_HOST_ARCH_ARM)
Erik Corry 2009/07/07 08:14:16 And without the ! here.
iposva 2009/07/08 21:33:26 Done.
+ if (activation_frame_alignment != kPointerSize) {
// This code needs to be made more general if this assert doesn't hold.
- ASSERT(OS::ActivationFrameAlignment() == 2 * kPointerSize);
+ ASSERT(activation_frame_alignment == 2 * kPointerSize);
mov(r7, Operand(Smi::FromInt(0)));
- tst(sp, Operand(OS::ActivationFrameAlignment() - 1));
+ tst(sp, Operand(activation_frame_alignment - 1));
push(r7, eq); // Conditional push instruction.
}
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | src/arm/simulator-arm.cc » ('j') | src/arm/simulator-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698