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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 // Compute callee's stack pointer before making changes and save it as 283 // Compute callee's stack pointer before making changes and save it as
284 // ip register so that it is restored as sp register on exit, thereby 284 // ip register so that it is restored as sp register on exit, thereby
285 // popping the args. 285 // popping the args.
286 286
287 // ip = sp + kPointerSize * #args; 287 // ip = sp + kPointerSize * #args;
288 add(ip, sp, Operand(r0, LSL, kPointerSizeLog2)); 288 add(ip, sp, Operand(r0, LSL, kPointerSizeLog2));
289 289
290 // Align the stack at this point. After this point we have 5 pushes, 290 // Align the stack at this point. After this point we have 5 pushes,
291 // so in fact we have to unalign here! See also the assert on the 291 // so in fact we have to unalign here! See also the assert on the
292 // alignment immediately below. 292 // alignment immediately below.
293 if (OS::ActivationFrameAlignment() != kPointerSize) { 293 #if !defined(V8_HOST_ARCH_ARM)
294 // If we are using the simulator then we should always align to the expected
295 // alignment. As the simulator is used to generate snapshots we do not know
296 // if the target platform will need alignment, so we will always align at
297 // this point here.
298 int activation_frame_alignment = 2 * kPointerSize;
299 #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 "!".
300 // Running on the real platform. Use the alignment as mandated by the local
301 // environment.
302 // Note: This will break if we ever start generating snapshots on one ARM
303 // platform for another ARM platform with a different alignment.
304 int activation_frame_alignment = OS::ActivationFrameAlignment();
305 #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.
306 if (activation_frame_alignment != kPointerSize) {
294 // This code needs to be made more general if this assert doesn't hold. 307 // This code needs to be made more general if this assert doesn't hold.
295 ASSERT(OS::ActivationFrameAlignment() == 2 * kPointerSize); 308 ASSERT(activation_frame_alignment == 2 * kPointerSize);
296 mov(r7, Operand(Smi::FromInt(0))); 309 mov(r7, Operand(Smi::FromInt(0)));
297 tst(sp, Operand(OS::ActivationFrameAlignment() - 1)); 310 tst(sp, Operand(activation_frame_alignment - 1));
298 push(r7, eq); // Conditional push instruction. 311 push(r7, eq); // Conditional push instruction.
299 } 312 }
300 313
301 // Push in reverse order: caller_fp, sp_on_exit, and caller_pc. 314 // Push in reverse order: caller_fp, sp_on_exit, and caller_pc.
302 stm(db_w, sp, fp.bit() | ip.bit() | lr.bit()); 315 stm(db_w, sp, fp.bit() | ip.bit() | lr.bit());
303 mov(fp, Operand(sp)); // setup new frame pointer 316 mov(fp, Operand(sp)); // setup new frame pointer
304 317
305 // Push debug marker. 318 // Push debug marker.
306 mov(ip, Operand(type == StackFrame::EXIT_DEBUG ? 1 : 0)); 319 mov(ip, Operand(type == StackFrame::EXIT_DEBUG ? 1 : 0));
307 push(ip); 320 push(ip);
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 #endif 1005 #endif
993 mov(r0, Operand(p0)); 1006 mov(r0, Operand(p0));
994 push(r0); 1007 push(r0);
995 mov(r0, Operand(Smi::FromInt(p1 - p0))); 1008 mov(r0, Operand(Smi::FromInt(p1 - p0)));
996 push(r0); 1009 push(r0);
997 CallRuntime(Runtime::kAbort, 2); 1010 CallRuntime(Runtime::kAbort, 2);
998 // will not return here 1011 // will not return here
999 } 1012 }
1000 1013
1001 } } // namespace v8::internal 1014 } } // namespace v8::internal
OLDNEW
« 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