tcg/mips: Fix SoftTLB comparison on mips backend
commit4e655e3cd80535328794c763681a6aa11a69178f
authorKele Huang <kele.hwang@gmail.com>
Thu, 1 Apr 2021 10:04:57 +0000 (1 18:04 +0800)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 5 Apr 2021 14:32:56 +0000 (5 07:32 -0700)
treea967ecb592a392dee850eb0f473ec3a9fa7a3bf6
parent25d75c99b2e5941c67049ee776efdb226414f4c6
tcg/mips: Fix SoftTLB comparison on mips backend

The addrl used to compare with SoftTLB entry should be sign-extended
in common case, and it will cause constant failing in SoftTLB
comparisons for the addrl whose address is over 0x80000000 on the
emulation of 32-bit guest on 64-bit host.

This is an important performance bug fix. Spec2000 gzip rate increase
from ~45 to ~140 on Loongson 3A4000 (MIPS compatible platform).

Signed-off-by: Kele Huang <kele.hwang@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210401100457.191458-1-kele.hwang@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/mips/tcg-target.c.inc