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

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

Issue 261783005: Begins work on arm64 floating point instructions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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_arm64.h ('k') | runtime/vm/assembler_arm64_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 if (initialized) { 559 if (initialized) {
560 movk(reg, h3, 3); 560 movk(reg, h3, 3);
561 } else { 561 } else {
562 movz(reg, h3, 3); 562 movz(reg, h3, 3);
563 } 563 }
564 } 564 }
565 } 565 }
566 } 566 }
567 567
568 568
569 void Assembler::LoadDImmediate(VRegister vd, double immd, Register pp) {
570 if (!fmovdi(vd, immd)) {
571 int64_t imm = bit_cast<int64_t, double>(immd);
572 LoadImmediate(TMP, imm, pp);
573 fmovdr(vd, TMP);
574 }
575 }
576
577
569 void Assembler::AddImmediate( 578 void Assembler::AddImmediate(
570 Register dest, Register rn, int64_t imm, Register pp) { 579 Register dest, Register rn, int64_t imm, Register pp) {
571 ASSERT(rn != TMP2); 580 ASSERT(rn != TMP2);
572 Operand op; 581 Operand op;
573 if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) { 582 if (Operand::CanHold(imm, kXRegSizeInBits, &op) == Operand::Immediate) {
574 add(dest, rn, op); 583 add(dest, rn, op);
575 } else if (Operand::CanHold(-imm, kXRegSizeInBits, &op) == 584 } else if (Operand::CanHold(-imm, kXRegSizeInBits, &op) ==
576 Operand::Immediate) { 585 Operand::Immediate) {
577 sub(dest, rn, op); 586 sub(dest, rn, op);
578 } else { 587 } else {
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 str(TMP, Address(temp_reg, count_field_offset)); 1013 str(TMP, Address(temp_reg, count_field_offset));
1005 ldr(TMP, Address(temp_reg, size_field_offset)); 1014 ldr(TMP, Address(temp_reg, size_field_offset));
1006 add(TMP, TMP, Operand(size_reg)); 1015 add(TMP, TMP, Operand(size_reg));
1007 str(TMP, Address(temp_reg, size_field_offset)); 1016 str(TMP, Address(temp_reg, size_field_offset));
1008 } 1017 }
1009 } 1018 }
1010 1019
1011 } // namespace dart 1020 } // namespace dart
1012 1021
1013 #endif // defined TARGET_ARCH_ARM64 1022 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_arm64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698