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

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

Issue 12871015: SIMD plumbing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: s/materialize/Materialize 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
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | 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_X64) 6 #if defined(TARGET_ARCH_X64)
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry 332 // The code in this frame may not cause GC. kDeoptimizeCopyFrameRuntimeEntry
333 // and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls. 333 // and kDeoptimizeFillFrameRuntimeEntry are leaf runtime calls.
334 const intptr_t saved_rax_offset_from_ebp = -(kNumberOfCpuRegisters - RAX); 334 const intptr_t saved_rax_offset_from_ebp = -(kNumberOfCpuRegisters - RAX);
335 // Result in EAX is preserved as part of pushing all registers below. 335 // Result in EAX is preserved as part of pushing all registers below.
336 336
337 // Push registers in their enumeration order: lowest register number at 337 // Push registers in their enumeration order: lowest register number at
338 // lowest address. 338 // lowest address.
339 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; i--) { 339 for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; i--) {
340 __ pushq(static_cast<Register>(i)); 340 __ pushq(static_cast<Register>(i));
341 } 341 }
342 __ subq(RSP, Immediate(kNumberOfXmmRegisters * kDoubleSize)); 342 __ subq(RSP, Immediate(kNumberOfXmmRegisters * kFpuRegisterSize));
343 intptr_t offset = 0; 343 intptr_t offset = 0;
344 for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) { 344 for (intptr_t reg_idx = 0; reg_idx < kNumberOfXmmRegisters; ++reg_idx) {
345 XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx); 345 XmmRegister xmm_reg = static_cast<XmmRegister>(reg_idx);
346 __ movsd(Address(RSP, offset), xmm_reg); 346 __ movups(Address(RSP, offset), xmm_reg);
347 offset += kDoubleSize; 347 offset += kFpuRegisterSize;
348 } 348 }
349 349
350 __ movq(RCX, RSP); // Saved saved registers block. 350 __ movq(RCX, RSP); // Saved saved registers block.
351 __ ReserveAlignedFrameSpace(0); 351 __ ReserveAlignedFrameSpace(0);
352 __ SmiUntag(RAX); 352 __ SmiUntag(RAX);
353 __ movq(RDI, RCX); // Set up argument 1 saved_registers_address. 353 __ movq(RDI, RCX); // Set up argument 1 saved_registers_address.
354 354
355 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry); 355 __ CallRuntime(kDeoptimizeCopyFrameRuntimeEntry);
356 // Result (RAX) is stack-size (FP - SP) in bytes, incl. the return address. 356 // Result (RAX) is stack-size (FP - SP) in bytes, incl. the return address.
357 357
(...skipping 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 __ cmpq(left, right); 2074 __ cmpq(left, right);
2075 __ Bind(&done); 2075 __ Bind(&done);
2076 __ popq(right); 2076 __ popq(right);
2077 __ popq(left); 2077 __ popq(left);
2078 __ ret(); 2078 __ ret();
2079 } 2079 }
2080 2080
2081 } // namespace dart 2081 } // namespace dart
2082 2082
2083 #endif // defined TARGET_ARCH_X64 2083 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698