Skip to content

Commit 3945cf5

Browse files
committed
CIL: Add CIL translation into IR.
1 parent 01490f9 commit 3945cf5

7 files changed

Lines changed: 1555 additions & 5 deletions

File tree

binary/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/bin/*
2+
**/obj/*

binary/ql/lib/semmle/code/binary/ast/instructions.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ private import Headers
44
private import Sections
55
private import codeql.util.Unit
66

7-
private class TElement = @x86_instruction or @operand;
7+
private class TElement = @x86_instruction or @operand or @il_instruction or @method;
88

99
class Element extends TElement {
1010
final string toString() { none() }
@@ -33,6 +33,10 @@ private class IlInstructionElement extends Element {
3333
final string toString() { instruction_string(this, result) }
3434
}
3535

36+
private class CilMethodElement extends Element {
37+
final string toString() { methods(this, result, _, _) }
38+
}
39+
3640
private module Pre {
3741
module PreInput implements Internal::InstructionInputSig {
3842
class BaseX86Instruction extends Internal::X86Instruction {
@@ -240,3 +244,5 @@ class ProgramEntryInstruction extends X86Instruction {
240244
class ExportedEntryInstruction extends X86Instruction {
241245
ExportedEntryInstruction() { this.getIndex() = getOffsetOfAnExportedFunction().toBigInt() }
242246
}
247+
248+
import internal.CilInstructions

0 commit comments

Comments
 (0)