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

Unified Diff: runtime/vm/assembler_mips.h

Issue 13407003: Third codegen test passing for simulated MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/assembler_mips.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 20788)
+++ runtime/vm/assembler_mips.h (working copy)
@@ -10,7 +10,9 @@
#endif
#include "platform/assert.h"
+#include "platform/utils.h"
#include "vm/constants_mips.h"
+#include "vm/simulator.h"
// References to documentation in this file refer to:
// "MIPS® Architecture For Programmers Volume I-A:
@@ -20,6 +22,9 @@
// The MIPS32® Instruction Set" in short "VolII-A"
namespace dart {
+// Forward declarations.
+class RuntimeEntry;
+
class Immediate : public ValueObject {
public:
explicit Immediate(int32_t value) : value_(value) { }
@@ -170,7 +175,8 @@
// Instruction pattern from entrypoint is used in dart frame prologs
// to set up the frame and save a PC which can be used to figure out the
// RawInstruction object corresponding to the code running in the frame.
- static const intptr_t kOffsetOfSavedPCfromEntrypoint = -1; // UNIMPLEMENTED.
+ // See EnterDartFrame. There are 6 instructions before we know the PC.
+ static const intptr_t kOffsetOfSavedPCfromEntrypoint = 6 * Instr::kInstrSize;
// Inlined allocation of an instance of class 'cls', code has no runtime
// calls. Jump to 'failure' if the instance cannot be allocated here.
@@ -505,31 +511,13 @@
// Macros in alphabetical order.
void Branch(const ExternalLabel* label) {
- // Doesn't need to be patchable, so use the delay slot.
- if (Utils::IsInt(16, label->address())) {
- jr(TMP);
- delay_slot()->addiu(TMP, ZR, Immediate(label->address()));
- } else {
- const uint16_t low = Utils::Low16Bits(label->address());
- const uint16_t high = Utils::High16Bits(label->address());
- lui(TMP, Immediate(high));
- jr(TMP);
- delay_slot()->ori(TMP, TMP, Immediate(low));
- }
+ LoadImmediate(TMP, label->address());
+ jr(TMP);
}
void BranchLink(const ExternalLabel* label) {
- // Doesn't need to be patchable, so use the delay slot.
- if (Utils::IsInt(16, label->address())) {
- jalr(TMP);
- delay_slot()->addiu(TMP, ZR, Immediate(label->address()));
- } else {
- const uint16_t low = Utils::Low16Bits(label->address());
- const uint16_t high = Utils::High16Bits(label->address());
- lui(TMP, Immediate(high));
- jalr(TMP);
- delay_slot()->ori(TMP, TMP, Immediate(low));
- }
+ LoadImmediate(TMP, label->address());
+ jalr(TMP);
}
void BranchLinkPatchable(const ExternalLabel* label) {
@@ -539,11 +527,6 @@
jalr(TMP);
}
- void BranchPatchable(const ExternalLabel* label) {
- LoadImmediate(TMP, label->address());
- jr(TMP);
- }
-
// If the signed value in rs is less than value, rd is 1, and 0 otherwise.
void LessThanSImmediate(Register rd, Register rs, int32_t value) {
LoadImmediate(TMP, value);
@@ -596,6 +579,8 @@
sra(reg, reg, kSmiTagSize);
}
+ void ReserveAlignedFrameSpace(intptr_t frame_space);
+
void LoadWordFromPoolOffset(Register rd, int32_t offset);
void LoadObject(Register rd, const Object& object);
void PushObject(const Object& object);
@@ -604,6 +589,8 @@
// set to non-zero otherwise.
void CompareObject(Register rd, Register rn, const Object& object);
+ void CallRuntime(const RuntimeEntry& entry);
+
// Set up a Dart frame on entry with a frame pointer and PC information to
// enable easy access to the RawInstruction object of code corresponding
// to this frame.
« no previous file with comments | « no previous file | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698