Slide 16
Slide 16 text
16
Add custom IL opcode
• Grep special-like or unique naming opcode in coreclr:
ex: “initobj”, “ldftn” etc…
--> Opcodes declared in src/inc/opcode.def by OPDEF() macro.
• Opcode break: “CEE_BREAK”
OPDEF(CEE_BREAK, "break", Pop0, Push0, InlineNone, IPrimitive, 1,
0xFF, 0x01, BREAK)
• Add “CEE_CUSTOMCODE” for last opcode “CEE_UNUSED70”’s next:
OPDEF(CEE_CUSTOMCODE, “customcode", Pop0, Push0, InlineNone,
IPrimitive, 2, 0xFE, 0x23, NEXT)
New 2 words opcode: fe,23
Instruction move hint:
“NEXT” is execute next opcode.
(Standard behavior)
No stack consume/produce
CC-BY-SA 4.0 COPYRIGHT (C) 2016 KOUJI MATSUI