diff --git a/bindings/ocaml/ocaml.c b/bindings/ocaml/ocaml.c index c586f8bc..f2de8f4a 100644 --- a/bindings/ocaml/ocaml.c +++ b/bindings/ocaml/ocaml.c @@ -811,21 +811,24 @@ CAMLprim value ocaml_open(value _arch, value _mode) mode |= CS_MODE_MCLASS; break; case 7: - mode |= CS_MODE_MICRO; + mode |= CS_MODE_V8; break; case 8: - mode |= CS_MODE_MIPS3; + mode |= CS_MODE_MICRO; break; case 9: - mode |= CS_MODE_MIPS32R6; + mode |= CS_MODE_MIPS3; break; case 10: - mode |= CS_MODE_MIPSGP64; + mode |= CS_MODE_MIPS32R6; break; case 11: - mode |= CS_MODE_V9; + mode |= CS_MODE_MIPSGP64; break; case 12: + mode |= CS_MODE_V9; + break; + case 13: mode |= CS_MODE_BIG_ENDIAN; break; default: diff --git a/bindings/ocaml/test_ppc.ml b/bindings/ocaml/test_ppc.ml index 5f74a0c9..75da948b 100644 --- a/bindings/ocaml/test_ppc.ml +++ b/bindings/ocaml/test_ppc.ml @@ -31,6 +31,14 @@ let print_op handle i op = if mem.disp != 0 then printf "\t\t\toperands[%u].mem.disp: 0x%x\n" i mem.disp; ); + | PPC_OP_CRX crx -> ( printf "\t\top[%d]: CRX\n" i; + if crx.scale != 0 then + printf "\t\t\toperands[%u].crx.scale = %u\n" i crx.scale; + if crx.reg != 0 then + printf "\t\t\toperands[%u].crx.reg = %s\n" i (cs_reg_name handle crx.reg); + if crx.cond != 0 then + printf "\t\t\toperands[%u].crx.cond = 0x%x\n" i crx.cond; + ); ); ();;