mirror of
https://git.suyu.dev/suyu/sirit.git
synced 2026-01-01 12:15:45 +01:00
Add OpShift arithmetic and logical operations
This commit is contained in:
parent
9c7f96a809
commit
c29314ad14
3 changed files with 53 additions and 0 deletions
|
|
@ -248,6 +248,20 @@ class Module {
|
|||
/// Bit pattern-preserving type conversion.
|
||||
Id OpBitcast(Id result_type, Id operand);
|
||||
|
||||
// Bit
|
||||
|
||||
/// Shift the bits in Base right by the number of bits specified in Shift.
|
||||
/// The most-significant bits will be zero filled.
|
||||
Id OpShiftRightLogical(Id result_type, Id base, Id shift);
|
||||
|
||||
/// Shift the bits in Base right by the number of bits specified in Shift.
|
||||
/// The most-significant bits will be filled with the sign bit from Base.
|
||||
Id OpShiftRightArithmetic(Id result_type, Id base, Id shift);
|
||||
|
||||
/// Shift the bits in Base left by the number of bits specified in Shift.
|
||||
/// The least-significant bits will be zero filled.
|
||||
Id OpShiftLeftLogical(Id result_type, Id base, Id shift);
|
||||
|
||||
private:
|
||||
Id AddCode(std::unique_ptr<Op> op);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue