Skip to main content

luaur_code_gen/macros/
sib.rs

1use crate::functions::get_scale_encoding::get_scale_encoding;
2
3#[allow(non_snake_case)]
4#[inline(always)]
5pub fn SIB(scale: u8, index: u8, base: u8) -> u8 {
6    ((get_scale_encoding(scale) << 6) | (((index) & 0x7) << 3) | ((base) & 0x7)) as u8
7}