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

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

Issue 624473003: - Update the header word atomically on ia32. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 | runtime/vm/stub_code_ia32.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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 2194 matching lines...) Expand 10 before | Expand all | Expand 10 after
2205 bool can_value_be_smi) { 2205 bool can_value_be_smi) {
2206 ASSERT(object != value); 2206 ASSERT(object != value);
2207 movl(dest, value); 2207 movl(dest, value);
2208 Label done; 2208 Label done;
2209 if (can_value_be_smi) { 2209 if (can_value_be_smi) {
2210 StoreIntoObjectFilter(object, value, &done); 2210 StoreIntoObjectFilter(object, value, &done);
2211 } else { 2211 } else {
2212 StoreIntoObjectFilterNoSmi(object, value, &done); 2212 StoreIntoObjectFilterNoSmi(object, value, &done);
2213 } 2213 }
2214 // A store buffer update is required. 2214 // A store buffer update is required.
2215 if (value != EAX) pushl(EAX); // Preserve EAX. 2215 if (value != EDX) {
2216 if (object != EAX) { 2216 pushl(EDX); // Preserve EDX.
2217 movl(EAX, object); 2217 }
2218 if (object != EDX) {
2219 movl(EDX, object);
2218 } 2220 }
2219 StubCode* stub_code = Isolate::Current()->stub_code(); 2221 StubCode* stub_code = Isolate::Current()->stub_code();
2220 call(&stub_code->UpdateStoreBufferLabel()); 2222 call(&stub_code->UpdateStoreBufferLabel());
2221 if (value != EAX) popl(EAX); // Restore EAX. 2223 if (value != EDX) {
2224 popl(EDX); // Restore EDX.
2225 }
2222 Bind(&done); 2226 Bind(&done);
2223 } 2227 }
2224 2228
2225 2229
2226 void Assembler::StoreIntoObjectNoBarrier(Register object, 2230 void Assembler::StoreIntoObjectNoBarrier(Register object,
2227 const Address& dest, 2231 const Address& dest,
2228 Register value) { 2232 Register value) {
2229 movl(dest, value); 2233 movl(dest, value);
2230 #if defined(DEBUG) 2234 #if defined(DEBUG)
2231 Label done; 2235 Label done;
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2874 2878
2875 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2879 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2876 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 2880 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
2877 return xmm_reg_names[reg]; 2881 return xmm_reg_names[reg];
2878 } 2882 }
2879 2883
2880 2884
2881 } // namespace dart 2885 } // namespace dart
2882 2886
2883 #endif // defined TARGET_ARCH_IA32 2887 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698