On 18/11/26 01:01, Richard Henderson wrote:
On 11/17/26 14:35, Philippe Mathieu-Daudé wrote:
On 17/11/26 20:00, Richard Henderson wrote:
On 11/13/26 08:11, Philippe Mathieu-Daudé wrote:
MFTR/MTTR must raise Reserved Instruction on processors not
implementing the MT module (MD00378 pp.46/50, Config3.MT:
table 6.21). Use check_cp0_mt(), as done for the other MT
instructions, instead of only check_cp0_enabled().
Fixes: ead9360e2fbc ("Partial support for 34K multithreading")
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
target/mips/tcg/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Surely check_cp0_mt must be enabled for user-only,
not sit behind an ifdef.
I suppose I got lucky, MIPS_HFLAG_CP0 is never set in user-mode so
the OPC_CP0 dispatch already raises CpU before any MT check could apply.
I'll remove the #ifdef (and fix the Config5/Config3 typo in comment),
thanks!
I meant, check_cp0_mt is undefined for user-only.
How does this compile?
It doesn't have to :) gen_cp0() is itself compiled out for
CONFIG_USER_ONLY -- the #ifndef CONFIG_USER_ONLY region holding
the CP0 helpers (opened at translate.c:4875) is closed right after
gen_cp0() at :8717 -- so the new call sites only exist in system
builds, matching check_cp0_mt()'s own #ifndef.
Still, check_mt() is available to all builds and there is no technical
reason to hide check_cp0_mt() (its body doesn't use anything
system-only), so I'm moving it out of the #ifdef as announced, along
with the Config5 -> Config3 comment fix.