pub struct ShRSIOperation<'c> { /* private fields */ }
Expand description
A shrsi
operation. Signed integer right-shift.
The shrsi
operation shifts an integer value to the right by a variable
amount. The integer is interpreted as signed. The high order bits in the
output are filled with copies of the most-significant bit of the shifted
value (which means that the sign of the value is preserved).
Example:
%1 = arith.constant 160 : i8 // %1 is 0b10100000
%2 = arith.constant 3 : i8
%3 = arith.shrsi %1, %2 : (i8, i8) -> i8 // %3 is 0b11110100
%4 = arith.constant 96 : i8 // %4 is 0b01100000
%5 = arith.shrsi %4, %2 : (i8, i8) -> i8 // %5 is 0b00001100
Implementations§
source§impl<'c> ShRSIOperation<'c>
impl<'c> ShRSIOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> ShRSIOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> ShRSIOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn lhs(&self) -> Result<Value<'c, '_>, Error>
pub fn rhs(&self) -> Result<Value<'c, '_>, Error>
Trait Implementations§
source§impl<'c> From<ShRSIOperation<'c>> for Operation<'c>
impl<'c> From<ShRSIOperation<'c>> for Operation<'c>
source§fn from(operation: ShRSIOperation<'c>) -> Self
fn from(operation: ShRSIOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for ShRSIOperation<'c>
impl<'c> !Send for ShRSIOperation<'c>
impl<'c> !Sync for ShRSIOperation<'c>
impl<'c> Unpin for ShRSIOperation<'c>
impl<'c> UnwindSafe for ShRSIOperation<'c>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more