luaur-code-gen 0.1.0

Native (A64/X64) code generation for Luau (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::functions::same_underlying_register::same_underlying_register;
use crate::records::ir_call_wrapper_x_64::IrCallWrapperX64;
use crate::records::operand_x_64::OperandX64;
use crate::records::register_x_64::RegisterX64;

impl IrCallWrapperX64 {
    #[inline]
    pub fn interferes_with_operand(&self, op: &OperandX64, reg: RegisterX64) -> bool {
        same_underlying_register(op.base, reg) || same_underlying_register(op.index, reg)
    }
}