Skip to content
  • Cheng Shao's avatar
    CmmToC: fix CmmRegOff for 64-bit register on a 32-bit target · d151546e
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    We used to print the offset value to a platform word sized integer.
    This is incorrect when the offset is negative (e.g. output of cmm
    constant folding) and the register is 64-bit but on a 32-bit target,
    and may lead to incorrect runtime result (e.g. #22607).
    
    The fix is simple: just treat it as a proper MO_Add, with the correct
    width info inferred from the register itself.
    
    Metric Increase:
        T12707
        T13379
        T4801
        T5321FD
        T5321Fun
    d151546e