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

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

Issue 595023: ARM optimize loading of immediates. (Closed)
Patch Set: Created 10 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 | « src/arm/assembler-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('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 cee5aea0d31b0fbe3385d8721b6ac0611b78641c..92048e30bf683d7e65af04b9d1d8f55a1d2e3da8 100644
--- a/src/arm/simulator-arm.cc
+++ b/src/arm/simulator-arm.cc
@@ -939,6 +939,7 @@ int32_t Simulator::GetShiftRm(Instr* instr, bool* carry_out) {
if (instr->Bit(4) == 0) {
// by immediate
if ((shift == ROR) && (shift_amount == 0)) {
+ // RRX.
UNIMPLEMENTED();
return result;
} else if (((shift == LSR) || (shift == ASR)) && (shift_amount == 0)) {
@@ -988,7 +989,11 @@ int32_t Simulator::GetShiftRm(Instr* instr, bool* carry_out) {
}
case ROR: {
- UNIMPLEMENTED();
+ uint32_t uresult = static_cast<uint32_t>(result);
+ uresult =
+ (uresult >> shift_amount) | (uresult << (32 - shift_amount));
+ *carry_out = (uresult >> 31) != 0;
+ result = static_cast<int32_t>(uresult);
break;
}
« no previous file with comments | « src/arm/assembler-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698