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

Unified Diff: runtime/vm/assembler_mips.h

Issue 17907005: Implements external array access for mips. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.h
===================================================================
--- runtime/vm/assembler_mips.h (revision 24520)
+++ runtime/vm/assembler_mips.h (working copy)
@@ -995,6 +995,26 @@
sra(reg, reg, kSmiTagSize);
}
+ void LoadFromOffset(Register reg, Register base, int32_t offset) {
+ if (Utils::IsInt(kImmBits, offset)) {
+ lw(reg, Address(base, offset));
+ } else {
+ LoadImmediate(TMP, offset);
+ addu(TMP, base, TMP);
+ lw(reg, Address(TMP, 0));
+ }
+ }
+
+ void StoreToOffset(Register reg, Register base, int32_t offset) {
+ if (Utils::IsInt(kImmBits, offset)) {
+ sw(reg, Address(base, offset));
+ } else {
+ LoadImmediate(TMP, offset);
+ addu(TMP, base, TMP);
+ sw(reg, Address(TMP, 0));
+ }
+ }
+
void StoreDToOffset(DRegister reg, Register base, int32_t offset) {
FRegister lo = static_cast<FRegister>(reg * 2);
FRegister hi = static_cast<FRegister>(reg * 2 + 1);
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698