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

Side by Side Diff: runtime/vm/assembler_ia32.cc

Issue 23745008: Follow-up fix to my change to IsPowerOfTwo: Alignment of one means no alignment, not zero. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 2113 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 void Assembler::LeaveFrame() { 2124 void Assembler::LeaveFrame() {
2125 movl(ESP, EBP); 2125 movl(ESP, EBP);
2126 popl(EBP); 2126 popl(EBP);
2127 } 2127 }
2128 2128
2129 2129
2130 void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) { 2130 void Assembler::ReserveAlignedFrameSpace(intptr_t frame_space) {
2131 // Reserve space for arguments and align frame before entering 2131 // Reserve space for arguments and align frame before entering
2132 // the C++ world. 2132 // the C++ world.
2133 AddImmediate(ESP, Immediate(-frame_space)); 2133 AddImmediate(ESP, Immediate(-frame_space));
2134 if (OS::ActivationFrameAlignment() > 0) { 2134 if (OS::ActivationFrameAlignment() > 1) {
2135 andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1))); 2135 andl(ESP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
2136 } 2136 }
2137 } 2137 }
2138 2138
2139 2139
2140 static const intptr_t kNumberOfVolatileCpuRegisters = 3; 2140 static const intptr_t kNumberOfVolatileCpuRegisters = 3;
2141 static const Register volatile_cpu_registers[kNumberOfVolatileCpuRegisters] = { 2141 static const Register volatile_cpu_registers[kNumberOfVolatileCpuRegisters] = {
2142 EAX, ECX, EDX 2142 EAX, ECX, EDX
2143 }; 2143 };
2144 2144
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2488 2488
2489 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2489 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2490 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 2490 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
2491 return xmm_reg_names[reg]; 2491 return xmm_reg_names[reg];
2492 } 2492 }
2493 2493
2494 2494
2495 } // namespace dart 2495 } // namespace dart
2496 2496
2497 #endif // defined TARGET_ARCH_IA32 2497 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698