[][src]Trait bitintr::Rbit

pub trait Rbit {
    fn rbit(self) -> Self;
}

Bit reverse

Required methods

fn rbit(self) -> Self

Reverse the bit order.

Instructions

  • [RBIT](http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc. ddi0487a.k_10775/index.html):
    • Description: Reverse Bits reverses the bit order in a register.
    • Architecture: ARMv7, ARMv8.
    • Registers: 32 (v7) / 64 (v8) bits.

Example

assert_eq!(0b0011_0001_u8.rbit(), 0b1000_1100_u8);
assert_eq!(0b0000_0000_0100_1011_u16.rbit(), 0b1101_0010_0000_0000_u16);
assert_eq!(
    0b11111111_u32.rbit(),
    0b11111111_00000000_00000000_00000000_u32
);
Loading content...

Implementors

impl Rbit for i8[src]

impl Rbit for i16[src]

impl Rbit for i32[src]

impl Rbit for i64[src]

impl Rbit for u8[src]

impl Rbit for u16[src]

impl Rbit for u32[src]

impl Rbit for u64[src]

Loading content...