Skip to content

AArch64 NCG does not check bounds on Immediates

In CmmToAsm/AArch64/CodeGen.hs, we'll find a comment on litToImm, which states that we do not do proper Immediate bounds checks. On AArch64, we can't but arbitrary immediates into the stream.

Thus we should check their bounds prior to injection.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information