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

Unified Diff: runtime/vm/assembler_mips.h

Issue 13228002: First two codegen tests passing on SIMMIPS (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 20729)
+++ runtime/vm/assembler_mips.h (working copy)
@@ -162,18 +162,10 @@
buffer_.FinalizeInstructions(region);
}
- // 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.
- void EnterDartFrame(intptr_t frame_size) {
- UNIMPLEMENTED();
- }
-
// Set up a stub frame so that the stack traversal code can easily identify
// a stub frame.
- void EnterStubFrame() {
- UNIMPLEMENTED();
- }
+ void EnterStubFrame();
+ void LeaveStubFrame();
// 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
@@ -250,6 +242,12 @@
beq(R0, R0, l);
}
+ void bal(Label *l) {
+ ASSERT(!in_delay_slot_);
+ EmitRegImmBranch(BGEZAL, R0, l);
+ EmitBranchDelayNop();
+ }
+
// Branch if equal.
void beq(Register rs, Register rt, Label* l) {
ASSERT(!in_delay_slot_);
@@ -546,6 +544,18 @@
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);
+ slt(rd, rs, TMP);
+ }
+
+ // If the unsigned value in rs is less than value, rd is 1, and 0 otherwise.
+ void LessThanUImmediate(Register rd, Register rs, uint32_t value) {
+ LoadImmediate(TMP, value);
+ sltu(rd, rs, TMP);
+ }
+
void Drop(intptr_t stack_elements) {
ASSERT(stack_elements >= 0);
if (stack_elements > 0) {
@@ -578,6 +588,14 @@
jr(RA);
}
+ void SmiTag(Register reg) {
+ sll(reg, reg, kSmiTagSize);
+ }
+
+ void SmiUntag(Register reg) {
+ sra(reg, reg, kSmiTagSize);
+ }
+
void LoadWordFromPoolOffset(Register rd, int32_t offset);
void LoadObject(Register rd, const Object& object);
void PushObject(const Object& object);
@@ -586,6 +604,12 @@
// set to non-zero otherwise.
void CompareObject(Register rd, Register rn, const Object& object);
+ // 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.
+ void EnterDartFrame(intptr_t frame_size);
+ void LeaveDartFrame();
+
private:
AssemblerBuffer buffer_;
GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
« 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