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

Unified Diff: runtime/vm/simulator_arm64.cc

Issue 254673007: More stubs and instructions for arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_arm64.cc
===================================================================
--- runtime/vm/simulator_arm64.cc (revision 35551)
+++ runtime/vm/simulator_arm64.cc (working copy)
@@ -896,7 +896,11 @@
set_register(rd, alu_out, instr->RdMode());
if (instr->HasS()) {
SetNZFlagsX(alu_out);
- SetCFlag(CarryFromX(rn_val, imm));
+ if (addition) {
+ SetCFlag(CarryFromX(rn_val, imm));
+ } else {
+ SetCFlag(!BorrowFromX(rn_val, imm));
+ }
SetVFlag(OverflowFromX(alu_out, rn_val, imm, addition));
}
} else {
@@ -906,7 +910,11 @@
set_wregister(rd, alu_out, instr->RdMode());
if (instr->HasS()) {
SetNZFlagsW(alu_out);
- SetCFlag(CarryFromW(rn_val, imm));
+ if (addition) {
+ SetCFlag(CarryFromW(rn_val, imm));
+ } else {
+ SetCFlag(!BorrowFromW(rn_val, imm));
+ }
SetVFlag(OverflowFromW(alu_out, rn_val, imm, addition));
}
}
@@ -1602,7 +1610,11 @@
set_register(rd, alu_out, instr->RdMode());
if (instr->HasS()) {
SetNZFlagsX(alu_out);
- SetCFlag(CarryFromX(rn_val, rm_val));
+ if (subtract) {
+ SetCFlag(!BorrowFromX(rn_val, rm_val));
+ } else {
+ SetCFlag(CarryFromX(rn_val, rm_val));
+ }
SetVFlag(OverflowFromX(alu_out, rn_val, rm_val, !subtract));
}
} else {
@@ -1618,7 +1630,11 @@
set_wregister(rd, alu_out, instr->RdMode());
if (instr->HasS()) {
SetNZFlagsW(alu_out);
- SetCFlag(CarryFromW(rn_val, rm_val32));
+ if (subtract) {
+ SetCFlag(!BorrowFromW(rn_val, rm_val32));
+ } else {
+ SetCFlag(CarryFromW(rn_val, rm_val32));
+ }
SetVFlag(OverflowFromW(alu_out, rn_val, rm_val32, !subtract));
}
}
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698