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

Unified Diff: runtime/vm/assembler_mips.h

Issue 1367973002: VM: Initialize Instruction objects with break instructions instead of null. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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_ia32.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_mips.h
diff --git a/runtime/vm/assembler_mips.h b/runtime/vm/assembler_mips.h
index 4368707330b3ed36f6ab1f8bd52e5f098b4c24f7..714e2d8c923fef2d479cc739200c7c7603aa432d 100644
--- a/runtime/vm/assembler_mips.h
+++ b/runtime/vm/assembler_mips.h
@@ -504,11 +504,20 @@ class Assembler : public ValueObject {
EmitBranchDelayNop();
}
- void break_(int32_t code) {
+ static int32_t BreakEncoding(int32_t code) {
ASSERT(Utils::IsUint(20, code));
- Emit(SPECIAL << kOpcodeShift |
- code << kBreakCodeShift |
- BREAK << kFunctionShift);
+ return SPECIAL << kOpcodeShift |
+ code << kBreakCodeShift |
+ BREAK << kFunctionShift;
+ }
+
+
+ void break_(int32_t code) {
+ Emit(BreakEncoding(code));
+ }
+
+ static uword GetBreakInstructionFiller() {
+ return BreakEncoding(0);
}
// FPU compare, always false.
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698