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
12
13
14
//! Node: `cxx:Function:Luau.CodeGen:CodeGen/src/BitUtils.h:73:lrotate`
//! Source: `CodeGen/src/BitUtils.h`
//! Graph edges:
//! - declared_by: source_file CodeGen/src/BitUtils.h
//! - incoming:
//!   - declares <- source_file CodeGen/src/BitUtils.h

#[inline]
pub fn lrotate(u: u32, s: i32) -> i32 {
    // Rust's rotate_left is equivalent to the C++ implementation provided.
    // It handles the shift amount masking (s & 31) internally and is optimized
    // to the appropriate CPU instruction (like ROL) by the compiler.
    u.rotate_left(s as u32) as i32
}