test_cases:
  -
    input:
      bytes: [ 0x43, 0xf5, 0xc5, 0x6c ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmadd.h a0, a1, a2, a3, dyn"

  -
    input:
      bytes: [ 0x47, 0xf7, 0x07, 0x8d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmsub.h a4, a5, a6, a7, dyn"

  -
    input:
      bytes: [ 0x4b, 0xf9, 0x49, 0xad ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmsub.h s2, s3, s4, s5, dyn"

  -
    input:
      bytes: [ 0x4f, 0xfb, 0x8b, 0xcd ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmadd.h s6, s7, s8, s9, dyn"

  -
    input:
      bytes: [ 0x53, 0xfd, 0xcd, 0x05 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fadd.h s10, s11, t3, dyn"

  -
    input:
      bytes: [ 0xd3, 0x7e, 0xff, 0x0d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsub.h t4, t5, t6, dyn"

  -
    input:
      bytes: [ 0x53, 0xf4, 0x24, 0x15 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmul.h s0, s1, s2, dyn"

  -
    input:
      bytes: [ 0xd3, 0x79, 0x5a, 0x1d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fdiv.h s3, s4, s5, dyn"

  -
    input:
      bytes: [ 0x53, 0xfb, 0x0b, 0x5c ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsqrt.h s6, s7, dyn"

  -
    input:
      bytes: [ 0xd3, 0x04, 0xb5, 0x24 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsgnj.h s1, a0, a1"

  -
    input:
      bytes: [ 0xd3, 0x95, 0xe6, 0x24 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsgnjn.h a1, a3, a4"

  -
    input:
      bytes: [ 0x53, 0xa7, 0xc6, 0x24 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsgnjx.h a4, a3, a2"

  -
    input:
      bytes: [ 0xd3, 0x07, 0x18, 0x2d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmin.h a5, a6, a7"

  -
    input:
      bytes: [ 0x53, 0x99, 0x49, 0x2d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmax.h s2, s3, s4"

  -
    input:
      bytes: [ 0x53, 0xf5, 0x0a, 0xc4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.w.h a0, s5, dyn"

  -
    input:
      bytes: [ 0xd3, 0x75, 0x1b, 0xc4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.wu.h a1, s6, dyn"

  -
    input:
      bytes: [ 0xd3, 0x25, 0x9c, 0xa5 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "feq.h a1, s8, s9"

  -
    input:
      bytes: [ 0x53, 0x16, 0xbd, 0xa5 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "flt.h a2, s10, s11"

  -
    input:
      bytes: [ 0xd3, 0x06, 0xde, 0xa5 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fle.h a3, t3, t4"

  -
    input:
      bytes: [ 0xd3, 0x16, 0x0f, 0xe4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fclass.h a3, t5"

  -
    input:
      bytes: [ 0xd3, 0x7f, 0x07, 0xd4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.h.w t6, a4, dyn"

  -
    input:
      bytes: [ 0x53, 0xf4, 0x17, 0xd4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.h.wu s0, a5, dyn"

  -
    input:
      bytes: [ 0x43, 0x85, 0xc5, 0x6c ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmadd.h a0, a1, a2, a3, rne"

  -
    input:
      bytes: [ 0x47, 0x97, 0x07, 0x8d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmsub.h a4, a5, a6, a7, rtz"

  -
    input:
      bytes: [ 0x4b, 0xa9, 0x49, 0xad ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmsub.h s2, s3, s4, s5, rdn"

  -
    input:
      bytes: [ 0x4f, 0xbb, 0x8b, 0xcd ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fnmadd.h s6, s7, s8, s9, rup"

  -
    input:
      bytes: [ 0x43, 0xc5, 0xc5, 0x6c ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmadd.h a0, a1, a2, a3, rmm"

  -
    input:
      bytes: [ 0x53, 0x8d, 0xcd, 0x05 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fadd.h s10, s11, t3, rne"

  -
    input:
      bytes: [ 0xd3, 0x1e, 0xff, 0x0d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsub.h t4, t5, t6, rtz"

  -
    input:
      bytes: [ 0x53, 0xa4, 0x24, 0x15 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fmul.h s0, s1, s2, rdn"

  -
    input:
      bytes: [ 0xd3, 0x39, 0x5a, 0x1d ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fdiv.h s3, s4, s5, rup"

  -
    input:
      bytes: [ 0x53, 0xcb, 0x0b, 0x5c ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fsqrt.h s6, s7, rmm"

  -
    input:
      bytes: [ 0x53, 0xb5, 0x0a, 0xc4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.w.h a0, s5, rup"

  -
    input:
      bytes: [ 0xd3, 0x25, 0x1b, 0xc4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.wu.h a1, s6, rdn"

  -
    input:
      bytes: [ 0xd3, 0x1f, 0x07, 0xd4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.h.w t6, a4, rtz"

  -
    input:
      bytes: [ 0x53, 0x84, 0x17, 0xd4 ]
      arch: "CS_ARCH_RISCV"
      options: [ "CS_MODE_RISCV32", "CS_MODE_RISCV_ZFINX", "CS_OPT_SYNTAX_NO_ALIAS_TEXT" ]
    expected:
      insns:
        -
          asm_text: "fcvt.h.wu s0, a5, rne"
