• R
    tcg: Reduce max TB opcode count · 9f754620
    Richard Henderson 提交于
    Also, assert that we don't overflow any of two different offsets into
    the TB. Both unwind and goto_tb both record a uint16_t for later use.
    
    This fixes an arm-softmmu test case utilizing NEON in which there is
    a TB generated that runs to 7800 opcodes, and compiles to 96k on an
    x86_64 host.  This overflows the 16-bit offset in which we record the
    goto_tb reset offset.  Because of that overflow, we install a jump
    destination that goes to neverland.  Boom.
    
    With this reduced op count, the same TB compiles to about 48k for
    aarch64, ppc64le, and x86_64 hosts, and neither assertion fires.
    
    Cc: qemu-stable@nongnu.org
    Reported-by: N"Jason A. Donenfeld" <Jason@zx2c4.com>
    Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
    Signed-off-by: NRichard Henderson <richard.henderson@linaro.org>
    9f754620
tcg.c 120.8 KB