Found that when writing code like ; mov QWORD [buffer + offset as i32], temp where offset is a immediate value this crate will unconditionally emit relative instructions. When explicitly checking for when offset is zero and emitting ; mov QWORD [buffer], temp reduces my emitted code significantly (~10%).
Maybe this crate could check if immediate values are zero and choose to emit smaller instructions.
Found that when writing code like
; mov QWORD [buffer + offset as i32], tempwhere offset is a immediate value this crate will unconditionally emit relative instructions. When explicitly checking for when offset is zero and emitting; mov QWORD [buffer], tempreduces my emitted code significantly (~10%).Maybe this crate could check if immediate values are zero and choose to emit smaller instructions.