summaryrefslogtreecommitdiff
path: root/checklink
diff options
context:
space:
mode:
Diffstat (limited to 'checklink')
-rw-r--r--checklink/Asm_printers.ml2
-rw-r--r--checklink/Check.ml22
2 files changed, 24 insertions, 0 deletions
diff --git a/checklink/Asm_printers.ml b/checklink/Asm_printers.ml
index 8bc8caf..794d47a 100644
--- a/checklink/Asm_printers.ml
+++ b/checklink/Asm_printers.ml
@@ -185,6 +185,8 @@ let string_of_instruction = function
| Pmtlr (i0) -> "Pmtlr(" ^ string_of_ireg i0 ^ ")"
| Pmulli (i0, i1, c2) -> "Pmulli(" ^ string_of_ireg i0 ^ ", " ^ string_of_ireg i1 ^ ", " ^ string_of_constant c2 ^ ")"
| Pmullw (i0, i1, i2) -> "Pmullw(" ^ string_of_ireg i0 ^ ", " ^ string_of_ireg i1 ^ ", " ^ string_of_ireg i2 ^ ")"
+| Pmulhw (i0, i1, i2) -> "Pmulhw(" ^ string_of_ireg i0 ^ ", " ^ string_of_ireg i1 ^ ", " ^ string_of_ireg i2 ^ ")"
+| Pmulhwu (i0, i1, i2) -> "Pmulhwu(" ^ string_of_ireg i0 ^ ", " ^ string_of_ireg i1 ^ ", " ^ string_of_ireg i2 ^ ")"
| Pnand (i0, i1, i2) -> "Pnand(" ^ string_of_ireg i0 ^ ", " ^ string_of_ireg i1 ^ ", " ^ string_of_ireg i2 ^ ")"
| Pnor (i0, i1, i2) -> "Pnor(" ^ string_of_ireg i0 ^ ", " ^ string_of_ireg i1 ^ ", " ^ string_of_ireg i2 ^ ")"
| Por (i0, i1, i2) -> "Por(" ^ string_of_ireg i0 ^ ", " ^ string_of_ireg i1 ^ ", " ^ string_of_ireg i2 ^ ")"
diff --git a/checklink/Check.ml b/checklink/Check.ml
index 4097267..be1360d 100644
--- a/checklink/Check.ml
+++ b/checklink/Check.ml
@@ -2104,6 +2104,28 @@ let rec compare_code ccode ecode pc: checker = fun fw ->
>>= recur_simpl
| _ -> error
end
+ | Pmulhw(rd, r1, r2) ->
+ begin match ecode with
+ | MULHWx(rD, rA, rB, rc) :: es ->
+ OK(fw)
+ >>= match_iregs rd rD
+ >>= match_iregs r1 rA
+ >>= match_iregs r2 rB
+ >>= match_bools false rc
+ >>= recur_simpl
+ | _ -> error
+ end
+ | Pmulhwu(rd, r1, r2) ->
+ begin match ecode with
+ | MULHWUx(rD, rA, rB, rc) :: es ->
+ OK(fw)
+ >>= match_iregs rd rD
+ >>= match_iregs r1 rA
+ >>= match_iregs r2 rB
+ >>= match_bools false rc
+ >>= recur_simpl
+ | _ -> error
+ end
| Pnand(rd, r1, r2) ->
begin match ecode with
| NANDx(rS, rA, rB, rc) :: es ->