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

Unified Diff: src/mips/macro-assembler-mips.cc

Issue 15606002: MIPS: fix arm simulator after 14725 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 | « no previous file | src/mips/simulator-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/macro-assembler-mips.cc
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index d9d511be0280ec6471e112841067ff3e24976410..cea4bc4683de3b25e8f3519bbb55f4b8c2168ab5 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -3980,10 +3980,6 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
PopSafepointRegisters();
}
- // As mentioned above, on MIPS a pointer is returned - we need to dereference
- // it to get the actual return value (which is also a pointer).
- lw(v0, MemOperand(v0));
-
Label promote_scheduled_exception;
Label delete_allocated_handles;
Label leave_exit_frame;
@@ -3991,11 +3987,15 @@ void MacroAssembler::CallApiFunctionAndReturn(ExternalReference function,
if (returns_handle) {
Label load_return_value;
+
+ // As mentioned above, on MIPS a pointer is returned - we need to
+ // dereference it to get the actual return value (which is also a pointer).
+ lw(v0, MemOperand(v0));
+
Branch(&load_return_value, eq, v0, Operand(zero_reg));
// Dereference returned value.
lw(v0, MemOperand(v0));
- b(&return_value_loaded);
- nop();
+ Branch(&return_value_loaded);
bind(&load_return_value);
}
// Load value from ReturnValue.
« no previous file with comments | « no previous file | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698