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 =
30
30
TNegate ( ) or
31
31
TShiftLeft ( ) or
32
32
TShiftRight ( ) or
33
+ TUnsignedShiftRight ( ) or
33
34
TBitAnd ( ) or
34
35
TBitOr ( ) or
35
36
TBitXor ( ) or
@@ -652,6 +653,15 @@ module Opcode {
652
653
final override string toString ( ) { result = "ShiftRight" }
653
654
}
654
655
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
+
655
665
/**
656
666
* The `Opcode` for a `BitAndInstruction`.
657
667
*
Original file line number Diff line number Diff line change @@ -1204,6 +1204,17 @@ class ShiftRightInstruction extends BinaryBitwiseInstruction {
1204
1204
ShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: ShiftRight }
1205
1205
}
1206
1206
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
+
1207
1218
/**
1208
1219
* An instruction that performs a binary arithmetic operation involving at least one pointer
1209
1220
* operand.
Original file line number Diff line number Diff line change @@ -1204,6 +1204,17 @@ class ShiftRightInstruction extends BinaryBitwiseInstruction {
1204
1204
ShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: ShiftRight }
1205
1205
}
1206
1206
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
+
1207
1218
/**
1208
1219
* An instruction that performs a binary arithmetic operation involving at least one pointer
1209
1220
* operand.
Original file line number Diff line number Diff line change @@ -1204,6 +1204,17 @@ class ShiftRightInstruction extends BinaryBitwiseInstruction {
1204
1204
ShiftRightInstruction ( ) { this .getOpcode ( ) instanceof Opcode:: ShiftRight }
1205
1205
}
1206
1206
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
+
1207
1218
/**
1208
1219
* An instruction that performs a binary arithmetic operation involving at least one pointer
1209
1220
* operand.
You can’t perform that action at this time.
0 commit comments