mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-08-04 02:51:06 +00:00
target/mips: Add nanoMIPS decoding and extraction utilities
Add some basic utility functions and macros for nanoMIPS decoding engine. Backports commit 6bfa9f4c9cf24d6cfaaa227722e9cdcca1ad6fe9 from qemu
This commit is contained in:
parent
5decf2e0ed
commit
bfc5637339
|
@ -16703,6 +16703,17 @@ enum {
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
/* extraction utilities */
|
||||
|
||||
#define NANOMIPS_EXTRACT_RD(op) ((op >> 7) & 0x7)
|
||||
#define NANOMIPS_EXTRACT_RS(op) ((op >> 4) & 0x7)
|
||||
#define NANOMIPS_EXTRACT_RS2(op) uMIPS_RS(op)
|
||||
#define NANOMIPS_EXTRACT_RS1(op) ((op >> 1) & 0x7)
|
||||
#define NANOMIPS_EXTRACT_RD5(op) ((op >> 5) & 0x1f)
|
||||
#define NANOMIPS_EXTRACT_RS5(op) (op & 0x1f)
|
||||
|
||||
|
||||
static int decode_nanomips_opc(CPUMIPSState *env, DisasContext *ctx)
|
||||
{
|
||||
return 2;
|
||||
|
|
Loading…
Reference in a new issue