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

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

Issue 616873003: Use UnboxedInt32 and UnboxedUint32 representation for LoadIndexedInstr (Closed) Base URL: https://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
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 <setjmp.h> 5 #include <setjmp.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 #if defined(TARGET_ARCH_ARM64) 9 #if defined(TARGET_ARCH_ARM64)
10 10
(...skipping 2649 matching lines...) Expand 10 before | Expand all | Expand 10 after
2660 } 2660 }
2661 } 2661 }
2662 2662
2663 2663
2664 void Simulator::DecodeFPIntCvt(Instr* instr) { 2664 void Simulator::DecodeFPIntCvt(Instr* instr) {
2665 const VRegister vd = instr->VdField(); 2665 const VRegister vd = instr->VdField();
2666 const VRegister vn = instr->VnField(); 2666 const VRegister vn = instr->VnField();
2667 const Register rd = instr->RdField(); 2667 const Register rd = instr->RdField();
2668 const Register rn = instr->RnField(); 2668 const Register rn = instr->RnField();
2669 2669
2670 if ((instr->SFField() != 1) || (instr->Bit(29) != 0) || 2670 if ((instr->Bit(29) != 0) || (instr->Bits(22, 2) != 1)) {
2671 (instr->Bits(22, 2) != 1)) {
2672 UnimplementedInstruction(instr); 2671 UnimplementedInstruction(instr);
2673 return; 2672 return;
2674 } 2673 }
2674 if (instr->SFField() == 0) {
2675 // 32-bit.
2676 if (instr->Bits(16, 5) == 2) {
2677 // Format(instr, "scvtfd 'vd, 'vn");
2678 const int32_t rn_val = get_wregister(rn, instr->RnMode());
2679 const double vn_dbl = static_cast<double>(rn_val);
2680 set_vregisterd(vd, 0, bit_cast<int64_t, double>(vn_dbl));
2681 set_vregisterd(vd, 1, 0);
2682 } else {
2683 UnimplementedInstruction(instr);
2684 }
2685 return;
2686 }
2675 if (instr->Bits(16, 5) == 2) { 2687 if (instr->Bits(16, 5) == 2) {
2676 // Format(instr, "scvtfd 'vd, 'vn"); 2688 // Format(instr, "scvtfd 'vd, 'vn");
zra 2014/10/09 18:00:30 Fix comment to match change in disassembler.
Cutch 2014/10/09 18:49:11 Done.
2677 const int64_t rn_val = get_register(rn, instr->RnMode()); 2689 const int64_t rn_val = get_register(rn, instr->RnMode());
2678 const double vn_dbl = static_cast<double>(rn_val); 2690 const double vn_dbl = static_cast<double>(rn_val);
zra 2014/10/09 18:00:30 Instead of the if (instr->SFField() == 0) above:
Cutch 2014/10/09 18:49:11 Done.
2679 set_vregisterd(vd, 0, bit_cast<int64_t, double>(vn_dbl)); 2691 set_vregisterd(vd, 0, bit_cast<int64_t, double>(vn_dbl));
2680 set_vregisterd(vd, 1, 0); 2692 set_vregisterd(vd, 1, 0);
2681 } else if (instr->Bits(16, 5) == 6) { 2693 } else if (instr->Bits(16, 5) == 6) {
2682 // Format(instr, "fmovrd 'rd, 'vn"); 2694 // Format(instr, "fmovrd 'rd, 'vn");
2683 const int64_t vn_val = get_vregisterd(vn, 0); 2695 const int64_t vn_val = get_vregisterd(vn, 0);
2684 set_register(instr, rd, vn_val, R31IsZR); 2696 set_register(instr, rd, vn_val, R31IsZR);
2685 } else if (instr->Bits(16, 5) == 7) { 2697 } else if (instr->Bits(16, 5) == 7) {
2686 // Format(instr, "fmovdr 'vd, 'rn"); 2698 // Format(instr, "fmovdr 'vd, 'rn");
2687 const int64_t rn_val = get_register(rn, R31IsZR); 2699 const int64_t rn_val = get_register(rn, R31IsZR);
2688 set_vregisterd(vd, 0, rn_val); 2700 set_vregisterd(vd, 0, rn_val);
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
3057 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception)); 3069 set_register(NULL, kExceptionObjectReg, bit_cast<int64_t>(raw_exception));
3058 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace)); 3070 set_register(NULL, kStackTraceObjectReg, bit_cast<int64_t>(raw_stacktrace));
3059 buf->Longjmp(); 3071 buf->Longjmp();
3060 } 3072 }
3061 3073
3062 } // namespace dart 3074 } // namespace dart
3063 3075
3064 #endif // !defined(HOST_ARCH_ARM64) 3076 #endif // !defined(HOST_ARCH_ARM64)
3065 3077
3066 #endif // defined TARGET_ARCH_ARM64 3078 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« runtime/vm/disassembler_arm64.cc ('K') | « runtime/vm/intermediate_language_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698