Commit b7d7e499 authored by Benedikt Geßele's avatar Benedikt Geßele

until SHE, next SIGRIE

parent cc3a8a7f
......@@ -5,6 +5,7 @@ in case i of
| IMM32 i: inner i 32
| BP i: inner i 2
| SA2 i: inner i 2
| OFFSET11 i: inner i 11
| OFFSET23 i: inner i 23
| OFFSET28 i: inner i 28
| C2CONDITION i: inner i 5
......
......@@ -40,6 +40,7 @@ val revision/show/immediate imm =
| IMM32 x: show-int (zx x)
| BP x: show-int (zx x)
| SA2 x: show-int (zx x)
| OFFSET11 x: show-int (zx x)
| OFFSET23 x: show-int (zx x)
| OFFSET28 x: show-int (zx x)
| C2CONDITION x: show-int (zx x)
......
......@@ -906,126 +906,6 @@ val sem-ll x = do
sem-lw x
end
val sem-madd-maddu-msub-msubu ext_op add_sub_op x = do
rs <- rval Signed x.op1;
rt <- rval Signed x.op2;
size <- return (sizeof-rval x.op1);
rs_ext <- mktemp;
ext_op (size*2) rs_ext size rs;
rt_ext <- mktemp;
ext_op (size*2) rt_ext size rt;
res <- mktemp;
mul (size*2) res (var rs_ext) (var rt_ext);
hi <- return (semantic-reg-of Sem_HI);
lo <- return (semantic-reg-of Sem_LO);
hilo <- mktemp;
movzx (size*2) hilo size (var lo);
mov size (at-offset hilo size) (var hi);
add_sub_op (size*2) res (var res) (var hilo);
mov size lo (var res);
mov size hi (var (at-offset res size))
end
val sem-msub x = sem-madd-maddu-msub-msubu movzx sub x
val sem-msubu x = sem-madd-maddu-msub-msubu movzx sub x
val sem-mfhi x = do
hi <- return (semantic-reg-of Sem_HI);
write x.op (var hi)
end
val sem-mflo x = do
lo <- return (semantic-reg-of Sem_LO);
write x.op (var lo)
end
val sem-mthi x = do
rs <- rval Signed x.op;
hi <- return (semantic-reg-of Sem_HI);
mov hi.size hi rs
end
val sem-mtlo x = do
rs <- rval Signed x.op;
lo <- return (semantic-reg-of Sem_LO);
mov lo.size lo rs
end
val sem-movn-movz cmp_op x = do
rs <- rval Signed x.op2;
rt <- rval Signed x.op3;
size <- return (sizeof-rval x.op2);
_if (cmp_op size rt (imm 0)) _then
write x.op1 rs
end
val sem-movn x = sem-movn-movz /neq x
val sem-movz x = sem-movn-movz /eq x
val sem-movf-movt x i = do
rs <- rval Signed x.op2;
cc <- (rval Signed x.op3);
_if (/eq 1 cc (imm i)) _then
write x.op1 rs
end
val sem-movf x = sem-movf-movt x 0
val sem-movt x = sem-movf-movt x 1
val sem-mult-multu ext_op x = do
rs <- rval Signed x.op1;
rt <- rval Signed x.op2;
size <- return (sizeof-rval x.op1);
rs_ext <- mktemp;
ext_op (size*2) rs_ext size rs;
rt_ext <- mktemp;
ext_op (size*2) rt_ext size rt;
res <- mktemp;
mul (size*2) res (var rs_ext) (var rt_ext);
hi <- return (semantic-reg-of Sem_HI);
lo <- return (semantic-reg-of Sem_LO);
mov size lo (var res);
mov size hi (var (at-offset res size))
end
val sem-mult x = sem-mult-multu movsx x
val sem-multu x = sem-mult-multu movzx x
val sem-mul x = do
rs <- rval Signed x.op2;
rt <- rval Signed x.op3;
size <- return (sizeof-rval x.op2);
rs_ext <- mktemp;
movsx (size*2) rs_ext size rs;
rt_ext <- mktemp;
movsx (size*2) rt_ext size rt;
res <- mktemp;
mul (size*2) res (var rs_ext) (var rt_ext);
write x.op1 (var res)
end
val sem-nor x = do
s1 <- rval Unsigned x.op2;
s2 <- rval Unsigned x.op3;
......@@ -1506,45 +1386,20 @@ val semantics i =
| MFC2 x: sem-default-binop-lr-generic i x
| MFHC1 x: sem-default-binop-lr-generic i x
| MFHC2 x: sem-default-binop-lr-generic i x
| MFHI x: sem-mfhi x
| MFLO x: sem-mflo x
| MOV-fmt x: sem-default-binop-flr-generic i x
| MOVF x: sem-movf x
| MOVF-fmt x: sem-default-ternop-flrr-generic i x
| MOVN x: sem-movn x
| MOVN-fmt x: sem-default-ternop-flrr-generic i x
| MOVT x: sem-movt x
| MOVT-fmt x: sem-default-ternop-flrr-generic i x
| MOVZ x: sem-movz x
| MOVZ-fmt x: sem-default-ternop-flrr-generic i x
| MSUB x: sem-msub x
| MSUB-fmt x: sem-default-quadop-flrrr-generic i x
| MSUBU x: sem-msubu x
| MTC0 x: sem-default-ternop-rrr-generic i x
| MTC1 x: sem-default-binop-rl-generic i x
| MTC2 x: sem-default-binop-rr-generic i x
| MTHC1 x: sem-default-binop-rl-generic i x
| MTHC2 x: sem-default-binop-rr-generic i x
| MTHI x: sem-mthi x
| MTLO x: sem-mtlo x
| MUL x: sem-mul x
| MUL-fmt x: sem-default-ternop-flrr-generic i x
| MULT x: sem-mult x
| MULTU x: sem-multu x
| NEG-fmt x: sem-default-binop-flr-generic i x
| NMADD-fmt x: sem-default-quadop-flrrr-generic i x
| NMSUB-fmt x: sem-default-quadop-flrrr-generic i x
| NOR x: sem-nor x
| OR x: sem-or x
| ORI x: sem-ori x
| PAUSE: sem-pause
| PLL-PS x: sem-default-ternop-lrr-generic i x
| PLU-PS x: sem-default-ternop-lrr-generic i x
| PREF x: sem-default-binop-rr-tuple-generic i x
| PREFE x: sem-default-binop-rr-tuple-generic i x
| PREFX x: sem-default-binop-rr-tuple-generic i x
| PUL-PS x: sem-default-ternop-lrr-generic i x
| PUU-PS x: sem-default-ternop-lrr-generic i x
| RDHWR x: sem-rdhwr x
| RDPGPR x: sem-default-binop-lr-generic i x
| RECIP-fmt x: sem-default-binop-flr-generic i x
......@@ -1559,7 +1414,7 @@ val semantics i =
| SCE x: sem-sc x
| SDBBP x: sem-sdbbp x
| SDC1 x: sem-default-binop-rr-tuple-generic i x
| SDXC1 x: sem-default-binop-rr-tuple-generic i x
| SDC2 x: sem-default-binop-rr-tuple-generic i x
| SEB x: sem-seb x
| SEH x: sem-seh x
| SH x: sem-sh x
......
......@@ -162,6 +162,125 @@ end
val sem-madd x = sem-madd-maddu-msub-msubu movsx add x
val sem-maddu x = sem-madd-maddu-msub-msubu movzx add x
val sem-madd-maddu-msub-msubu ext_op add_sub_op x = do
rs <- rval Signed x.op1;
rt <- rval Signed x.op2;
size <- return (sizeof-rval x.op1);
rs_ext <- mktemp;
ext_op (size*2) rs_ext size rs;
rt_ext <- mktemp;
ext_op (size*2) rt_ext size rt;
res <- mktemp;
mul (size*2) res (var rs_ext) (var rt_ext);
hi <- return (semantic-reg-of Sem_HI);
lo <- return (semantic-reg-of Sem_LO);
hilo <- mktemp;
movzx (size*2) hilo size (var lo);
mov size (at-offset hilo size) (var hi);
add_sub_op (size*2) res (var res) (var hilo);
mov size lo (var res);
mov size hi (var (at-offset res size))
end
val sem-msub x = sem-madd-maddu-msub-msubu movzx sub x
val sem-msubu x = sem-madd-maddu-msub-msubu movzx sub x
val sem-mfhi x = do
hi <- return (semantic-reg-of Sem_HI);
write x.op (var hi)
end
val sem-mflo x = do
lo <- return (semantic-reg-of Sem_LO);
write x.op (var lo)
end
val sem-movn-movz cmp_op x = do
rs <- rval Signed x.op2;
rt <- rval Signed x.op3;
size <- return (sizeof-rval x.op2);
_if (cmp_op size rt (imm 0)) _then
write x.op1 rs
end
val sem-movn x = sem-movn-movz /neq x
val sem-movz x = sem-movn-movz /eq x
val sem-movf-movt x i = do
rs <- rval Signed x.op2;
cc <- (rval Signed x.op3);
_if (/eq 1 cc (imm i)) _then
write x.op1 rs
end
val sem-movf x = sem-movf-movt x 0
val sem-movt x = sem-movf-movt x 1
val sem-mthi x = do
rs <- rval Signed x.op;
hi <- return (semantic-reg-of Sem_HI);
mov hi.size hi rs
end
val sem-mtlo x = do
rs <- rval Signed x.op;
lo <- return (semantic-reg-of Sem_LO);
mov lo.size lo rs
end
val sem-mult-multu ext_op x = do
rs <- rval Signed x.op1;
rt <- rval Signed x.op2;
size <- return (sizeof-rval x.op1);
rs_ext <- mktemp;
ext_op (size*2) rs_ext size rs;
rt_ext <- mktemp;
ext_op (size*2) rt_ext size rt;
res <- mktemp;
mul (size*2) res (var rs_ext) (var rt_ext);
hi <- return (semantic-reg-of Sem_HI);
lo <- return (semantic-reg-of Sem_LO);
mov size lo (var res);
mov size hi (var (at-offset res size))
end
val sem-mult x = sem-mult-multu movsx x
val sem-multu x = sem-mult-multu movzx x
val sem-mul x = do
rs <- rval Signed x.op2;
rt <- rval Signed x.op3;
size <- return (sizeof-rval x.op2);
rs_ext <- mktemp;
movsx (size*2) rs_ext size rs;
rt_ext <- mktemp;
movsx (size*2) rt_ext size rt;
res <- mktemp;
mul (size*2) res (var rs_ext) (var rt_ext);
write x.op1 (var res)
end
val revision/semantics i =
......@@ -208,5 +327,30 @@ val revision/semantics i =
| MADD x: sem-madd x
| MADD-fmt x: sem-default-ternop-flrr-generic i x
| MADDU x: sem-maddu x
| SDC2 x: sem-default-binop-rr-tuple-generic i x
| MFHI x: sem-mfhi x
| MFLO x: sem-mflo x
| MOVF x: sem-movf x
| MOVF-fmt x: sem-default-ternop-flrr-generic i x
| MOVN x: sem-movn x
| MOVN-fmt x: sem-default-ternop-flrr-generic i x
| MOVT x: sem-movt x
| MOVT-fmt x: sem-default-ternop-flrr-generic i x
| MOVZ x: sem-movz x
| MOVZ-fmt x: sem-default-ternop-flrr-generic i x
| MSUB x: sem-msub x
| MSUB-fmt x: sem-default-quadop-flrrr-generic i x
| MSUBU x: sem-msubu x
| MTHI x: sem-mthi x
| MTLO x: sem-mtlo x
| MUL x: sem-mul x
| MULT x: sem-mult x
| MULTU x: sem-multu x
| NMADD-fmt x: sem-default-quadop-flrrr-generic i x
| NMSUB-fmt x: sem-default-quadop-flrrr-generic i x
| PLL-PS x: sem-default-ternop-lrr-generic i x
| PLU-PS x: sem-default-ternop-lrr-generic i x
| PREFX x: sem-default-binop-rr-tuple-generic i x
| PUL-PS x: sem-default-ternop-lrr-generic i x
| PUU-PS x: sem-default-ternop-lrr-generic i x
| SDXC1 x: sem-default-binop-rr-tuple-generic i x
end
......@@ -4,6 +4,7 @@ val revision/sizeof-imm imm =
| IMM32 i: 32
| BP i: 2
| SA2 i: 2
| OFFSET11 i: 11
| OFFSET23 i: 23
| OFFSET28 i: 28
| C2CONDITION i: 5
......@@ -21,6 +22,7 @@ in
| IMM32 i: from-vec sn i
| BP i: from-vec sn i
| SA2 i: from-vec sn i
| OFFSET11 i: from-vec sn i
| OFFSET23 i: from-vec sn i
| OFFSET28 i: from-vec sn i
| C2CONDITION i: from-vec sn i
......@@ -279,6 +281,49 @@ val sem-lsa x = do
write x.op1 (var res)
end
val sem-mul-muh-mulu-muhu ext_op hi x = do
rs <- rval Signed x.op2;
rt <- rval Signed x.op3;
size <- return (sizeof-rval x.op2);
rs_ext <- mktemp;
ext_op (size*2) rs_ext size rs;
rt_ext <- mktemp;
ext_op (size*2) rt_ext size rt;
res <- mktemp;
mul (size*2) res (var rs_ext) (var rt_ext);
write x.op1 (var (at-offset res (size*hi)))
end
val sem-mul x = sem-mul-muh-mulu-muhu movsx 0 x
val sem-muh x = sem-mul-muh-mulu-muhu movsx 1 x
val sem-mulu x = sem-mul-muh-mulu-muhu movzx 0 x
val sem-muhu x = sem-mul-muh-mulu-muhu movzx 1 x
val sem-nal = do
pc <- return (semantic-reg-of Sem_PC);
ra <- return (semantic-gpr-of RA);
add ra.size ra (var pc) (imm 4)
end
val sem-sel cmp_op x = do
rs <- rval Signed x.op2;
rt <- rval Signed x.op3;
size <- return (sizeof-rval x.op2);
_if (cmp_op size rt (imm 0)) _then
write x.op1 rs
_else
write x.op1 (imm 0)
end
val sem-seleqz x = sem-sel /eq x
val sem-selnez x = sem-sel /neq x
val revision/semantics i =
case i of
ADDIUPC x: sem-addiupc x
......@@ -330,4 +375,15 @@ val revision/semantics i =
| MAXA-fmt x: sem-default-ternop-flrr-generic i x
| MIN-fmt x: sem-default-ternop-flrr-generic i x
| MINA-fmt x: sem-default-ternop-flrr-generic i x
| MUL x: sem-mul x
| MUH x: sem-muh x
| MULU x: sem-mulu x
| MUHU x: sem-muhu x
| NAL: sem-nal
| RINT-fmt x: sem-default-binop-flr-generic i x
| SEL-fmt x: sem-default-ternop-flrr-generic i x
| SELEQZ x: sem-seleqz x
| SELNEZ x: sem-selnez x
| SELEQZ-fmt x: sem-default-ternop-flrr-generic i x
| SELNEQZ-fmt x: sem-default-ternop-flrr-generic i x
end
......@@ -91,45 +91,20 @@ val traverse f insn =
| MFC2 x: f "MFC2" (BINOP_LR x)
| MFHC1 x: f "MFHC1" (BINOP_LR x)
| MFHC2 x: f "MFHC2" (BINOP_LR x)
| MFHI x: f "MFHI" (UNOP_L x)
| MFLO x: f "MFLO" (UNOP_L x)
| MOV-fmt x: f "MOV" (BINOP_FLR x)
| MOVF x: f "MOVF" (TERNOP_LRR x)
| MOVF-fmt x: f "MOVF" (TERNOP_FLRR x)
| MOVN x: f "MOVN" (TERNOP_LRR x)
| MOVN-fmt x: f "MOVN" (TERNOP_FLRR x)
| MOVT x: f "MOVT" (TERNOP_LRR x)
| MOVT-fmt x: f "MOVT" (TERNOP_FLRR x)
| MOVZ x: f "MOVZ" (TERNOP_LRR x)
| MOVZ-fmt x: f "MOVZ" (TERNOP_FLRR x)
| MSUB x: f "MSUB" (BINOP_RR x)
| MSUB-fmt x: f "MSUB" (QUADOP_FLRRR x)
| MSUBU x: f "MSUBU" (BINOP_RR x)
| MTC0 x: f "MTC0" (TERNOP_RRR x)
| MTC1 x: f "MTC1" (BINOP_RL x)
| MTC2 x: f "MTC2" (BINOP_RR x)
| MTHC1 x: f "MTHC1" (BINOP_RL x)
| MTHC2 x: f "MTHC2" (BINOP_RR x)
| MTHI x: f "MTHI" (UNOP_R x)
| MTLO x: f "MTLO" (UNOP_R x)
| MUL x: f "MUL" (TERNOP_LRR x)
| MUL-fmt x: f "MUL" (TERNOP_FLRR x)
| MULT x: f "MULT" (BINOP_RR x)
| MULTU x: f "MULTU" (BINOP_RR x)
| NEG-fmt x: f "NEG" (BINOP_FLR x)
| NMADD-fmt x: f "NMADD" (QUADOP_FLRRR x)
| NMSUB-fmt x: f "NMSUB" (QUADOP_FLRRR x)
| NOR x: f "NOR" (TERNOP_LRR x)
| OR x: f "OR" (TERNOP_LRR x)
| ORI x: f "ORI" (TERNOP_LRR x)
| PAUSE: f "PAUSE" (NULLOP)
| PLL-PS x: f "PLL.PS" (TERNOP_LRR x)
| PLU-PS x: f "PLU.PS" (TERNOP_LRR x)
| PREF x: f "PREF" (BINOP_RR x)
| PREFE x: f "PREFE" (BINOP_RR x)
| PREFX x: f "PREFX" (BINOP_RR x)
| PUL-PS x: f "PUL.PS" (TERNOP_LRR x)
| PUU-PS x: f "PUU.PS" (TERNOP_LRR x)
| RDHWR x: f "RDHWR" (BINOP_LR x)
| RDPGPR x: f "RDPGPR" (BINOP_LR x)
| RECIP-fmt x: f "RECIP" (BINOP_FLR x)
......@@ -144,7 +119,7 @@ val traverse f insn =
| SCE x: f "SCE" (BINOP_LR x)
| SDBBP x: f "SDBBP" (UNOP_R x)
| SDC1 x: f "SDC1" (BINOP_RR x)
| SDXC1 x: f "SDXC1" (BINOP_RR x)
| SDC2 x: f "SDC2" (BINOP_RR x)
| SEB x: f "SEB" (BINOP_LR x)
| SEH x: f "SEH" (BINOP_LR x)
| SH x: f "SH" (BINOP_RR x)
......
......@@ -42,5 +42,30 @@ val revision/traverse f insn =
| MADD x: f "MADD" (BINOP_RR x)
| MADD-fmt x: f "MADD" (QUADOP_FLRRR x)
| MADDU x: f "MADDU" (BINOP_RR x)
| SDC2 x: f "SDC2" (BINOP_RR x)
| MFHI x: f "MFHI" (UNOP_L x)
| MFLO x: f "MFLO" (UNOP_L x)
| MOVF x: f "MOVF" (TERNOP_LRR x)
| MOVF-fmt x: f "MOVF" (TERNOP_FLRR x)
| MOVN x: f "MOVN" (TERNOP_LRR x)
| MOVN-fmt x: f "MOVN" (TERNOP_FLRR x)
| MOVT x: f "MOVT" (TERNOP_LRR x)
| MOVT-fmt x: f "MOVT" (TERNOP_FLRR x)
| MOVZ x: f "MOVZ" (TERNOP_LRR x)
| MOVZ-fmt x: f "MOVZ" (TERNOP_FLRR x)
| MSUB x: f "MSUB" (BINOP_RR x)
| MSUB-fmt x: f "MSUB" (QUADOP_FLRRR x)
| MSUBU x: f "MSUBU" (BINOP_RR x)
| MTHI x: f "MTHI" (UNOP_R x)
| MTLO x: f "MTLO" (UNOP_R x)
| MUL x: f "MUL" (TERNOP_LRR x)
| MULT x: f "MULT" (BINOP_RR x)
| MULTU x: f "MULTU" (BINOP_RR x)
| NMADD-fmt x: f "NMADD" (QUADOP_FLRRR x)
| NMSUB-fmt x: f "NMSUB" (QUADOP_FLRRR x)
| PLL-PS x: f "PLL.PS" (TERNOP_LRR x)
| PLU-PS x: f "PLU.PS" (TERNOP_LRR x)
| PREFX x: f "PREFX" (BINOP_RR x)
| PUL-PS x: f "PUL.PS" (TERNOP_LRR x)
| PUU-PS x: f "PUU.PS" (TERNOP_LRR x)
| SDXC1 x: f "SDXC1" (BINOP_RR x)
end
......@@ -49,4 +49,15 @@ val revision/traverse f insn =
| MAXA-fmt x: f "MAXA" (TERNOP_FLRR x)
| MIN-fmt x: f "MIN" (TERNOP_FLRR x)
| MINA-fmt x: f "MINA" (TERNOP_FLRR x)
| MUL x: f "MUL" (TERNOP_LRR x)
| MUH x: f "MUH" (TERNOP_LRR x)
| MULU x: f "MULU" (TERNOP_LRR x)
| MUHU x: f "MUHU" (TERNOP_LRR x)
| NAL: f "NAL" (NULLOP)
| RINT-fmt x: f "RINT" (BINOP_FLR x)
| SEL-fmt x: f "SEL" (TERNOP_FLRR x)
| SELEQZ x: f "SELEQZ" (TERNOP_LRR x)
| SELNEZ x: f "SELNEZ" (TERNOP_LRR x)
| SELEQZ-fmt x: f "SELEQZ" (TERNOP_FLRR x)
| SELNEQZ-fmt x: f "SELNEQZ" (TERNOP_FLRR x)
end
......@@ -420,62 +420,6 @@ val / ['010010 00011 /rt /impl']
| asimpl? = nullop UNDEFINED
| otherwise = binop MFHC2 rt impl
### MFHI
### - Move From HI Register
val / ['000000 0000000000 /rd 00000 010000'] = unop MFHI rd
### MFLO
### - Move From LO Register
val / ['000000 0000000000 /rd 00000 010010'] = unop MFLO rd
### MOV-fmt
### - Floating Point Move
val / ['010001 /fmt5sdps 00000 /fs /fd 000110'] = binop-fmt MOV-fmt fmt fd (right fs)
### MOVF
### - Move Conditional on Floating Point False
val / ['000000 /rs /cc 0 0 /rd 00000 000001'] = ternop MOVF rd (right rs) (right fcc)
### MOVF-fmt
### - Floating Point Move Conditional on Floating Point False
val / ['010001 /fmt5sdps /cc 0 0 /fs /fd 010001'] = ternop-fmt MOVF-fmt fmt fd (right fs) (right fcc)
### MOVN
### - Move Conditional on Not Zero
val / ['000000 /rs /rt /rd 00000 001011'] = ternop MOVN rd (right rs) (right rt)
### MOVN-fmt
### - Floating Point Move Conditional on Not Zero
val / ['010001 /fmt5sdps /rt /fs /fd 010011'] = ternop-fmt MOVN-fmt fmt fd (right fs) (right rt)
### MOVT
### - Move Conditional on Floating Point True
val / ['000000 /rs /cc 0 1 /rd 00000 000001'] = ternop MOVT rd (right rs) (right fcc)
### MOVT-fmt
### - Floating Point Move Conditional on Floating Point True
val / ['010001 /fmt5sdps /cc 0 1 /fs /fd 010001'] = ternop-fmt MOVT-fmt fmt fd (right fs) (right fcc)
### MOVZ
### - Move Conditional on Not Zero
val / ['000000 /rs /rt /rd 00000 001010'] = ternop MOVZ rd (right rs) (right rt)
### MOVZ-fmt
### - Floating Point Move Conditional on Zero
val / ['010001 /fmt5sdps /rt /fs /fd 010010'] = ternop-fmt MOVZ-fmt fmt fd (right fs) (right rt)
### MSUB
### - Multiply and Subtract Word to Hi,Lo
val / ['011100 /rs /rt 00000 00000 000100'] = binop MSUB (right rs) (right rt)
### MSUB-fmt
### - Floating Point Multiply Subtract
val / ['010011 /fr /ft /fs /fd 101 /fmt3sdps'] = quadop-fmt MSUB-fmt fmt fd (right fr) (right fs) (right ft)
### MSUBU
### - Multiply and Subtract Word to Hi,Lo
val / ['011100 /rs /rt 00000 00000 000101'] = binop MSUBU (right rs) (right rt)
### MTC0
### - Move to Coprocessor 0
val / ['010000 00100 /rt /rd 00000000 /sel'] = ternop MTC0 (right rt) rd/imm sel
......@@ -500,42 +444,6 @@ val / ['010010 00111 /rt /impl']
| asimpl? = nullop UNDEFINED
| otherwise = binop MTHC2 (right rt) impl
### MTHI
### - Move To HI Register
val / ['000000 /rs 000000000000000 010001'] = unop MTHI (right rs)
### MTLO
### - Move To LO Register
val / ['000000 /rs 000000000000000 010011'] = unop MTLO (right rs)
### MUL
### - Multiply Word to GPR
val / ['011100 /rs /rt /rd 00000 000010'] = ternop MUL rd (right rs) (right rt)
### MUL-fmt
### - Floating Point Multiply
val / ['010001 /fmt5sdps /ft /fs /fd 000010'] = ternop-fmt MUL-fmt fmt fd (right fs) (right ft)
### MULT
### - Multiply Word
val / ['000000 /rs /rt 0000000000 011000'] = binop MULT (right rs) (right rt)
### MULTU
### - Multiply Unsigned Word
val / ['000000 /rs /rt 0000000000 011001'] = binop MULTU (right rs) (right rt)
### NEG-fmt
### - Floating Point Negate
val / ['010001 /fmt5sdps 00000 /fs /fd 000111'] = binop-fmt NEG-fmt fmt fd (right fs)
### NMADD-fmt
### - Floating Point Negative Multiply Add
val / ['010011 /fr /ft /fs /fd 110 /fmt3sdps'] = quadop-fmt NMADD-fmt fmt fd (right fr) (right fs) (right ft)
### NMSUB-fmt
### - Floating Point Negative Multiply Subtract
val / ['010011 /fr /ft /fs /fd 111 /fmt3sdps'] = quadop-fmt NMSUB-fmt fmt fd (right fr) (right fs) (right ft)
### NOP
### - No Operation
### => see SLL r0, r0, 0
......@@ -556,36 +464,12 @@ val / ['001101 /rs /rt /immediate16'] = ternop ORI rt (right rs) immediate16
### - Wait for the LLBit to clear
### => see SLL r0, r0, 5
### PLL-PS
### - Pair Lower Lower
val / ['010001 10110 /ft /fs /fd 101100'] = ternop PLL-PS fd (right fs) (right ft)
### PLU-PS
### - Pair Lower Upper
val / ['010001 10110 /ft /fs /fd 101101'] = ternop PLU-PS fd (right fs) (right ft)
### PREF
### - Prefetch
val / ['110011 /base /hint5 /offset16'] = binop PREF hint5 offset16/base
### PREFE
### - Prefetch EVA
val / ['011111 /base /hint5 /offset9 0 100011']
| asmode? = nullop UNDEFINED
| otherwise = binop PREFE hint5 offset9/base
### PREFX
### - Prefetch Indexed