TCG: Improve tb_phys_hash_func()
authorAurelien Jarno <aurelien@aurel32.net>
Tue, 28 Dec 2010 16:46:59 +0000 (17:46 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 31 Dec 2010 21:23:38 +0000 (22:23 +0100)
commitf87a856731f1592fb4952b5cd3e89e8b192b62a0
tree61f7f5b8544a44d210927d4521cd55cc9f353c94
parent8b182713321ccdb35d71f93c28636877b3fd388c
TCG: Improve tb_phys_hash_func()

Most of emulated CPU have instructions aligned on 16 or 32 bits, while
on others GCC tries to align the target jump location. This means that
1/2 or 3/4 of tb_phys_hash entries are never used.

Update the hash function tb_phys_hash_func() to ignore the two lowest
bits of the address. This brings a 6% speed-up when booting a MIPS
image.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
exec-all.h