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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 12398029: Remove the barely used macro assemblers after merging their contents to the base (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
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
===================================================================
--- runtime/vm/assembler_arm.cc (revision 19430)
+++ runtime/vm/assembler_arm.cc (working copy)
@@ -1710,6 +1710,61 @@
}
+void Assembler::EnterDartFrame(intptr_t frame_size) {
+ const intptr_t offset = CodeSize();
+ // Save PC in frame for fast identification of corresponding code.
+ // Note that callee-saved registers can be added to the register list.
+ EnterFrame((1 << PP) | (1 << FP) | (1 << LR) | (1 << PC), 0);
+
+ if (offset != 0) {
+ // Adjust saved PC for any intrinsic code that could have been generated
+ // before a frame is created. Use PP as temp register.
+ ldr(PP, Address(FP, 2 * kWordSize));
+ AddImmediate(PP, PP, -offset);
+ str(PP, Address(FP, 2 * kWordSize));
+ }
+
+ // Setup pool pointer for this dart function.
+ const intptr_t object_pool_pc_dist =
+ Instructions::HeaderSize() - Instructions::object_pool_offset() +
+ CodeSize() + Instr::kPCReadOffset;
+ ldr(PP, Address(PC, -object_pool_pc_dist));
+
+ // Reserve space for locals.
+ AddImmediate(SP, -frame_size);
+}
+
+
+void Assembler::LeaveDartFrame() {
+ LeaveFrame((1 << PP) | (1 << FP) | (1 << LR));
+ // Adjust SP for PC pushed in EnterDartFrame.
+ AddImmediate(SP, kWordSize);
+}
+
+
+void Assembler::EnterStubFrame() {
+ // Push 0 as saved PC for stub frames.
+ mov(IP, ShifterOperand(LR));
+ mov(LR, ShifterOperand(0));
+ EnterFrame((1 << FP) | (1 << IP) | (1 << LR), 0);
+}
+
+
+void Assembler::LeaveStubFrame() {
+ LeaveFrame((1 << FP) | (1 << LR));
+ // Adjust SP for null PC pushed in EnterStubFrame.
+ AddImmediate(SP, kWordSize);
+}
+
+
+void Assembler::TryAllocate(const Class& cls,
+ Label* failure,
+ bool near_jump,
+ Register instance_reg) {
+ UNIMPLEMENTED();
+}
+
+
void Assembler::Stop(const char* message) {
if (FLAG_print_stop_message) {
PushList((1 << R0) | (1 << IP) | (1 << LR)); // Preserve R0, IP, LR.
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698