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

Unified Diff: runtime/vm/instructions_arm.cc

Issue 1419223003: Re-assign registers on ARM so PP and CODE_REG are below R7 (FP on iOS). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/instructions_arm.cc
diff --git a/runtime/vm/instructions_arm.cc b/runtime/vm/instructions_arm.cc
index eec6cfe364b93941850e62d2e2decda91b765c6e..dc513344a31315a517824806e9f57e1249de376b 100644
--- a/runtime/vm/instructions_arm.cc
+++ b/runtime/vm/instructions_arm.cc
@@ -65,7 +65,7 @@ NativeCallPattern::NativeCallPattern(uword pc, const Code& code)
InstructionPattern::DecodeLoadWordFromPool(native_function_load_end,
&reg,
&native_function_pool_index_);
- ASSERT(reg == R5);
+ ASSERT(reg == R9);
}
@@ -180,7 +180,8 @@ uword InstructionPattern::DecodeLoadWordFromPool(uword end,
uword start = end - Instr::kInstrSize;
int32_t instr = Instr::At(start)->InstructionBits();
intptr_t offset = 0;
- if ((instr & 0xffff0000) == 0xe5990000) { // ldr reg, [pp, #+offset]
+ if ((instr & 0xffff0000) == (0xe5950000 | (PP << 16))) {
+ // ldr reg, [pp, #+offset]
offset = instr & 0xfff;
*reg = static_cast<Register>((instr & 0xf000) >> 12);
} else {
@@ -188,13 +189,15 @@ uword InstructionPattern::DecodeLoadWordFromPool(uword end,
offset = instr & 0xfff;
start -= Instr::kInstrSize;
instr = Instr::At(start)->InstructionBits();
- if ((instr & 0xffff0000) == 0xe2890000) { // add reg, pp, operand
+ if ((instr & 0xffff0000) == (0xe2850000 | (PP << 16))) {
+ // add reg, pp, operand
const intptr_t rot = (instr & 0xf00) >> 7;
const intptr_t imm8 = instr & 0xff;
offset += (imm8 >> rot) | (imm8 << (32 - rot));
*reg = static_cast<Register>((instr & 0xf000) >> 12);
} else {
- ASSERT((instr & 0xffff0000) == 0xe0890000); // add reg, pp, reg
+ ASSERT((instr & 0xffff0000) == (0xe0800000 | (PP << 16)));
+ // add reg, pp, reg
end = DecodeLoadWordImmediate(end, reg, &offset);
}
}
@@ -210,7 +213,7 @@ RawICData* CallPattern::IcData() {
object_pool_,
&reg,
&ic_data_);
- ASSERT(reg == R5);
+ ASSERT(reg == R9);
}
return ic_data_.raw();
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698