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

Unified Diff: runtime/vm/assembler_arm64.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_arm.cc ('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_arm64.h
diff --git a/runtime/vm/assembler_arm64.h b/runtime/vm/assembler_arm64.h
index ff7f93f835c865a83e004952b714d1bba1d6a9e7..ffb6b768f42c28217fbb8d3351d800d2b678abe0 100644
--- a/runtime/vm/assembler_arm64.h
+++ b/runtime/vm/assembler_arm64.h
@@ -838,6 +838,11 @@ class Assembler : public ValueObject {
EmitExceptionGenOp(BRK, imm);
}
+ static uword GetBreakInstructionFiller() {
+ const intptr_t encoding = ExceptionGenOpEncoding(BRK, 0);
+ return encoding << 32 | encoding;
+ }
+
// Double floating point.
bool fmovdi(VRegister vd, double immd) {
int64_t imm64 = bit_cast<int64_t, double>(immd);
@@ -1688,10 +1693,12 @@ class Assembler : public ValueObject {
Emit(encoding);
}
+ static int32_t ExceptionGenOpEncoding(ExceptionGenOp op, uint16_t imm) {
+ return op | (static_cast<int32_t>(imm) << kImm16Shift);
+ }
+
void EmitExceptionGenOp(ExceptionGenOp op, uint16_t imm) {
- const int32_t encoding =
- op | (static_cast<int32_t>(imm) << kImm16Shift);
- Emit(encoding);
+ Emit(ExceptionGenOpEncoding(op, imm));
}
void EmitMoveWideOp(MoveWideOp op, Register rd, const Immediate& imm,
« no previous file with comments | « runtime/vm/assembler_arm.cc ('k') | runtime/vm/assembler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698