Struct apint::APInt [] [src]

pub struct APInt { /* fields omitted */ }

Methods

impl APInt
[src]

[src]

Creates a new APInt from a given i8 value with a bit-width of 8.

[src]

Creates a new APInt from a given i8 value with a bit-width of 8.

[src]

Creates a new APInt from a given i16 value with a bit-width of 16.

[src]

Creates a new APInt from a given i16 value with a bit-width of 16.

[src]

Creates a new APInt from a given i32 value with a bit-width of 32.

[src]

Creates a new APInt from a given i32 value with a bit-width of 32.

[src]

Creates a new APInt from a given i64 value with a bit-width of 64.

[src]

Creates a new APInt from a given i64 value with a bit-width of 64.

[src]

Creates a new APInt with the given bit-width that represents zero.

Error Returns InvalidZeroBitWidth in case of a given target bit-width of zero.

[src]

Creates a new APInt with the given bit-width that represents one.

Error Returns InvalidZeroBitWidth in case of a given target bit-width of zero.

[src]

Creates a new APInt with the given bit-width that has all bits set.

Error Returns InvalidZeroBitWidth in case of a given target bit-width of zero.

[src]

Creates a new APInt with the given bit-width that has all bits set.

Error Returns InvalidZeroBitWidth in case of a given target bit-width of zero.

impl APInt
[src]

[src]

Creates a new FixInt that represents this FixInt truncated to the given target bit-width.

Panics

  • If target_bitwidth is greater than the FixInt's current bit-width.
  • If target_bitwidth is zero (0).

Note

Equal to a call to clone() if target_bitwidth is equal to this FixInt's bit-width.

[src]

Creates a new FixInt that represents the zero-extension of this FixInt to the given target bit-width.

Semantics (from LLVM)

The zext fills the high order bits of the value with zero bits until it reaches the size of the destination bit-width. When zero extending from i1, the result will always be either 0 or 1.

Panics

  • If target_bitwidth is less than the FixInt's current bit-width.

Note

Equal to a call to clone() if target_bitwidth is equal to this FixInt's bit-width.

[src]

Creates a new FixInt that represents the sign-extension of this FixInt to the given target bit-width.

Semantic (from LLVM)

The ‘sext‘ instruction performs a sign extension by copying the sign bit (highest order bit) of the value until it reaches the target bit-width. When sign extending from i1, the extension always results in -1 or 0.

Panics

  • If target_bitwidth is less than the FixInt's current bit-width.

Note

Equal to a call to clone() if target_bitwidth is equal to this FixInt's bit-width.

[src]

TODO: Missing documentation.

[src]

TODO: Missing documentation.

impl APInt
[src]

[src]

Creates a new bitvev that represents the bitwise-not of the given APInt.

[src]

Flip all bits of the given APInt inplace.

This operation operates in-place on self and thus does not require dynamic memory allocation.

[src]

Creates a new bitvec that represents the bitwise-and of both given APInts.

[src]

Computes bitwise-and of self and other and stores the result in self.

This operation operates in-place on self and thus does not require dynamic memory allocation.

[src]

Creates a new bitvec that represents the bitwise-or of both given APInts.

[src]

Computes bitwise-or of self and other and stores the result in self.

This operation operates in-place on self and thus does not require dynamic memory allocation.

[src]

Creates a new bitvec that represents the bitwise-xor of both given APInts.

[src]

Computes bitwise-xor of self and other and stores the result in self.

This operation operates in-place on self and thus does not require dynamic memory allocation.

impl APInt
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl APInt
[src]

[src]

Unsigned less-than comparison with the other bitvec.

[src]

Unsigned less-than-or-equals comparison with the other bitvec.

[src]

Unsigned greater-than comparison with the other bitvec.

[src]

Unsigned greater-than-or-equals comparison with the other bitvec.

[src]

Signed less-than comparison with the other bitvec.

[src]

Signed less-than-or-equals comparison with the other bitvec.

[src]

Signed greater-than comparison with the other bitvec.

[src]

Signed greater-than-or-equals comparison with the other bitvec.

impl APInt
[src]

[src]

Returns a new APInt that represents the negation of this APInt.

This may allocate heap memory!

[src]

Negates this APInt inplace as if it was a signed integer.

This does not allocate heap memory!

[src]

Creates a new APInt that represents the addition of both given APInts.

Note

In the low-level bit-wise representation there is no difference between signed and unsigned addition of fixed bit-width integers. (Cite: LLVM)

[src]

[src]

Creates a new APInt that represents the signed subtraction of both given APInts.

Note

In the low-level bit-wise representation there is no difference between signed and unsigned subtraction of fixed bit-width integers. (Cite: LLVM)

[src]

[src]

Creates a new APInt that represents the multiplication of both given APInts.

Note

In the low-level bit-wise representation there is no difference between signed and unsigned multiplication of fixed bit-width integers. (Cite: LLVM)

[src]

[src]

Creates a new APInt that represents the unsigned multiplication of both given APInts.

[src]

[src]

Creates a new APInt that represents the signed multiplication of both given APInts.

[src]

[src]

Creates a new APInt that represents the unsigned remainder of both given APInts.

[src]

[src]

Creates a new APInt that represents the signed remainder of both given APInts.

[src]

impl APInt
[src]

[src]

Creates a new APInt that represents the result of this APInt left-shifted by the other one.

Errors

  • When self and other have different bit-widths.

[src]

Left-shifts this APInt by the amount represented by other.

Errors

  • When self and other have different bit-widths.

[src]

Creates a new APInt that represents the result of this APInt logically right-shifted by the other one.

Errors

  • When self and other have different bit-widths.

[src]

Logically right-shifts this APInt by the amount represented by other.

Errors

  • When self and other have different bit-widths.

[src]

Creates a new APInt that represents the result of this APInt arithmetically right-shifted by the other one.

Errors

  • When self and other have different bit-widths.

[src]

Arithmetically right-shifts this APInt by the amount represented by other.

Errors

  • When self and other have different bit-widths.

Trait Implementations

impl Drop for APInt
[src]

[src]

Executes the destructor for this type. Read more

impl Clone for APInt
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for APInt
[src]

[src]

Formats the value using the given formatter.

impl<'a> BitAnd<&'a APInt> for APInt
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a> BitOr<&'a APInt> for APInt
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a> BitXor<&'a APInt> for APInt
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a, 'b> BitAnd<&'a APInt> for &'b APInt
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl<'a, 'b> BitOr<&'a APInt> for &'b APInt
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl<'a, 'b> BitXor<&'a APInt> for &'b APInt
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl<'a> BitAndAssign<&'a APInt> for APInt
[src]

[src]

Performs the &= operation.

impl<'a> BitOrAssign<&'a APInt> for APInt
[src]

[src]

Performs the |= operation.

impl<'a> BitXorAssign<&'a APInt> for APInt
[src]

[src]

Performs the ^= operation.

impl PartialEq for APInt
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Eq for APInt
[src]

impl Neg for APInt
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

impl<'a> Add<&'a APInt> for APInt
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a, 'b> Add<&'a APInt> for &'b APInt
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> AddAssign<&'a APInt> for APInt
[src]

[src]

Performs the += operation.

impl<'a> Mul<&'a APInt> for APInt
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a, 'b> Mul<&'a APInt> for &'b APInt
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl<'a> MulAssign<&'a APInt> for APInt
[src]

[src]

Performs the *= operation.