File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed
cpp/ql/lib/semmle/code/cpp/ir/implementation Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ private newtype TOpcode =
3030 TNegate ( ) or
3131 TShiftLeft ( ) or
3232 TShiftRight ( ) or
33+ TUnsignedShiftRight ( ) or
3334 TBitAnd ( ) or
3435 TBitOr ( ) or
3536 TBitXor ( ) or
@@ -652,6 +653,15 @@ module Opcode {
652653 final override string toString ( ) { result = "ShiftRight" }
653654 }
654655
656+ /**
657+ * The `Opcode` for a `UnsignedShiftRightInstruction`.
658+ *
659+ * See the `UnsignedShiftRightInstruction` documentation for more details.
660+ */
661+ class UnsignedShiftRight extends BinaryBitwiseOpcode , TUnsignedShiftRight {
662+ final override string toString ( ) { result = "UnsignedShiftRight" }
663+ }
664+
655665 /**
656666 * The `Opcode` for a `BitAndInstruction`.
657667 *
Original file line number Diff line number Diff line change @@ -1204,6 +1204,17 @@ class ShiftRightInstruction extends BinaryBitwiseInstruction {
12041204 ShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: ShiftRight }
12051205}
12061206
1207+ /**
1208+ * An instruction that shifts its left operand to the right by the number of bits specified by its
1209+ * right operand.
1210+ *
1211+ * Both operands must have an integer type. The result has the same type as the left operand.
1212+ * The leftmost bits are zero-filled.
1213+ */
1214+ class UnsignedShiftRightInstruction extends BinaryBitwiseInstruction {
1215+ UnsignedShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: UnsignedShiftRight }
1216+ }
1217+
12071218/**
12081219 * An instruction that performs a binary arithmetic operation involving at least one pointer
12091220 * operand.
Original file line number Diff line number Diff line change @@ -1204,6 +1204,17 @@ class ShiftRightInstruction extends BinaryBitwiseInstruction {
12041204 ShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: ShiftRight }
12051205}
12061206
1207+ /**
1208+ * An instruction that shifts its left operand to the right by the number of bits specified by its
1209+ * right operand.
1210+ *
1211+ * Both operands must have an integer type. The result has the same type as the left operand.
1212+ * The leftmost bits are zero-filled.
1213+ */
1214+ class UnsignedShiftRightInstruction extends BinaryBitwiseInstruction {
1215+ UnsignedShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: UnsignedShiftRight }
1216+ }
1217+
12071218/**
12081219 * An instruction that performs a binary arithmetic operation involving at least one pointer
12091220 * operand.
Original file line number Diff line number Diff line change @@ -1204,6 +1204,17 @@ class ShiftRightInstruction extends BinaryBitwiseInstruction {
12041204 ShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: ShiftRight }
12051205}
12061206
1207+ /**
1208+ * An instruction that shifts its left operand to the right by the number of bits specified by its
1209+ * right operand.
1210+ *
1211+ * Both operands must have an integer type. The result has the same type as the left operand.
1212+ * The leftmost bits are zero-filled.
1213+ */
1214+ class UnsignedShiftRightInstruction extends BinaryBitwiseInstruction {
1215+ UnsignedShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: UnsignedShiftRight }
1216+ }
1217+
12071218/**
12081219 * An instruction that performs a binary arithmetic operation involving at least one pointer
12091220 * operand.
You can’t perform that action at this time.
0 commit comments