Support check-cast elision in DEX-to-DEX compiler.
Bug: 9648428
Replaces safe check-cast by 2 consecutive nop instructions.
Change-Id: I2cd99c629a6a00a6e0effc853c3439bc92683d6d
diff --git a/runtime/dex_instruction.h b/runtime/dex_instruction.h
index 7d078f9..ff81659 100644
--- a/runtime/dex_instruction.h
+++ b/runtime/dex_instruction.h
@@ -292,6 +292,12 @@
insns[0] = (insns[0] & 0xff00) | static_cast<uint16_t>(opcode);
}
+ void SetVRegA_10x(uint8_t val) {
+ DCHECK(FormatOf(Opcode()) == k10x);
+ uint16_t* insns = reinterpret_cast<uint16_t*>(this);
+ insns[0] = (val << 8) | (insns[0] & 0x00ff);
+ }
+
void SetVRegB_3rc(uint16_t val) {
DCHECK(FormatOf(Opcode()) == k3rc);
uint16_t* insns = reinterpret_cast<uint16_t*>(this);