fetch1: Fix bug where BTC entries don't match on MSR[IR]
authorPaul Mackerras <paulus@ozlabs.org>
Wed, 10 Aug 2022 00:13:50 +0000 (10:13 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 10 Aug 2022 00:19:50 +0000 (10:19 +1000)
commit769f5c3a5318a1af95086c8ca693abadb493aaf9
treea498f35d74b29d33d00cd84fd85da3d23b93eccf
parent2562053af3d32e3ccabcac07980127c7c66fa7fb
fetch1: Fix bug where BTC entries don't match on MSR[IR]

This fixes a bug in the BTC where entries created for a given address
when MSR[IR] = 0 are used when MSR[IR] = 1 and vice-versa.  The fix is
to include r.virt_mode (which mirrors MSR[IR]) in the tag portion of
the BTC.

Fixes: 0fb207be6069 ("fetch1: Implement a simple branch target cache", 2020-12-19)
Reported-by: Anton Blanchard <anton@linux.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
fetch1.vhdl