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

Unified 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/disassembler_arm64.cc ('K') | « runtime/vm/intrinsifier_arm64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm64.cc
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index 862e7351f61d41c5a1639ce23ddab3d0da46dbde..7ac2cf4f9b7db6f973ae449c09094569c1950a37 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -2749,28 +2749,35 @@ void Simulator::DecodeFPIntCvt(Instr* instr) {
const Register rd = instr->RdField();
const Register rn = instr->RnField();
- if ((instr->SFField() != 1) || (instr->Bit(29) != 0) ||
- (instr->Bits(22, 2) != 1)) {
+ if ((instr->Bit(29) != 0) || (instr->Bits(22, 2) != 1)) {
UnimplementedInstruction(instr);
return;
}
if (instr->Bits(16, 5) == 2) {
- // Format(instr, "scvtfd 'vd, 'vn");
- const int64_t rn_val = get_register(rn, instr->RnMode());
- const double vn_dbl = static_cast<double>(rn_val);
+ // Format(instr, "scvtfd'sf 'vd, 'vn");
+ const int64_t rn_val64 = get_register(rn, instr->RnMode());
+ const int32_t rn_val32 = get_wregister(rn, instr->RnMode());
+ const double vn_dbl = (instr->SFField() == 1) ?
+ static_cast<double>(rn_val64) : static_cast<double>(rn_val32);
set_vregisterd(vd, 0, bit_cast<int64_t, double>(vn_dbl));
set_vregisterd(vd, 1, 0);
- } else if (instr->Bits(16, 5) == 6) {
- // Format(instr, "fmovrd 'rd, 'vn");
+ return;
+ }
+ if (instr->SFField() == 0) {
zra 2014/10/09 19:21:51 I'd merge this check with the condition at the top
Cutch 2014/10/09 20:48:22 Done.
+ UnimplementedInstruction(instr);
+ return;
+ }
+ if (instr->Bits(16, 5) == 6) {
+ // Format(instr, "fmovrd'sf 'rd, 'vn");
const int64_t vn_val = get_vregisterd(vn, 0);
set_register(instr, rd, vn_val, R31IsZR);
} else if (instr->Bits(16, 5) == 7) {
- // Format(instr, "fmovdr 'vd, 'rn");
+ // Format(instr, "fmovdr'sf 'vd, 'rn");
const int64_t rn_val = get_register(rn, R31IsZR);
set_vregisterd(vd, 0, rn_val);
set_vregisterd(vd, 1, 0);
} else if (instr->Bits(16, 5) == 24) {
- // Format(instr, "fcvtzds 'rd, 'vn");
+ // Format(instr, "fcvtzds'sf 'rd, 'vn");
const double vn_val = bit_cast<double, int64_t>(get_vregisterd(vn, 0));
set_register(instr, rd, static_cast<int64_t>(vn_val), instr->RdMode());
} else {
« runtime/vm/disassembler_arm64.cc ('K') | « runtime/vm/intrinsifier_arm64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698