Project

General

Profile

« Previous | Next » 

Revision 59fad961

Added by alanwu (Alan Wu) about 1 month ago

ZJIT: x86: Fix panic writing 32-bit number with top bit set

Previously, asm.mov(m32, imm32) panicked when imm32 > 0x80000000. It
attempted to split imm32 into a register before doing the store, but
then the register size didn't match the destination size.

Instead of splitting, use the MOV r/m32, imm32 form which works for
all 32-bit values. Adjust asserts that assumed that all forms undergo
sign extension, which is not true for this case.

See: 54edc930f9f0a658da45cfcef46648d1b6f82467