File tree Expand file tree Collapse file tree
binary/ql/lib/semmle/code/binary/ast/ir/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,6 +121,12 @@ class CJumpInstruction extends Instruction {
121121 ConditionJumpTargetOperand getJumpTargetOperand ( ) { result = this .getAnOperand ( ) }
122122}
123123
124+ class JumpInstruction extends Instruction {
125+ override Opcode:: Jump opcode ;
126+
127+ JumpTargetOperand getJumpTargetOperand ( ) { result = this .getAnOperand ( ) }
128+ }
129+
124130class RetInstruction extends Instruction {
125131 override Opcode:: Ret opcode ;
126132}
Original file line number Diff line number Diff line change @@ -64,4 +64,8 @@ class ConditionJumpTargetOperand extends Operand {
6464 override Tags:: CondJumpTargetTag operandTag ;
6565}
6666
67+ class JumpTargetOperand extends Operand {
68+ override Tags:: JumpTargetTag operandTag ;
69+ }
70+
6771class OperandTag = Tags:: OperandTag ;
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ signature module InstructionSig {
4040
4141 class ConditionJumpTargetOperand extends Operand ;
4242
43+ class JumpTargetOperand extends Operand ;
44+
4345 class LeftOperand extends Operand ;
4446
4547 class RightOperand extends Operand ;
@@ -142,6 +144,10 @@ signature module InstructionSig {
142144 ConditionJumpTargetOperand getJumpTargetOperand ( ) ;
143145 }
144146
147+ class JumpInstruction extends Instruction {
148+ JumpTargetOperand getJumpTargetOperand ( ) ;
149+ }
150+
145151 class CopyInstruction extends Instruction {
146152 UnaryOperand getOperand ( ) ;
147153 }
Original file line number Diff line number Diff line change @@ -381,6 +381,12 @@ module Transform<InstructionSig Input> {
381381 ConditionJumpTargetOperand getJumpTargetOperand ( ) { result = this .getAnOperand ( ) }
382382 }
383383
384+ class JumpInstruction extends Instruction {
385+ JumpInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: Jump }
386+
387+ JumpTargetOperand getJumpTargetOperand ( ) { result = this .getAnOperand ( ) }
388+ }
389+
384390 class BinaryInstruction extends Instruction {
385391 BinaryInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: BinaryOpcode }
386392
@@ -650,6 +656,10 @@ module Transform<InstructionSig Input> {
650656 ConditionJumpTargetOperand ( ) { this .getOperandTag ( ) instanceof Tags:: CondJumpTargetTag }
651657 }
652658
659+ class JumpTargetOperand extends Operand {
660+ JumpTargetOperand ( ) { this .getOperandTag ( ) instanceof Tags:: JumpTargetTag }
661+ }
662+
653663 class LeftOperand extends Operand {
654664 LeftOperand ( ) { this .getOperandTag ( ) instanceof Tags:: LeftTag }
655665 }
You can’t perform that action at this time.
0 commit comments