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

Unified Diff: runtime/vm/constants_mips.h

Issue 20369003: Implements far branch targets for MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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_mips_test.cc ('k') | runtime/vm/disassembler_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constants_mips.h
===================================================================
--- runtime/vm/constants_mips.h (revision 25539)
+++ runtime/vm/constants_mips.h (working copy)
@@ -186,8 +186,11 @@
// The code that generates a comparison can be far away from the code that
// generates the branch that uses the result of that comparison. In this case,
-// CMPRES is used for the result of the comparison.
-const Register CMPRES = T9;
+// CMPRES1 and CMPRES2 are used for the results of the comparison. We need two
+// since TMP is clobbered by a far branch.
+const Register CMPRES1 = T8;
+const Register CMPRES2 = T9;
+const Register CMPRES = CMPRES1;
// Exception object is passed in this register to the catch handlers when an
// exception is thrown.
@@ -504,6 +507,12 @@
return static_cast<Opcode>(Bits(kOpcodeShift, kOpcodeBits));
}
+ inline void SetOpcodeField(Opcode b) {
+ int32_t instr = InstructionBits();
+ int32_t mask = ((1 << kOpcodeBits) - 1) << kOpcodeShift;
+ SetInstructionBits((b << kOpcodeShift) | (instr & ~mask));
+ }
+
inline Register RsField() const {
return static_cast<Register>(Bits(kRsShift, kRsBits));
}
@@ -553,6 +562,12 @@
return static_cast<RtRegImm>(Bits(kRtShift, kRtBits));
}
+ inline void SetRegImmFnField(RtRegImm b) {
+ int32_t instr = InstructionBits();
+ int32_t mask = ((1 << kRtBits) - 1) << kRtShift;
+ SetInstructionBits((b << kRtShift) | (instr & ~mask));
+ }
+
inline bool IsBreakPoint() {
return (OpcodeField() == SPECIAL) && (FunctionField() == BREAK);
}
« no previous file with comments | « runtime/vm/assembler_mips_test.cc ('k') | runtime/vm/disassembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698