I will re-work each of the mxu_gen_<ins> functions to check for MXUEN and jump over the implementation of the instruction if not enabled.
I would like to clarify the structure of the switch statement before implementing it. I was originally planning on checking if there was a MXU hit and MXUEN was set, in that case use the MXU instruction, else use the original switch. This will not work as MXUEN is in a TCGv and cant be used in an if statement at that level. That is why I plan on putting the MXUEN check in each of the mxu_gen_<ins> functions. What should the re-worked switch statement look like which runs the mxu_gen_<ins> functions? -----Original Message----- From: Aleksandar Markovic <amarko...@wavecomp.com> Sent: Tuesday, August 28, 2018 12:51 PM To: Janeczek, Craig <jancr...@amazon.com>; qemu-devel@nongnu.org Cc: aurel...@aurel32.net Subject: Re: [PATCH v3 2/8] target/mips: Add all MXU opcodes > I see that I can check the loongson instructions by checking for > INSN_LOONGSON2F. Using MXU if that is not set One more thing to check is MXUEN bit of MXU control register. This should be done before handling any MXU instructions, except S32M2I/S32I2M. > What should I check for the mult or misc instructions that were there first? It should be is somewhere in LOONGSON docs.