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

Unified Diff: src/arm/simulator-arm.cc

Issue 2223433002: [arm] Simplify run-time CPU selection. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cl format Created 4 years, 4 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 | « src/arm/disasm-arm.cc ('k') | src/base/build_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/simulator-arm.cc
diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc
index cfcc5b16c566b91430d5b6a137c8fe0cca038caf..11a49997e892e98be211e094cded9c4d7b7dd358 100644
--- a/src/arm/simulator-arm.cc
+++ b/src/arm/simulator-arm.cc
@@ -2886,26 +2886,24 @@ void Simulator::DecodeType3(Instruction* instr) {
return;
}
}
- if (FLAG_enable_sudiv) {
- if (instr->Bits(5, 4) == 0x1) {
- if ((instr->Bit(22) == 0x0) && (instr->Bit(20) == 0x1)) {
- // (s/u)div (in V8 notation matching ARM ISA format) rn = rm/rs
- // Format(instr, "'(s/u)div'cond'b 'rn, 'rm, 'rs);
- int rm = instr->RmValue();
- int32_t rm_val = get_register(rm);
- int rs = instr->RsValue();
- int32_t rs_val = get_register(rs);
- int32_t ret_val = 0;
- // udiv
- if (instr->Bit(21) == 0x1) {
- ret_val = bit_cast<int32_t>(base::bits::UnsignedDiv32(
- bit_cast<uint32_t>(rm_val), bit_cast<uint32_t>(rs_val)));
- } else {
- ret_val = base::bits::SignedDiv32(rm_val, rs_val);
- }
- set_register(rn, ret_val);
- return;
+ if (instr->Bits(5, 4) == 0x1) {
+ if ((instr->Bit(22) == 0x0) && (instr->Bit(20) == 0x1)) {
+ // (s/u)div (in V8 notation matching ARM ISA format) rn = rm/rs
+ // Format(instr, "'(s/u)div'cond'b 'rn, 'rm, 'rs);
+ int rm = instr->RmValue();
+ int32_t rm_val = get_register(rm);
+ int rs = instr->RsValue();
+ int32_t rs_val = get_register(rs);
+ int32_t ret_val = 0;
+ // udiv
+ if (instr->Bit(21) == 0x1) {
+ ret_val = bit_cast<int32_t>(base::bits::UnsignedDiv32(
+ bit_cast<uint32_t>(rm_val), bit_cast<uint32_t>(rs_val)));
+ } else {
+ ret_val = base::bits::SignedDiv32(rm_val, rs_val);
}
+ set_register(rn, ret_val);
+ return;
}
}
// Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w");
« no previous file with comments | « src/arm/disasm-arm.cc ('k') | src/base/build_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698