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

Unified Diff: runtime/vm/assembler_arm64.cc

Issue 255633002: Enables simple static call test on arm64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/assembler_arm64.h ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm64.cc
===================================================================
--- runtime/vm/assembler_arm64.cc (revision 35373)
+++ runtime/vm/assembler_arm64.cc (working copy)
@@ -561,30 +561,29 @@
}
-void Assembler::LoadFromOffset(Register dest, Register base, int32_t offset) {
+void Assembler::LoadFromOffset(
+ Register dest, Register base, int32_t offset, OperandSize sz) {
ASSERT(base != TMP2);
if (Address::CanHoldOffset(offset)) {
- ldr(dest, Address(base, offset));
+ ldr(dest, Address(base, offset), sz);
} else {
// Since offset is 32-bits, it won't be loaded from the pool.
AddImmediate(TMP2, base, offset, kNoRegister);
- ldr(dest, Address(TMP2));
+ ldr(dest, Address(TMP2), sz);
}
}
-void Assembler::StoreToOffset(Register src, Register base, int32_t offset) {
+void Assembler::StoreToOffset(
+ Register src, Register base, int32_t offset, OperandSize sz) {
ASSERT(src != TMP2);
ASSERT(base != TMP2);
if (Address::CanHoldOffset(offset)) {
- str(src, Address(base, offset));
- } else if (Address::CanHoldOffset(offset, Address::PreIndex)) {
- mov(TMP2, base);
- str(src, Address(TMP2, offset, Address::PreIndex));
+ str(src, Address(base, offset), sz);
} else {
// Since offset is 32-bits, it won't be loaded from the pool.
AddImmediate(TMP2, base, offset, kNoRegister);
- str(src, Address(TMP2));
+ str(src, Address(TMP2), sz);
}
}
@@ -818,6 +817,24 @@
entry.Call(this, argument_count);
}
+
+void Assembler::EnterStubFrame(bool load_pp) {
+ EnterFrame(0);
+ Push(ZR); // Push 0 in the saved PC area for stub frames.
+ PushPP(); // Save caller's pool pointer
+ if (load_pp) {
+ LoadPoolPointer(PP);
+ }
+}
+
+
+void Assembler::LeaveStubFrame() {
+ // Restore and untag PP.
+ LoadFromOffset(PP, FP, kSavedCallerPpSlotFromFp * kWordSize);
+ sub(PP, PP, Operand(kHeapObjectTag));
regis 2014/04/24 16:20:07 It is surprising to see this untag operation when
zra 2014/04/24 16:29:01 Done.
+ LeaveFrame();
+}
+
} // namespace dart
#endif // defined TARGET_ARCH_ARM64
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698