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

Unified Diff: runtime/vm/simulator_arm.cc

Issue 12381034: Second codegen test passing on ARM (simulated). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
Index: runtime/vm/simulator_arm.cc
===================================================================
--- runtime/vm/simulator_arm.cc (revision 19272)
+++ runtime/vm/simulator_arm.cc (working copy)
@@ -135,14 +135,14 @@
}
-static Register LookupCoreRegisterByName(const char* name) {
+static Register LookupCpuRegisterByName(const char* name) {
static const char* kNames[] = {
"r0", "r1", "r2", "r3",
"r4", "r5", "r6", "r7",
"r8", "r9", "r10", "r11",
"r12", "r13", "r14", "r15",
"pc", "lr", "sp", "ip",
- "fp", "sl"
+ "fp", "pp", "ctx"
};
static const Register kRegisters[] = {
R0, R1, R2, R3,
@@ -150,7 +150,7 @@
R8, R9, R10, R11,
R12, R13, R14, R15,
PC, LR, SP, IP,
- FP, R10
+ FP, R10, R9
};
ASSERT(ARRAY_SIZE(kNames) == ARRAY_SIZE(kRegisters));
for (unsigned i = 0; i < ARRAY_SIZE(kNames); i++) {
@@ -183,7 +183,7 @@
bool SimulatorDebugger::GetValue(char* desc, uint32_t* value) {
- Register reg = LookupCoreRegisterByName(desc);
+ Register reg = LookupCpuRegisterByName(desc);
if (reg != kNoRegister) {
if (reg == PC) {
*value = sim_->get_pc();
@@ -671,11 +671,11 @@
return reinterpret_cast<uword>(&svc_instruction_);
}
- void* external_function() const { return external_function_; }
+ uword external_function() const { return external_function_; }
uint32_t argument_count() const { return argument_count_; }
- static Redirection* Get(void* external_function, uint32_t argument_count) {
+ static Redirection* Get(uword external_function, uint32_t argument_count) {
Redirection* current;
for (current = list_; current != NULL; current = current->next_) {
if (current->external_function_ == external_function) return current;
@@ -693,7 +693,7 @@
private:
static const int32_t kRedirectSvcInstruction =
((AL << kConditionShift) | (0xf << 24) | kRedirectionSvcCode);
- Redirection(void* external_function, uint32_t argument_count)
+ Redirection(uword external_function, uint32_t argument_count)
: external_function_(external_function),
argument_count_(argument_count),
svc_instruction_(kRedirectSvcInstruction),
@@ -701,7 +701,7 @@
list_ = this;
}
- void* external_function_;
+ uword external_function_;
const uint32_t argument_count_;
uint32_t svc_instruction_;
Redirection* next_;
@@ -712,7 +712,7 @@
Redirection* Redirection::list_ = NULL;
-uword Simulator::RedirectExternalReference(void* function,
+uword Simulator::RedirectExternalReference(uword function,
uint32_t argument_count) {
Redirection* redirection = Redirection::Get(function, argument_count);
return redirection->address_of_svc_instruction();
@@ -1316,8 +1316,7 @@
int32_t saved_lr = get_register(LR);
Redirection* redirection = Redirection::FromSvcInstruction(instr);
- intptr_t external =
- reinterpret_cast<intptr_t>(redirection->external_function());
+ uword external = redirection->external_function();
SimulatorRuntimeCall target =
reinterpret_cast<SimulatorRuntimeCall>(external);
if (FLAG_trace_sim) {

Powered by Google App Engine
This is Rietveld 408576698