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

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

Issue 12871015: SIMD plumbing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix FPU register move instruction on x64 Created 7 years, 9 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 (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/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry 338 // The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry
339 // and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls. 339 // and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls.
340 const intptr_t saved_eax_offset_from_ebp = -(kNumberOfCpuRegisters - EAX); 340 const intptr_t saved_eax_offset_from_ebp = -(kNumberOfCpuRegisters - EAX);
341 // Result in EAX is preserved as part of pushing all registers below. 341 // Result in EAX is preserved as part of pushing all registers below.
342 342
343 // Push registers in their enumeration order: lowest register number at 343 // Push registers in their enumeration order: lowest register number at
344 // lowest address. 344 // lowest address.
345 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; i--) { 345 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; i--) {
346 __ pushl(static_cast<Register>(i)); 346 __ pushl(static_cast<Register>(i));
347 } 347 }
348 __ subl(ESP, Immediate(kNumberOfXmmRegisters * kDoubleSize)); 348 __ subl(ESP, Immediate(kNumberOfXmmRegisters * kFpuRegisterSize));
349 intptr_t offset = 0; 349 intptr_t offset = 0;
350 for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) { 350 for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) {
351 XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx); 351 XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx);
352 __ movsd(Address(ESP, offset), xmm_reg); 352 __ movups(Address(ESP, offset), xmm_reg);
353 offset += kDoubleSize; 353 offset += kFpuRegisterSize;
354 } 354 }
355 355
356 __ movl(ECX, ESP); // Saved saved registers block. 356 __ movl(ECX, ESP); // Saved saved registers block.
357 __ ReserveAlignedFrameSpace(1 * kWordSize); 357 __ ReserveAlignedFrameSpace(1 * kWordSize);
358 __ SmiUntag(EAX); 358 __ SmiUntag(EAX);
359 __ movl(Address(ESP, 0), ECX); // Start of register block. 359 __ movl(Address(ESP, 0), ECX); // Start of register block.
360 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); 360 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry);
361 // Result (EAX) is stack-size (FP - SP) in bytes, incl. the return address. 361 // Result (EAX) is stack-size (FP - SP) in bytes, incl. the return address.
362 362
363 if (preserve_eax) { 363 if (preserve_eax) {
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 __ Bind(&done); 2120 __ Bind(&done);
2121 __ popl(temp); 2121 __ popl(temp);
2122 __ popl(right); 2122 __ popl(right);
2123 __ popl(left); 2123 __ popl(left);
2124 __ ret(); 2124 __ ret();
2125 } 2125 }
2126 2126
2127 } // namespace dart 2127 } // namespace dart
2128 2128
2129 #endif // defined TARGET_ARCH_IA32 2129 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698