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

Unified Diff: runtime/vm/simulator_mips.cc

Issue 1722013002: Enable concurrent sweep on MIPS and ARM64. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: clrex and assembler tests Created 4 years, 10 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/simulator_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_mips.cc
diff --git a/runtime/vm/simulator_mips.cc b/runtime/vm/simulator_mips.cc
index 6e89dc3241b3cdabac80516d52fc2d6ecf3c4411..074fc8c7eb08767fc0c15e7e28f2cb713887b23d 100644
--- a/runtime/vm/simulator_mips.cc
+++ b/runtime/vm/simulator_mips.cc
@@ -1173,9 +1173,9 @@ intptr_t Simulator::WriteExclusiveW(uword addr, intptr_t value, Instr* instr) {
bool write_allowed = HasExclusiveAccessAndOpen(addr);
if (write_allowed) {
WriteW(addr, value, instr);
- return 0; // Success.
+ return 1; // Success.
}
- return 1; // Failure.
+ return 0; // Failure.
}
@@ -2169,6 +2169,19 @@ void Simulator::InstructionDecode(Instr* instr) {
set_register(instr->RtField(), instr->UImmField() << 16);
break;
}
+ case LL: {
+ // Format(instr, "ll 'rt, 'imms('rs)");
+ int32_t base_val = get_register(instr->RsField());
+ int32_t imm_val = instr->SImmField();
+ uword addr = base_val + imm_val;
+ if (Simulator::IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ int32_t res = ReadExclusiveW(addr, instr);
+ set_register(instr->RtField(), res);
+ }
+ break;
+ }
case LW: {
// Format(instr, "lw 'rt, 'imms('rs)");
int32_t base_val = get_register(instr->RsField());
@@ -2214,6 +2227,20 @@ void Simulator::InstructionDecode(Instr* instr) {
}
break;
}
+ case SC: {
+ // Format(instr, "sc 'rt, 'imms('rs)");
+ int32_t rt_val = get_register(instr->RtField());
+ int32_t base_val = get_register(instr->RsField());
+ int32_t imm_val = instr->SImmField();
+ uword addr = base_val + imm_val;
+ if (Simulator::IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ intptr_t status = WriteExclusiveW(addr, rt_val, instr);
+ set_register(instr->RtField(), status);
+ }
+ break;
+ }
case SLTI: {
// Format(instr, "slti 'rt, 'rs, 'imms");
int32_t rs_val = get_register(instr->RsField());
« no previous file with comments | « runtime/vm/simulator_arm64.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698