rust-mos icon indicating copy to clipboard operation
rust-mos copied to clipboard

excessively large loops

Open sajattack opened this issue 11 months ago • 0 comments

Hey, I'm not sure if this is something that can be fixed or required by LLVM/Rust ABI, but I noticed some simple busy loops were quite large (42 bytes).

#[inline(never)]
extern fn delay() {
    for _ in 0..16u8 {
        for _ in 0..255u8 {
            unsafe { nop(); }
        }
    }
}

This emits: image

When imo it should emit something more like

image

Let me know if this isn't possible and feel free to close, but I thought I should mention it.

sajattack avatar Dec 05 '24 20:12 sajattack