Blame SOURCES/gdb-rhbz1320945-power9-24of38.patch

a094f6
commit a680de9a980e9d268846e8605af14ba1e7f3a39b
a094f6
Author: Peter Bergner <bergner@vnet.ibm.com>
a094f6
Date:   Wed Nov 11 19:52:52 2015 -0600
a094f6
a094f6
    Add assembler, disassembler and linker support for power9.
a094f6
    
a094f6
    include/opcode/
a094f6
            * ppc.h (PPC_OPCODE_POWER9): New define.
a094f6
            (PPC_OPCODE_VSX3): Likewise.
a094f6
    
a094f6
    opcodes/
a094f6
            * ppc-dis.c (ppc_opts): Add "power9" and "pwr9" entries.
a094f6
            Add PPC_OPCODE_VSX3 to the vsx entry.
a094f6
            (powerpc_init_dialect): Set default dialect to power9.
a094f6
            * ppc-opc.c (insert_dcmxs, extract_dcmxs, insert_dxd, extract_dxd,
a094f6
            insert_dxdn, extract_dxdn, insert_l0, extract_l0, insert_l1,
a094f6
            extract_l1 insert_xtq6, extract_xtq6): New static functions.
a094f6
            (insert_esync): Test for illegal L operand value.
a094f6
            (DCMX, DCMXS, DXD, NDXD, L0, L1, RC, FC, UIM6, X_R, RIC, PRS, XSQ6,
a094f6
            XTQ6, LRAND, IMM8, DQX, DQX_MASK, DX, DX_MASK, VXVAPS_MASK, VXVA,XVA,
a094f6
            XX2VA, XVARC, XBF_MASK, XX2UIM4_MASK, XX2BFD_MASK, XX2DCMXS_MASK,
a094f6
            XVA_MASK, XRLA_MASK, XBFRARB_MASK, XLRAND_MASK, POWER9, PPCVEC3,
a094f6
            PPCVSX3): New defines.
a094f6
            (powerpc_opcodes) 
a094f6
            fcmpo, ftdiv, ftsqrt>: Use XBF_MASK.
a094f6
            <mcrxr>: Use XBFRARB_MASK.
a094f6
            
a094f6
            bcdctz., bcds., bcdsetsgn., bcdsr., bcdtrunc., bcdus., bcdutrunc.,
a094f6
            cmpeqb, cmprb, cnttzd, cnttzd., cnttzw, cnttzw., copy, copy_first,
a094f6
            cp_abort, darn, dtstsfi, dtstsfiq, extswsli, extswsli., ldat, ldmx,
a094f6
            lwat, lxsd, lxsibzx, lxsihzx, lxssp, lxv, lxvb16x, lxvh8x, lxvl, lxvll,
a094f6
            lxvwsx, lxvx, maddhd, maddhdu, maddld, mcrxrx, mfvsrld, modsd, modsw,
a094f6
            modud, moduw, msgsync, mtvsrdd, mtvsrws, paste, paste., paste_last,
a094f6
            rmieg, setb, slbieg, slbsync, stdat, stop, stwat, stxsd, stxsibx,
a094f6
            stxsihx, stxssp, stxv, stxvb16x, stxvh8x, stxvl, stxvll, stxvx,
a094f6
            subpcis, urfid, vbpermd, vclzlsbb, vcmpneb, vcmpneb., vcmpneh,
a094f6
            vcmpneh., vcmpnew, vcmpnew., vcmpnezb, vcmpnezb., vcmpnezh, vcmpnezh.,
a094f6
            vcmpnezw, vcmpnezw., vctzb, vctzd, vctzh, vctzlsbb, vctzw, vextractd,
a094f6
            vextractub, vextractuh, vextractuw, vextsb2d, vextsb2w, vextsh2d,
a094f6
            vextsh2w, vextsw2d, vextublx, vextubrx, vextuhlx, vextuhrx, vextuwlx,
a094f6
            vextuwrx, vinsertb, vinsertd, vinserth, vinsertw, vmul10cuq,
a094f6
            vmul10ecuq, vmul10euq, vmul10uq, vnegd, vnegw, vpermr, vprtybd,
a094f6
            vprtybq, vprtybw, vrldmi, vrldnm, vrlwmi, vrlwnm, vslv, vsrv, wait,
a094f6
            xsabsqp, xsaddqp, xsaddqpo, xscmpeqdp, xscmpexpdp, xscmpexpqp,
a094f6
            xscmpgedp, xscmpgtdp, xscmpnedp, xscmpoqp, xscmpuqp, xscpsgnqp,
a094f6
            xscvdphp, xscvdpqp, xscvhpdp, xscvqpdp, xscvqpdpo, xscvqpsdz,
a094f6
            xscvqpswz, xscvqpudz, xscvqpuwz, xscvsdqp, xscvudqp, xsdivqp,
a094f6
            xsdivqpo, xsiexpdp, xsiexpqp, xsmaddqp, xsmaddqpo, xsmaxcdp,
a094f6
            xsmaxjdp, xsmincdp, xsminjdp, xsmsubqp, xsmsubqpo, xsmulqp, xsmulqpo,
a094f6
            xsnabsqp, xsnegqp, xsnmaddqp, xsnmaddqpo, xsnmsubqp, xsnmsubqpo,
a094f6
            xsrqpi, xsrqpix, xsrqpxp, xssqrtqp, xssqrtqpo, xssubqp, xssubqpo,
a094f6
            xststdcdp, xststdcqp, xststdcsp, xsxexpdp, xsxexpqp, xsxsigdp,
a094f6
            xsxsigqp, xvcmpnedp, xvcmpnedp., xvcmpnesp, xvcmpnesp., xvcvhpsp,
a094f6
            xvcvsphp, xviexpdp, xviexpsp, xvtstdcdp, xvtstdcsp, xvxexpdp,
a094f6
            xvxexpsp, xvxsigdp, xvxsigsp, xxbrd, xxbrh, xxbrq, xxbrw, xxextractuw,
a094f6
            xxinsertw, xxperm, xxpermr, xxspltib>: New instructions.
a094f6
            <doze, nap, sleep, rvwinkle, waitasec, lxvx, stxvx>: Disable on POWER9.
a094f6
            <tlbiel, tlbie, sync, slbmfev, slbmfee>: Add additional operands.
a094f6
    
a094f6
    include/elf/
a094f6
            * ppc.h (R_PPC_REL16DX_HA): New reloction.
a094f6
            * ppc64.h (R_PPC64_REL16DX_HA): Likewise.
a094f6
    
a094f6
    bfd/
a094f6
            * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
a094f6
            (ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
a094f6
            (ppc_elf_addr16_ha_reloc): Likewise.
a094f6
            (ppc_elf_check_relocs): Likewise.
a094f6
            (ppc_elf_relocate_section): Likewise.
a094f6
            (is_insn_dq_form): Handle lxv and stxv instructions.
a094f6
            * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
a094f6
            (ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
a094f6
            (ppc64_elf_ha_reloc): Likewise.
a094f6
            (ppc64_elf_check_relocs): Likewise.
a094f6
            (ppc64_elf_relocate_section): Likewise.
a094f6
            * bfd-in2.h: Regenerate.
a094f6
            * libbfd.h: Likewise.
a094f6
            * reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
a094f6
    
a094f6
    elfcpp/
a094f6
            * powerpc.h (R_POWERPC_REL16DX_HA): Define.
a094f6
    
a094f6
    gas/
a094f6
            * doc/as.texinfo (Target PowerPC): Document -mpower9 and -mpwr9.
a094f6
            * doc/c-ppc.texi (PowerPC-Opts):  Likewise.
a094f6
            * config/tc-ppc.c (md_show_usage): Likewise.
a094f6
            (md_assemble): Handle BFD_RELOC_PPC_REL16DX_HA.
a094f6
            (md_apply_fix): Likewise.
a094f6
            (ppc_handle_align): Handle power9's group ending nop.
a094f6
    
a094f6
    gas/testsuite/
a094f6
            * gas/ppc/altivec3.s: New test.
a094f6
            * gas/ppc/altivec3.d: Likewise.
a094f6
            * gas/ppc/vsx3.s: Likewise.
a094f6
            * gas/ppc/vsx3.d: Likewise.
a094f6
            * gas/ppc/power9.s: Likewise.
a094f6
            * gas/ppc/power9.d: Likewise.
a094f6
            * gas/ppc/ppc.exp: Run them.
a094f6
            * gas/ppc/power8.s <lxvx, lxvd2x, stxvx, stxvd2x>: Add new tests.
a094f6
            * gas/ppc/power8.d: Likewise.
a094f6
            * gas/ppc/vsx.s: <lxvx, stxvx>: Rename invalid mnemonics ...
a094f6
            <lxvd2x, stxvd2x>: ...to this.
a094f6
            * gas/ppc/vsx.d: Likewise.
a094f6
    
a094f6
    gold/
a094f6
            * gold/powerpc.cc (Powerpc_relocate_functions::addr16_dq): New function.
a094f6
            (Powerpc_relocate_functions::addr16dx_ha): Likewise.
a094f6
            (Target_powerpc::Scan::local): Handle R_POWERPC_REL16DX_HA.
a094f6
            (Target_powerpc::Scan::global): Likewise.
a094f6
            (Target_powerpc::Relocate::relocate): Likewise.
a094f6
    
a094f6
    ld/testsuite/
a094f6
            * ld-powerpc/addpcis.d: New test.
a094f6
            * ld-powerpc/addpcis.s: New test.
a094f6
            * ld-powerpc/powerpc.exp: Run it.
a094f6
a094f6
### a/bfd/ChangeLog
a094f6
### b/bfd/ChangeLog
a094f6
## -1,3 +1,21 @@
a094f6
+2015-11-11  Alan Modra  <amodra@gmail.com>
a094f6
+            Peter Bergner <bergner@vnet.ibm.com>
a094f6
+
a094f6
+	* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_REL16DX_HA.
a094f6
+	(ppc_elf_reloc_type_lookup): Handle R_PPC_REL16DX_HA.
a094f6
+	(ppc_elf_addr16_ha_reloc): Likewise.
a094f6
+	(ppc_elf_check_relocs): Likewise.
a094f6
+	(ppc_elf_relocate_section): Likewise.
a094f6
+	(is_insn_dq_form): Handle lxv and stxv instructions.
a094f6
+	* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_REL16DX_HA.
a094f6
+	(ppc64_elf_reloc_type_lookup): Handle R_PPC64_REL16DX_HA.
a094f6
+	(ppc64_elf_ha_reloc): Likewise.
a094f6
+	(ppc64_elf_check_relocs): Likewise.
a094f6
+	(ppc64_elf_relocate_section): Likewise.
a094f6
+	* bfd-in2.h: Regenerate.
a094f6
+	* libbfd.h: Likewise.
a094f6
+	* reloc.c (BFD_RELOC_PPC_REL16DX_HA): New.
a094f6
+
a094f6
 2015-11-10  H.J. Lu  <hongjiu.lu@intel.com>
a094f6
 
a094f6
 	* elf32-i386.c (elf_i386_relocate_section): Handle VTINHERIT
a094f6
--- a/bfd/bfd-in2.h
a094f6
+++ b/bfd/bfd-in2.h
a094f6
@@ -3303,6 +3303,7 @@ instruction.  */
a094f6
   BFD_RELOC_PPC_VLE_SDAREL_HI16D,
a094f6
   BFD_RELOC_PPC_VLE_SDAREL_HA16A,
a094f6
   BFD_RELOC_PPC_VLE_SDAREL_HA16D,
a094f6
+  BFD_RELOC_PPC_REL16DX_HA,
a094f6
   BFD_RELOC_PPC64_HIGHER,
a094f6
   BFD_RELOC_PPC64_HIGHER_S,
a094f6
   BFD_RELOC_PPC64_HIGHEST,
a094f6
--- a/bfd/elf32-ppc.c
a094f6
+++ b/bfd/elf32-ppc.c
a094f6
@@ -1731,6 +1731,21 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
a094f6
 	 0xffff,		/* dst_mask */
a094f6
 	 TRUE),			/* pcrel_offset */
a094f6
 
a094f6
+  /* Like R_PPC_REL16_HA but for split field in addpcis.  */
a094f6
+  HOWTO (R_PPC_REL16DX_HA,	/* type */
a094f6
+	 16,			/* rightshift */
a094f6
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
a094f6
+	 16,			/* bitsize */
a094f6
+	 TRUE,			/* pc_relative */
a094f6
+	 0,			/* bitpos */
a094f6
+	 complain_overflow_signed, /* complain_on_overflow */
a094f6
+	 ppc_elf_addr16_ha_reloc, /* special_function */
a094f6
+	 "R_PPC_REL16DX_HA",	/* name */
a094f6
+	 FALSE,			/* partial_inplace */
a094f6
+	 0,			/* src_mask */
a094f6
+	 0x1fffc1,		/* dst_mask */
a094f6
+	 TRUE),			/* pcrel_offset */
a094f6
+
a094f6
   /* GNU extension to record C++ vtable hierarchy.  */
a094f6
   HOWTO (R_PPC_GNU_VTINHERIT,	/* type */
a094f6
 	 0,			/* rightshift */
a094f6
@@ -1989,6 +2004,7 @@ ppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
a094f6
     case BFD_RELOC_LO16_PCREL:		r = R_PPC_REL16_LO;		break;
a094f6
     case BFD_RELOC_HI16_PCREL:		r = R_PPC_REL16_HI;		break;
a094f6
     case BFD_RELOC_HI16_S_PCREL:	r = R_PPC_REL16_HA;		break;
a094f6
+    case BFD_RELOC_PPC_REL16DX_HA:	r = R_PPC_REL16DX_HA;		break;
a094f6
     case BFD_RELOC_VTABLE_INHERIT:	r = R_PPC_GNU_VTINHERIT;	break;
a094f6
     case BFD_RELOC_VTABLE_ENTRY:	r = R_PPC_GNU_VTENTRY;		break;
a094f6
     }
a094f6
@@ -2058,7 +2074,10 @@ ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED,
a094f6
 			 bfd *output_bfd,
a094f6
 			 char **error_message ATTRIBUTE_UNUSED)
a094f6
 {
a094f6
-  bfd_vma relocation;
a094f6
+  enum elf_ppc_reloc_type r_type;
a094f6
+  long insn;
a094f6
+  bfd_size_type octets;
a094f6
+  bfd_vma value;
a094f6
 
a094f6
   if (output_bfd != NULL)
a094f6
     {
a094f6
@@ -2066,20 +2085,28 @@ ppc_elf_addr16_ha_reloc (bfd *abfd ATTRIBUTE_UNUSED,
a094f6
       return bfd_reloc_ok;
a094f6
     }
a094f6
 
a094f6
-  if (bfd_is_com_section (symbol->section))
a094f6
-    relocation = 0;
a094f6
-  else
a094f6
-    relocation = symbol->value;
a094f6
-
a094f6
-  relocation += symbol->section->output_section->vma;
a094f6
-  relocation += symbol->section->output_offset;
a094f6
-  relocation += reloc_entry->addend;
a094f6
-  if (reloc_entry->howto->pc_relative)
a094f6
-    relocation -= reloc_entry->address;
a094f6
-
a094f6
-  reloc_entry->addend += (relocation & 0x8000) << 1;
a094f6
-
a094f6
-  return bfd_reloc_continue;
a094f6
+  reloc_entry->addend += 0x8000;
a094f6
+  r_type = reloc_entry->howto->type;
a094f6
+  if (r_type != R_PPC_REL16DX_HA)
a094f6
+    return bfd_reloc_continue;
a094f6
+
a094f6
+  value = 0;
a094f6
+  if (!bfd_is_com_section (symbol->section))
a094f6
+    value = symbol->value;
a094f6
+  value += (reloc_entry->addend
a094f6
+	    + symbol->section->output_offset
a094f6
+	    + symbol->section->output_section->vma);
a094f6
+  value -= (reloc_entry->address
a094f6
+	    + input_section->output_offset
a094f6
+	    + input_section->output_section->vma);
a094f6
+  value >>= 16;
a094f6
+
a094f6
+  octets = reloc_entry->address * bfd_octets_per_byte (abfd);
a094f6
+  insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
a094f6
+  insn &= ~0x1fffc1;
a094f6
+  insn |= (value & 0xffc1) | ((value & 0x3e) << 15);
a094f6
+  bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
a094f6
+  return bfd_reloc_ok;
a094f6
 }
a094f6
 
a094f6
 static bfd_reloc_status_type
a094f6
@@ -4247,6 +4274,7 @@ ppc_elf_check_relocs (bfd *abfd,
a094f6
 	case R_PPC_REL16_LO:
a094f6
 	case R_PPC_REL16_HI:
a094f6
 	case R_PPC_REL16_HA:
a094f6
+	case R_PPC_REL16DX_HA:
a094f6
 	  ppc_elf_tdata (abfd)->has_rel16 = 1;
a094f6
 	  break;
a094f6
 
a094f6
@@ -7604,7 +7632,9 @@ is_insn_ds_form (unsigned int insn)
a094f6
 static bfd_boolean
a094f6
 is_insn_dq_form (unsigned int insn)
a094f6
 {
a094f6
-  return (insn & (0x3f << 26)) == 56u << 26; /* lq */
a094f6
+  return ((insn & (0x3f << 26)) == 56u << 26 /* lq */
a094f6
+	  || ((insn & (0x3f << 26)) == (61u << 26) /* lxv, stxv */
a094f6
+	      && (insn & 3) == 1));
a094f6
 }
a094f6
 
a094f6
 /* The RELOCATE_SECTION function is called by the ELF backend linker
a094f6
@@ -8605,6 +8635,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
a094f6
 	case R_PPC_REL16_LO:
a094f6
 	case R_PPC_REL16_HI:
a094f6
 	case R_PPC_REL16_HA:
a094f6
+	case R_PPC_REL16DX_HA:
a094f6
 	  break;
a094f6
 
a094f6
 	case R_PPC_REL32:
a094f6
@@ -9311,6 +9342,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
a094f6
 
a094f6
 	case R_PPC_ADDR16_HA:
a094f6
 	case R_PPC_REL16_HA:
a094f6
+	case R_PPC_REL16DX_HA:
a094f6
 	case R_PPC_SECTOFF_HA:
a094f6
 	case R_PPC_TPREL16_HA:
a094f6
 	case R_PPC_DTPREL16_HA:
a094f6
@@ -9369,10 +9401,12 @@ ppc_elf_relocate_section (bfd *output_bfd,
a094f6
 	      mask = 15;
a094f6
 	    else
a094f6
 	      break;
a094f6
-	    lobit = mask & (relocation + addend);
a094f6
+	    relocation += addend;
a094f6
+	    addend = insn & mask;
a094f6
+	    lobit = mask & relocation;
a094f6
 	    if (lobit != 0)
a094f6
 	      {
a094f6
-		addend -= lobit;
a094f6
+		relocation ^= lobit;
a094f6
 		info->callbacks->einfo
a094f6
 		  (_("%P: %H: error: %s against `%s' not a multiple of %u\n"),
a094f6
 		   input_bfd, input_section, rel->r_offset,
a094f6
@@ -9380,7 +9414,6 @@ ppc_elf_relocate_section (bfd *output_bfd,
a094f6
 		bfd_set_error (bfd_error_bad_value);
a094f6
 		ret = FALSE;
a094f6
 	      }
a094f6
-	    addend += insn & mask;
a094f6
 	  }
a094f6
 	  break;
a094f6
 	}
a094f6
@@ -9439,8 +9472,30 @@ ppc_elf_relocate_section (bfd *output_bfd,
a094f6
 	    }
a094f6
 	}
a094f6
 
a094f6
-      r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
a094f6
-				    rel->r_offset, relocation, addend);
a094f6
+      if (r_type == R_PPC_REL16DX_HA)
a094f6
+	{
a094f6
+	  /* Split field reloc isn't handled by _bfd_final_link_relocate.  */
a094f6
+	  if (rel->r_offset + 4 > input_section->size)
a094f6
+	    r = bfd_reloc_outofrange;
a094f6
+	  else
a094f6
+	    {
a094f6
+	      unsigned int insn;
a094f6
+
a094f6
+	      relocation += addend;
a094f6
+	      relocation -= (rel->r_offset
a094f6
+			     + input_section->output_offset
a094f6
+			     + input_section->output_section->vma);
a094f6
+	      relocation >>= 16;
a094f6
+	      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
a094f6
+	      insn &= ~0x1fffc1;
a094f6
+	      insn |= (relocation & 0xffc1) | ((relocation & 0x3e) << 15);
a094f6
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
a094f6
+	      r = bfd_reloc_ok;
a094f6
+	    }
a094f6
+	}
a094f6
+      else
a094f6
+	r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
a094f6
+				      rel->r_offset, relocation, addend);
a094f6
 
a094f6
       if (r != bfd_reloc_ok)
a094f6
 	{
a094f6
--- a/bfd/elf64-ppc.c
a094f6
+++ b/bfd/elf64-ppc.c
a094f6
@@ -2022,6 +2022,21 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
a094f6
 	 0xffff,		/* dst_mask */
a094f6
 	 TRUE),			/* pcrel_offset */
a094f6
 
a094f6
+  /* Like R_PPC64_REL16_HA but for split field in addpcis.  */
a094f6
+  HOWTO (R_PPC64_REL16DX_HA,	/* type */
a094f6
+	 16,			/* rightshift */
a094f6
+	 2,			/* size (0 = byte, 1 = short, 2 = long) */
a094f6
+	 16,			/* bitsize */
a094f6
+	 TRUE,			/* pc_relative */
a094f6
+	 0,			/* bitpos */
a094f6
+	 complain_overflow_signed, /* complain_on_overflow */
a094f6
+	 ppc64_elf_ha_reloc,	/* special_function */
a094f6
+	 "R_PPC64_REL16DX_HA",	/* name */
a094f6
+	 FALSE,			/* partial_inplace */
a094f6
+	 0,			/* src_mask */
a094f6
+	 0x1fffc1,		/* dst_mask */
a094f6
+	 TRUE),			/* pcrel_offset */
a094f6
+
a094f6
   /* Like R_PPC64_ADDR16_HI, but no overflow.  */
a094f6
   HOWTO (R_PPC64_ADDR16_HIGH,	/* type */
a094f6
 	 16,			/* rightshift */
a094f6
@@ -2412,6 +2427,8 @@ ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
a094f6
       break;
a094f6
     case BFD_RELOC_HI16_S_PCREL:		r = R_PPC64_REL16_HA;
a094f6
       break;
a094f6
+    case BFD_RELOC_PPC_REL16DX_HA:		r = R_PPC64_REL16DX_HA;
a094f6
+      break;
a094f6
     case BFD_RELOC_PPC64_ADDR64_LOCAL:		r = R_PPC64_ADDR64_LOCAL;
a094f6
       break;
a094f6
     case BFD_RELOC_VTABLE_INHERIT:		r = R_PPC64_GNU_VTINHERIT;
a094f6
@@ -2466,6 +2483,11 @@ ppc64_elf_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
a094f6
 		    void *data, asection *input_section,
a094f6
 		    bfd *output_bfd, char **error_message)
a094f6
 {
a094f6
+  enum elf_ppc64_reloc_type r_type;
a094f6
+  long insn;
a094f6
+  bfd_size_type octets;
a094f6
+  bfd_vma value;
a094f6
+
a094f6
   /* If this is a relocatable link (output_bfd test tells us), just
a094f6
      call the generic function.  Any adjustment will be done at final
a094f6
      link time.  */
a094f6
@@ -2477,7 +2499,29 @@ ppc64_elf_ha_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
a094f6
      We won't actually be using the low 16 bits, so trashing them
a094f6
      doesn't matter.  */
a094f6
   reloc_entry->addend += 0x8000;
a094f6
-  return bfd_reloc_continue;
a094f6
+  r_type = reloc_entry->howto->type;
a094f6
+  if (r_type != R_PPC64_REL16DX_HA)
a094f6
+    return bfd_reloc_continue;
a094f6
+
a094f6
+  value = 0;
a094f6
+  if (!bfd_is_com_section (symbol->section))
a094f6
+    value = symbol->value;
a094f6
+  value += (reloc_entry->addend
a094f6
+	    + symbol->section->output_offset
a094f6
+	    + symbol->section->output_section->vma);
a094f6
+  value -= (reloc_entry->address
a094f6
+	    + input_section->output_offset
a094f6
+	    + input_section->output_section->vma);
a094f6
+  value = (bfd_signed_vma) value >> 16;
a094f6
+
a094f6
+  octets = reloc_entry->address * bfd_octets_per_byte (abfd);
a094f6
+  insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
a094f6
+  insn &= ~0x1fffc1;
a094f6
+  insn |= (value & 0xffc1) | ((value & 0x3e) << 15);
a094f6
+  bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
a094f6
+  if (value + 0x8000 > 0xffff)
a094f6
+    return bfd_reloc_overflow;
a094f6
+  return bfd_reloc_ok;
a094f6
 }
a094f6
 
a094f6
 static bfd_reloc_status_type
a094f6
@@ -5502,6 +5546,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
a094f6
 	case R_PPC64_REL16_LO:
a094f6
 	case R_PPC64_REL16_HI:
a094f6
 	case R_PPC64_REL16_HA:
a094f6
+	case R_PPC64_REL16DX_HA:
a094f6
 	  break;
a094f6
 
a094f6
 	  /* Not supported as a dynamic relocation.  */
a094f6
@@ -14430,6 +14475,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
a094f6
 	case R_PPC64_REL16_LO:
a094f6
 	case R_PPC64_REL16_HI:
a094f6
 	case R_PPC64_REL16_HA:
a094f6
+	case R_PPC64_REL16DX_HA:
a094f6
 	  break;
a094f6
 
a094f6
 	case R_PPC64_REL14:
a094f6
@@ -14842,6 +14888,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
a094f6
 	  break;
a094f6
 
a094f6
 	case R_PPC64_REL16_HA:
a094f6
+	case R_PPC64_REL16DX_HA:
a094f6
 	case R_PPC64_ADDR16_HA:
a094f6
 	case R_PPC64_ADDR16_HIGHA:
a094f6
 	case R_PPC64_ADDR16_HIGHERA:
a094f6
@@ -14897,16 +14944,20 @@ ppc64_elf_relocate_section (bfd *output_bfd,
a094f6
 	case R_PPC64_DTPREL16_LO_DS:
a094f6
 	  insn = bfd_get_32 (input_bfd, contents + (rel->r_offset & ~3));
a094f6
 	  mask = 3;
a094f6
-	  /* If this reloc is against an lq insn, then the value must be
a094f6
-	     a multiple of 16.  This is somewhat of a hack, but the
a094f6
-	     "correct" way to do this by defining _DQ forms of all the
a094f6
-	     _DS relocs bloats all reloc switches in this file.  It
a094f6
-	     doesn't seem to make much sense to use any of these relocs
a094f6
-	     in data, so testing the insn should be safe.  */
a094f6
-	  if ((insn & (0x3f << 26)) == (56u << 26))
a094f6
+	  /* If this reloc is against an lq, lxv, or stxv insn, then
a094f6
+	     the value must be a multiple of 16.  This is somewhat of
a094f6
+	     a hack, but the "correct" way to do this by defining _DQ
a094f6
+	     forms of all the _DS relocs bloats all reloc switches in
a094f6
+	     this file.  It doesn't make much sense to use these
a094f6
+	     relocs in data, so testing the insn should be safe.  */
a094f6
+	  if ((insn & (0x3f << 26)) == (56u << 26)
a094f6
+	      || ((insn & (0x3f << 26)) == (61u << 26) && (insn & 3) == 1))
a094f6
 	    mask = 15;
a094f6
-	  if (((relocation + addend) & mask) != 0)
a094f6
+	  relocation += addend;
a094f6
+	  addend = insn & (mask ^ 3);
a094f6
+	  if ((relocation & mask) != 0)
a094f6
 	    {
a094f6
+	      relocation ^= relocation & mask;
a094f6
 	      info->callbacks->einfo
a094f6
 		(_("%P: %H: error: %s not a multiple of %u\n"),
a094f6
 		 input_bfd, input_section, rel->r_offset,
a094f6
@@ -14964,8 +15015,30 @@ ppc64_elf_relocate_section (bfd *output_bfd,
a094f6
 	    }
a094f6
 	}
a094f6
 
a094f6
-      r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
a094f6
-				    rel->r_offset, relocation, addend);
a094f6
+      if (r_type == R_PPC64_REL16DX_HA)
a094f6
+	{
a094f6
+	  /* Split field reloc isn't handled by _bfd_final_link_relocate.  */
a094f6
+	  if (rel->r_offset + 4 > input_section->size)
a094f6
+	    r = bfd_reloc_outofrange;
a094f6
+	  else
a094f6
+	    {
a094f6
+	      relocation += addend;
a094f6
+	      relocation -= (rel->r_offset
a094f6
+			     + input_section->output_offset
a094f6
+			     + input_section->output_section->vma);
a094f6
+	      relocation = (bfd_signed_vma) relocation >> 16;
a094f6
+	      insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
a094f6
+	      insn &= ~0x1fffc1;
a094f6
+	      insn |= (relocation & 0xffc1) | ((relocation & 0x3e) << 15);
a094f6
+	      bfd_put_32 (input_bfd, insn, contents + rel->r_offset);
a094f6
+	      r = bfd_reloc_ok;
a094f6
+	      if (relocation + 0x8000 > 0xffff)
a094f6
+		r = bfd_reloc_overflow;
a094f6
+	    }
a094f6
+	}
a094f6
+      else
a094f6
+	r = _bfd_final_link_relocate (howto, input_bfd, input_section, contents,
a094f6
+				      rel->r_offset, relocation, addend);
a094f6
 
a094f6
       if (r != bfd_reloc_ok)
a094f6
 	{
a094f6
--- a/bfd/libbfd.h
a094f6
+++ b/bfd/libbfd.h
a094f6
@@ -1391,6 +1391,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
a094f6
   "BFD_RELOC_PPC_VLE_SDAREL_HI16D",
a094f6
   "BFD_RELOC_PPC_VLE_SDAREL_HA16A",
a094f6
   "BFD_RELOC_PPC_VLE_SDAREL_HA16D",
a094f6
+  "BFD_RELOC_PPC_REL16DX_HA",
a094f6
   "BFD_RELOC_PPC64_HIGHER",
a094f6
   "BFD_RELOC_PPC64_HIGHER_S",
a094f6
   "BFD_RELOC_PPC64_HIGHEST",
a094f6
--- a/bfd/reloc.c
a094f6
+++ b/bfd/reloc.c
a094f6
@@ -2890,6 +2890,8 @@ ENUMX
a094f6
 ENUMX
a094f6
   BFD_RELOC_PPC_VLE_SDAREL_HA16D
a094f6
 ENUMX
a094f6
+  BFD_RELOC_PPC_REL16DX_HA
a094f6
+ENUMX
a094f6
   BFD_RELOC_PPC64_HIGHER
a094f6
 ENUMX
a094f6
   BFD_RELOC_PPC64_HIGHER_S
a094f6
### a/include/elf/ChangeLog
a094f6
### b/include/elf/ChangeLog
a094f6
## -1,3 +1,9 @@
a094f6
+2015-11-11  Alan Modra  <amodra@gmail.com>
a094f6
+	    Peter Bergner <bergner@vnet.ibm.com>
a094f6
+
a094f6
+	* ppc.h (R_PPC_REL16DX_HA): New reloction.
a094f6
+	* ppc64.h (R_PPC64_REL16DX_HA): Likewise.
a094f6
+
a094f6
 2015-10-28  Cupertino Miranda  <cmiranda@synopsys.com>
a094f6
 
a094f6
 	* arc-reloc.def (ARC_32_PCREL): New definition.
a094f6
--- a/include/elf/ppc.h
a094f6
+++ b/include/elf/ppc.h
a094f6
@@ -149,6 +149,9 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
a094f6
   RELOC_NUMBER (R_PPC_VLE_SDAREL_HA16A,	231)
a094f6
   RELOC_NUMBER (R_PPC_VLE_SDAREL_HA16D,	232)
a094f6
 
a094f6
+/* Power9 split rel16 for addpcis.  */
a094f6
+  RELOC_NUMBER (R_PPC_REL16DX_HA,	246)
a094f6
+
a094f6
 /* Support STT_GNU_IFUNC plt calls.  */
a094f6
   RELOC_NUMBER (R_PPC_IRELATIVE,	248)
a094f6
 
a094f6
--- a/include/elf/ppc64.h
a094f6
+++ b/include/elf/ppc64.h
a094f6
@@ -157,6 +157,10 @@ START_RELOC_NUMBERS (elf_ppc64_reloc_type)
a094f6
 /* Fake relocation only used internally by ld.  */
a094f6
   RELOC_NUMBER (R_PPC64_LO_DS_OPT,	   128)
a094f6
 #endif
a094f6
+
a094f6
+/* Power9 split rel16 for addpcis.  */
a094f6
+  RELOC_NUMBER (R_PPC64_REL16DX_HA,	   246)
a094f6
+
a094f6
 /* Support STT_GNU_IFUNC plt calls.  */
a094f6
   RELOC_NUMBER (R_PPC64_JMP_IREL,	   247)
a094f6
   RELOC_NUMBER (R_PPC64_IRELATIVE,	   248)
a094f6
### a/include/opcode/ChangeLog
a094f6
### b/include/opcode/ChangeLog
a094f6
## -1,3 +1,9 @@
a094f6
+2015-11-11  Alan Modra  <amodra@gmail.com>
a094f6
+	    Peter Bergner <bergner@vnet.ibm.com>
a094f6
+
a094f6
+	* ppc.h (PPC_OPCODE_POWER9): New define.
a094f6
+	(PPC_OPCODE_VSX3): Likewise.
a094f6
+
a094f6
 2015-11-02  Nick Clifton  <nickc@redhat.com>
a094f6
 
a094f6
 	* rx.h (enum RX_Opcode_ID): Add more NOP opcodes.
a094f6
--- a/include/opcode/ppc.h
a094f6
+++ b/include/opcode/ppc.h
a094f6
@@ -204,6 +204,12 @@ extern const int vle_num_opcodes;
a094f6
 /* Opcode is supported by ppc821/850/860.  */
a094f6
 #define PPC_OPCODE_860	      0x10000000000ull
a094f6
 
a094f6
+/* Opcode is only supported by Power9 architecture.  */
a094f6
+#define PPC_OPCODE_POWER9     0x20000000000ull
a094f6
+
a094f6
+/* Opcode is supported by Vector-Scalar (VSX) Unit from ISA 2.08.  */
a094f6
+#define PPC_OPCODE_VSX3       0x40000000000ull
a094f6
+
a094f6
 /* A macro to extract the major opcode from an instruction.  */
a094f6
 #define PPC_OP(i) (((i) >> 26) & 0x3f)
a094f6
 
a094f6
### a/opcodes/ChangeLog
a094f6
### b/opcodes/ChangeLog
a094f6
## -1,3 +1,54 @@
a094f6
+2015-11-11  Alan Modra  <amodra@gmail.com>
a094f6
+	    Peter Bergner <bergner@vnet.ibm.com>
a094f6
+
a094f6
+	* ppc-dis.c (ppc_opts): Add "power9" and "pwr9" entries.
a094f6
+	Add PPC_OPCODE_VSX3 to the vsx entry.
a094f6
+	(powerpc_init_dialect): Set default dialect to power9.
a094f6
+	* ppc-opc.c (insert_dcmxs, extract_dcmxs, insert_dxd, extract_dxd,
a094f6
+	insert_dxdn, extract_dxdn, insert_l0, extract_l0, insert_l1,
a094f6
+	extract_l1 insert_xtq6, extract_xtq6): New static functions.
a094f6
+	(insert_esync): Test for illegal L operand value.
a094f6
+	(DCMX, DCMXS, DXD, NDXD, L0, L1, RC, FC, UIM6, X_R, RIC, PRS, XSQ6,
a094f6
+	XTQ6, LRAND, IMM8, DQX, DQX_MASK, DX, DX_MASK, VXVAPS_MASK, VXVA,XVA,
a094f6
+	XX2VA, XVARC, XBF_MASK, XX2UIM4_MASK, XX2BFD_MASK, XX2DCMXS_MASK,
a094f6
+	XVA_MASK, XRLA_MASK, XBFRARB_MASK, XLRAND_MASK, POWER9, PPCVEC3,
a094f6
+	PPCVSX3): New defines.
a094f6
+	(powerpc_opcodes) 
a094f6
+	fcmpo, ftdiv, ftsqrt>: Use XBF_MASK.
a094f6
+	<mcrxr>: Use XBFRARB_MASK.
a094f6
+	
a094f6
+	bcdctz., bcds., bcdsetsgn., bcdsr., bcdtrunc., bcdus., bcdutrunc.,
a094f6
+	cmpeqb, cmprb, cnttzd, cnttzd., cnttzw, cnttzw., copy, copy_first,
a094f6
+	cp_abort, darn, dtstsfi, dtstsfiq, extswsli, extswsli., ldat, ldmx,
a094f6
+	lwat, lxsd, lxsibzx, lxsihzx, lxssp, lxv, lxvb16x, lxvh8x, lxvl, lxvll,
a094f6
+	lxvwsx, lxvx, maddhd, maddhdu, maddld, mcrxrx, mfvsrld, modsd, modsw,
a094f6
+	modud, moduw, msgsync, mtvsrdd, mtvsrws, paste, paste., paste_last,
a094f6
+	rmieg, setb, slbieg, slbsync, stdat, stop, stwat, stxsd, stxsibx,
a094f6
+	stxsihx, stxssp, stxv, stxvb16x, stxvh8x, stxvl, stxvll, stxvx,
a094f6
+	subpcis, urfid, vbpermd, vclzlsbb, vcmpneb, vcmpneb., vcmpneh,
a094f6
+	vcmpneh., vcmpnew, vcmpnew., vcmpnezb, vcmpnezb., vcmpnezh, vcmpnezh.,
a094f6
+	vcmpnezw, vcmpnezw., vctzb, vctzd, vctzh, vctzlsbb, vctzw, vextractd,
a094f6
+	vextractub, vextractuh, vextractuw, vextsb2d, vextsb2w, vextsh2d,
a094f6
+	vextsh2w, vextsw2d, vextublx, vextubrx, vextuhlx, vextuhrx, vextuwlx,
a094f6
+	vextuwrx, vinsertb, vinsertd, vinserth, vinsertw, vmul10cuq,
a094f6
+	vmul10ecuq, vmul10euq, vmul10uq, vnegd, vnegw, vpermr, vprtybd,
a094f6
+	vprtybq, vprtybw, vrldmi, vrldnm, vrlwmi, vrlwnm, vslv, vsrv, wait,
a094f6
+	xsabsqp, xsaddqp, xsaddqpo, xscmpeqdp, xscmpexpdp, xscmpexpqp,
a094f6
+	xscmpgedp, xscmpgtdp, xscmpnedp, xscmpoqp, xscmpuqp, xscpsgnqp,
a094f6
+	xscvdphp, xscvdpqp, xscvhpdp, xscvqpdp, xscvqpdpo, xscvqpsdz,
a094f6
+	xscvqpswz, xscvqpudz, xscvqpuwz, xscvsdqp, xscvudqp, xsdivqp,
a094f6
+	xsdivqpo, xsiexpdp, xsiexpqp, xsmaddqp, xsmaddqpo, xsmaxcdp,
a094f6
+	xsmaxjdp, xsmincdp, xsminjdp, xsmsubqp, xsmsubqpo, xsmulqp, xsmulqpo,
a094f6
+	xsnabsqp, xsnegqp, xsnmaddqp, xsnmaddqpo, xsnmsubqp, xsnmsubqpo,
a094f6
+	xsrqpi, xsrqpix, xsrqpxp, xssqrtqp, xssqrtqpo, xssubqp, xssubqpo,
a094f6
+	xststdcdp, xststdcqp, xststdcsp, xsxexpdp, xsxexpqp, xsxsigdp,
a094f6
+	xsxsigqp, xvcmpnedp, xvcmpnedp., xvcmpnesp, xvcmpnesp., xvcvhpsp,
a094f6
+	xvcvsphp, xviexpdp, xviexpsp, xvtstdcdp, xvtstdcsp, xvxexpdp,
a094f6
+	xvxexpsp, xvxsigdp, xvxsigsp, xxbrd, xxbrh, xxbrq, xxbrw, xxextractuw,
a094f6
+	xxinsertw, xxperm, xxpermr, xxspltib>: New instructions.
a094f6
+	<doze, nap, sleep, rvwinkle, waitasec, lxvx, stxvx>: Disable on POWER9.
a094f6
+	<tlbiel, tlbie, sync, slbmfev, slbmfee>: Add additional operands.
a094f6
+
a094f6
 2015-11-02  Nick Clifton  <nickc@redhat.com>
a094f6
 
a094f6
 	* rx-decode.opc (rx_decode_opcode): Decode extra NOP
a094f6
--- a/opcodes/ppc-dis.c
a094f6
+++ b/opcodes/ppc-dis.c
a094f6
@@ -157,6 +157,12 @@ struct ppc_mopt ppc_opts[] = {
a094f6
 		| PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_HTM
a094f6
 		| PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2 | PPC_OPCODE_VSX),
a094f6
     0 },
a094f6
+  { "power9",  (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64
a094f6
+		| PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
a094f6
+		| PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9
a094f6
+		| PPC_OPCODE_HTM | PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2
a094f6
+		| PPC_OPCODE_VSX | PPC_OPCODE_VSX3 ),
a094f6
+    0 },
a094f6
   { "ppc",     (PPC_OPCODE_PPC),
a094f6
     0 },
a094f6
   { "ppc32",   (PPC_OPCODE_PPC),
a094f6
@@ -191,6 +197,12 @@ struct ppc_mopt ppc_opts[] = {
a094f6
 		| PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_HTM
a094f6
 		| PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2 | PPC_OPCODE_VSX),
a094f6
     0 },
a094f6
+  { "pwr9",    (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_64
a094f6
+		| PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6
a094f6
+		| PPC_OPCODE_POWER7 | PPC_OPCODE_POWER8 | PPC_OPCODE_POWER9
a094f6
+		| PPC_OPCODE_HTM | PPC_OPCODE_ALTIVEC | PPC_OPCODE_ALTIVEC2
a094f6
+		| PPC_OPCODE_VSX | PPC_OPCODE_VSX3 ),
a094f6
+    0 },
a094f6
   { "pwrx",    (PPC_OPCODE_POWER | PPC_OPCODE_POWER2),
a094f6
     0 },
a094f6
   { "spe",     (PPC_OPCODE_PPC | PPC_OPCODE_EFS),
a094f6
@@ -201,7 +213,7 @@ struct ppc_mopt ppc_opts[] = {
a094f6
   { "vle",     (PPC_OPCODE_PPC | PPC_OPCODE_ISEL | PPC_OPCODE_VLE),
a094f6
     PPC_OPCODE_VLE },
a094f6
   { "vsx",     (PPC_OPCODE_PPC),
a094f6
-    PPC_OPCODE_VSX },
a094f6
+    PPC_OPCODE_VSX | PPC_OPCODE_VSX3 },
a094f6
   { "htm",     (PPC_OPCODE_PPC),
a094f6
     PPC_OPCODE_HTM },
a094f6
 };
a094f6
@@ -303,7 +315,7 @@ powerpc_init_dialect (struct disassemble_info *info)
a094f6
       dialect = ppc_parse_cpu (dialect, &sticky, "vle");
a094f6
       break;
a094f6
     default:
a094f6
-      dialect = ppc_parse_cpu (dialect, &sticky, "power8") | PPC_OPCODE_ANY;
a094f6
+      dialect = ppc_parse_cpu (dialect, &sticky, "power9") | PPC_OPCODE_ANY;
a094f6
     }
a094f6
 
a094f6
   arg = info->disassembler_options;
a094f6
--- a/opcodes/ppc-opc.c
a094f6
+++ b/opcodes/ppc-opc.c
a094f6
@@ -54,8 +54,18 @@ static long extract_bo (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_boe (unsigned long, long, ppc_cpu_t, const char **);
a094f6
 static long extract_boe (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_esync (unsigned long, long, ppc_cpu_t, const char **);
a094f6
+static unsigned long insert_dcmxs (unsigned long, long, ppc_cpu_t, const char **);
a094f6
+static long extract_dcmxs (unsigned long, ppc_cpu_t, int *);
a094f6
+static unsigned long insert_dxd (unsigned long, long, ppc_cpu_t, const char **);
a094f6
+static long extract_dxd (unsigned long, ppc_cpu_t, int *);
a094f6
+static unsigned long insert_dxdn (unsigned long, long, ppc_cpu_t, const char **);
a094f6
+static long extract_dxdn (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_fxm (unsigned long, long, ppc_cpu_t, const char **);
a094f6
 static long extract_fxm (unsigned long, ppc_cpu_t, int *);
a094f6
+static unsigned long insert_l0 (unsigned long, long, ppc_cpu_t, const char **);
a094f6
+static long extract_l0 (unsigned long, ppc_cpu_t, int *);
a094f6
+static unsigned long insert_l1 (unsigned long, long, ppc_cpu_t, const char **);
a094f6
+static long extract_l1 (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_li20 (unsigned long, long, ppc_cpu_t, const char **);
a094f6
 static long extract_li20 (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_ls (unsigned long, long, ppc_cpu_t, const char **);
a094f6
@@ -98,6 +108,8 @@ static unsigned long insert_tbr (unsigned long, long, ppc_cpu_t, const char **);
a094f6
 static long extract_tbr (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_xt6 (unsigned long, long, ppc_cpu_t, const char **);
a094f6
 static long extract_xt6 (unsigned long, ppc_cpu_t, int *);
a094f6
+static unsigned long insert_xtq6 (unsigned long, long, ppc_cpu_t, const char **);
a094f6
+static long extract_xtq6 (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_xa6 (unsigned long, long, ppc_cpu_t, const char **);
a094f6
 static long extract_xa6 (unsigned long, ppc_cpu_t, int *);
a094f6
 static unsigned long insert_xb6 (unsigned long, long, ppc_cpu_t, const char **);
a094f6
@@ -302,9 +314,17 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define D8 D + 1
a094f6
   { 0xff, 0, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
a094f6
 
a094f6
+  /* The DCMX field in an X form instruction.  */
a094f6
+#define DCMX D8 + 1
a094f6
+  { 0x7f, 16, NULL, NULL, 0 },
a094f6
+
a094f6
+  /* The split DCMX field in an X form instruction.  */
a094f6
+#define DCMXS DCMX + 1
a094f6
+  { 0x7f, PPC_OPSHIFT_INV, insert_dcmxs, extract_dcmxs, 0 },
a094f6
+
a094f6
   /* The DQ field in a DQ form instruction.  This is like D, but the
a094f6
      lower four bits are forced to zero. */
a094f6
-#define DQ D8 + 1
a094f6
+#define DQ DCMXS + 1
a094f6
   { 0xfff0, 0, NULL, NULL,
a094f6
     PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DQ },
a094f6
 
a094f6
@@ -320,10 +340,21 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define BHRBE DUIS
a094f6
   { 0x3ff, 11, NULL, NULL, 0 },
a094f6
 
a094f6
+  /* The split D field in a DX form instruction.  */
a094f6
+#define DXD DUIS + 1
a094f6
+  { 0xffff, PPC_OPSHIFT_INV, insert_dxd, extract_dxd,
a094f6
+    PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT},
a094f6
+
a094f6
+  /* The split ND field in a DX form instruction.
a094f6
+     This is the same as the DX field, only negated.  */
a094f6
+#define NDXD DXD + 1
a094f6
+  { 0xffff, PPC_OPSHIFT_INV, insert_dxdn, extract_dxdn,
a094f6
+    PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT},
a094f6
+
a094f6
   /* The E field in a wrteei instruction.  */
a094f6
   /* And the W bit in the pair singles instructions.  */
a094f6
   /* And the ST field in a VX form instruction.  */
a094f6
-#define E DUIS + 1
a094f6
+#define E NDXD + 1
a094f6
 #define PSW E
a094f6
 #define ST E
a094f6
   { 0x1, 15, NULL, NULL, 0 },
a094f6
@@ -397,8 +428,16 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define HTM_R L
a094f6
   { 0x1, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
a094f6
 
a094f6
+  /* The L field in an X form instruction which must be zero.  */
a094f6
+#define L0 L + 1
a094f6
+  { 0x1, 21, insert_l0, extract_l0, PPC_OPERAND_OPTIONAL },
a094f6
+
a094f6
+  /* The L field in an X form instruction which must be one.  */
a094f6
+#define L1 L0 + 1
a094f6
+  { 0x1, 21, insert_l1, extract_l1, 0 },
a094f6
+
a094f6
   /* The LEV field in a POWER SVC form instruction.  */
a094f6
-#define SVC_LEV L + 1
a094f6
+#define SVC_LEV L1 + 1
a094f6
   { 0x7f, 5, NULL, NULL, 0 },
a094f6
 
a094f6
   /* The LEV field in an SC form instruction.  */
a094f6
@@ -513,10 +552,14 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define RBOPT RBX + 1
a094f6
   { 0x1f, 11, NULL, NULL, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL },
a094f6
 
a094f6
+  /* The RC register field in an maddld, maddhd or maddhdu instruction.  */
a094f6
+#define RC RBOPT + 1
a094f6
+  { 0x1f, 6, NULL, NULL, PPC_OPERAND_GPR },
a094f6
+
a094f6
   /* The RS field in a D, DS, X, XFX, XS, M, MD or MDS form
a094f6
      instruction or the RT field in a D, DS, X, XFX or XO form
a094f6
      instruction.  */
a094f6
-#define RS RBOPT + 1
a094f6
+#define RS RC + 1
a094f6
 #define RT RS
a094f6
 #define RT_MASK (0x1f << 21)
a094f6
 #define RD RS
a094f6
@@ -577,6 +620,8 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define SH_MASK (0x1f << 11)
a094f6
   /* The other UIMM field in a EVX form instruction.  */
a094f6
 #define EVUIMM SH
a094f6
+  /* The FC field in an atomic X form instruction.  */
a094f6
+#define FC SH
a094f6
   { 0x1f, 11, NULL, NULL, 0 },
a094f6
 
a094f6
   /* The SI field in a HTM X form instruction.  */
a094f6
@@ -705,8 +750,12 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define UIMM3 UIMM + 1
a094f6
   { 0x7, 16, NULL, NULL, 0 },
a094f6
 
a094f6
+  /* The 6-bit UIM field in a X form instruction.  */
a094f6
+#define UIM6 UIMM3 + 1
a094f6
+  { 0x3f, 16, NULL, NULL, 0 },
a094f6
+
a094f6
   /* The SIX field in a VX form instruction.  */
a094f6
-#define SIX UIMM3 + 1
a094f6
+#define SIX UIM6 + 1
a094f6
   { 0xf, 11, NULL, NULL, 0 },
a094f6
 
a094f6
   /* The PS field in a VX form instruction.  */
a094f6
@@ -752,9 +801,10 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define PSD PSQM + 1
a094f6
   {  0xfff, 0, 0, 0,  PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
a094f6
 
a094f6
-  /* The L field in an mtmsrd or A form instruction or W in an X form.  */
a094f6
+  /* The L field in an mtmsrd or A form instruction or R or W in an X form.  */
a094f6
 #define A_L PSD + 1
a094f6
 #define W A_L
a094f6
+#define X_R A_L
a094f6
   { 0x1, 16, NULL, NULL, PPC_OPERAND_OPTIONAL },
a094f6
 
a094f6
 #define RMC A_L + 1
a094f6
@@ -763,7 +813,13 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define R RMC + 1
a094f6
   { 0x1, 16, NULL, NULL, 0 },
a094f6
 
a094f6
-#define SP R + 1
a094f6
+#define RIC R + 1
a094f6
+  { 0x3, 18, NULL, NULL, PPC_OPERAND_OPTIONAL },
a094f6
+
a094f6
+#define PRS RIC + 1
a094f6
+  { 0x1, 17, NULL, NULL, PPC_OPERAND_OPTIONAL },
a094f6
+
a094f6
+#define SP PRS + 1
a094f6
   { 0x3, 19, NULL, NULL, 0 },
a094f6
 
a094f6
 #define S SP + 1
a094f6
@@ -838,8 +894,13 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define XT6 XS6
a094f6
   { 0x3f, PPC_OPSHIFT_INV, insert_xt6, extract_xt6, PPC_OPERAND_VSR },
a094f6
 
a094f6
+  /* The XT and XS fields in an DQ form VSX instruction.  This is split.  */
a094f6
+#define XSQ6 XT6 + 1
a094f6
+#define XTQ6 XSQ6
a094f6
+  { 0x3f, PPC_OPSHIFT_INV, insert_xtq6, extract_xtq6, PPC_OPERAND_VSR },
a094f6
+
a094f6
   /* The XA field in an XX3 form instruction.  This is split.  */
a094f6
-#define XA6 XT6 + 1
a094f6
+#define XA6 XTQ6 + 1
a094f6
   { 0x3f, PPC_OPSHIFT_INV, insert_xa6, extract_xa6, PPC_OPERAND_VSR },
a094f6
 
a094f6
   /* The XB field in an XX2 or XX3 form instruction.  This is split.  */
a094f6
@@ -869,6 +930,8 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 #define UIM DMEX + 1
a094f6
   /* The 2-bit UIMM field in a VX form instruction.  */
a094f6
 #define UIMM2 UIM
a094f6
+  /* The 2-bit L field in a darn instruction.  */
a094f6
+#define LRAND UIM
a094f6
   { 0x3, 16, NULL, NULL, 0 },
a094f6
 
a094f6
 #define ERAT_T UIM + 1
a094f6
@@ -876,6 +939,10 @@ const struct powerpc_operand powerpc_operands[] =
a094f6
 
a094f6
 #define IH ERAT_T + 1
a094f6
   { 0x7, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
a094f6
+
a094f6
+  /* The 8-bit IMM8 field in a XX1 form instruction.  */
a094f6
+#define IMM8 IH + 1
a094f6
+  { 0xff, 11, NULL, NULL, 0 },
a094f6
 };
a094f6
 
a094f6
 const unsigned int num_powerpc_operands = (sizeof (powerpc_operands)
a094f6
@@ -1272,6 +1339,64 @@ extract_boe (unsigned long insn,
a094f6
   return value & 0x1e;
a094f6
 }
a094f6
 
a094f6
+/* The DCMX field in a X form instruction when the field is split
a094f6
+   into separate DC, DM and DX fields.  */
a094f6
+
a094f6
+static unsigned long
a094f6
+insert_dcmxs (unsigned long insn,
a094f6
+	    long value,
a094f6
+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	    const char **errmsg ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  return insn | ((value & 0x1f) << 16) | ((value & 0x20) >> 3) | (value & 0x40);
a094f6
+}
a094f6
+
a094f6
+static long
a094f6
+extract_dcmxs (unsigned long insn,
a094f6
+	     ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	     int *invalid ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  return (insn & 0x40) | ((insn << 3) & 0x20) | ((insn >> 16) & 0x1f);
a094f6
+}
a094f6
+
a094f6
+/* The D field in a DX form instruction when the field is split
a094f6
+   into separate D0, D1 and D2 fields.  */
a094f6
+
a094f6
+static unsigned long
a094f6
+insert_dxd (unsigned long insn,
a094f6
+	    long value,
a094f6
+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	    const char **errmsg ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  return insn | (value & 0xffc1) | ((value & 0x3e) << 15);
a094f6
+}
a094f6
+
a094f6
+static long
a094f6
+extract_dxd (unsigned long insn,
a094f6
+	     ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	     int *invalid ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  unsigned long dxd = (insn & 0xffc1) | ((insn >> 15) & 0x3e);
a094f6
+  return (dxd ^ 0x8000) - 0x8000;
a094f6
+}
a094f6
+
a094f6
+static unsigned long
a094f6
+insert_dxdn (unsigned long insn,
a094f6
+	    long value,
a094f6
+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	    const char **errmsg ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  return insert_dxd (insn, -value, dialect, errmsg);
a094f6
+}
a094f6
+
a094f6
+static long
a094f6
+extract_dxdn (unsigned long insn,
a094f6
+	     ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	     int *invalid ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  return -extract_dxd (insn, dialect, invalid);
a094f6
+}
a094f6
+
a094f6
 /* FXM mask in mfcr and mtcrf instructions.  */
a094f6
 
a094f6
 static unsigned long
a094f6
@@ -1343,6 +1468,58 @@ extract_fxm (unsigned long insn,
a094f6
   return mask;
a094f6
 }
a094f6
 
a094f6
+/* The L field in an X form instruction which must have the value zero.  */
a094f6
+
a094f6
+static unsigned long
a094f6
+insert_l0 (unsigned long insn,
a094f6
+	   long value,
a094f6
+	   ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	   const char **errmsg)
a094f6
+{
a094f6
+  if (value != 0)
a094f6
+    *errmsg = _("invalid operand constant");
a094f6
+  return insn & ~(0x1 << 21);
a094f6
+}
a094f6
+
a094f6
+static long
a094f6
+extract_l0 (unsigned long insn,
a094f6
+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	    int *invalid)
a094f6
+{
a094f6
+  long value;
a094f6
+
a094f6
+  value = (insn >> 21) & 0x1;
a094f6
+  if (value != 0)
a094f6
+    *invalid = 1;
a094f6
+  return value;
a094f6
+}
a094f6
+
a094f6
+/* The L field in an X form instruction which must have the value one.  */
a094f6
+
a094f6
+static unsigned long
a094f6
+insert_l1 (unsigned long insn,
a094f6
+	   long value,
a094f6
+	   ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	   const char **errmsg)
a094f6
+{
a094f6
+  if (value != 1)
a094f6
+    *errmsg = _("invalid operand constant");
a094f6
+  return insn | (0x1 << 21);
a094f6
+}
a094f6
+
a094f6
+static long
a094f6
+extract_l1 (unsigned long insn,
a094f6
+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	    int *invalid)
a094f6
+{
a094f6
+  long value;
a094f6
+
a094f6
+  value = (insn >> 21) & 0x1;
a094f6
+  if (value != 1)
a094f6
+    *invalid = 1;
a094f6
+  return value;
a094f6
+}
a094f6
+
a094f6
 static unsigned long
a094f6
 insert_li20 (unsigned long insn,
a094f6
 	     long value,
a094f6
@@ -1398,16 +1575,16 @@ insert_ls (unsigned long insn,
a094f6
 static unsigned long
a094f6
 insert_esync (unsigned long insn,
a094f6
 	      long value,
a094f6
-	      ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	      ppc_cpu_t dialect,
a094f6
 	      const char **errmsg)
a094f6
 {
a094f6
-  unsigned long ls;
a094f6
+  unsigned long ls = (insn >> 21) & 0x03;
a094f6
 
a094f6
-  ls = (insn >> 21) & 0x03;
a094f6
   if (value == 0)
a094f6
     {
a094f6
-      if (ls > 1)
a094f6
-	*errmsg = _("illegal L operand value");
a094f6
+      if (((dialect & PPC_OPCODE_E6500) != 0 && ls > 1)
a094f6
+	  || ((dialect & PPC_OPCODE_POWER9) != 0 && ls > 2))
a094f6
+        *errmsg = _("illegal L operand value");
a094f6
       return insn;
a094f6
     }
a094f6
 
a094f6
@@ -1945,6 +2122,24 @@ extract_xt6 (unsigned long insn,
a094f6
   return ((insn << 5) & 0x20) | ((insn >> 21) & 0x1f);
a094f6
 }
a094f6
 
a094f6
+/* The XT and XS fields in an DQ form VSX instruction.  This is split.  */
a094f6
+static unsigned long
a094f6
+insert_xtq6 (unsigned long insn,
a094f6
+	    long value,
a094f6
+	    ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	    const char **errmsg ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  return insn | ((value & 0x1f) << 21) | ((value & 0x20) >> 2);
a094f6
+}
a094f6
+
a094f6
+static long
a094f6
+extract_xtq6 (unsigned long insn,
a094f6
+	     ppc_cpu_t dialect ATTRIBUTE_UNUSED,
a094f6
+	     int *invalid ATTRIBUTE_UNUSED)
a094f6
+{
a094f6
+  return ((insn << 2) & 0x20) | ((insn >> 21) & 0x1f);
a094f6
+}
a094f6
+
a094f6
 /* The XA field in an XX3 form instruction.  This is split.  */
a094f6
 
a094f6
 static unsigned long
a094f6
@@ -2258,10 +2453,18 @@ extract_vleil (unsigned long insn,
a094f6
 /* The main opcode mask with the RA field clear.  */
a094f6
 #define DRA_MASK (OP_MASK | RA_MASK)
a094f6
 
a094f6
+/* A DQ form VSX instruction.  */
a094f6
+#define DQX(op, xop) (OP (op) | ((xop) & 0x7))
a094f6
+#define DQX_MASK DQX (0x3f, 7)
a094f6
+
a094f6
 /* A DS form instruction.  */
a094f6
 #define DSO(op, xop) (OP (op) | ((xop) & 0x3))
a094f6
 #define DS_MASK DSO (0x3f, 3)
a094f6
 
a094f6
+/* An DX form instruction.  */
a094f6
+#define DX(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1))
a094f6
+#define DX_MASK DX (0x3f, 0x1f)
a094f6
+
a094f6
 /* An EVSEL form instruction.  */
a094f6
 #define EVSEL(op, xop) (OP (op) | (((unsigned long)(xop)) & 0xff) << 3)
a094f6
 #define EVSEL_MASK EVSEL(0x3f, 0xff)
a094f6
@@ -2374,6 +2577,9 @@ extract_vleil (unsigned long insn,
a094f6
 /* A VX_MASK with a PS field.  */
a094f6
 #define VXPS_MASK (VX_MASK & ~(0x1 << 9))
a094f6
 
a094f6
+/* A VX_MASK with the VA field fixed with a PS field.  */
a094f6
+#define VXVAPS_MASK ((VX_MASK | (0x1f << 16)) & ~(0x1 << 9))
a094f6
+
a094f6
 /* A VA form instruction.  */
a094f6
 #define VXA(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x03f))
a094f6
 
a094f6
@@ -2389,9 +2595,15 @@ extract_vleil (unsigned long insn,
a094f6
 /* The mask for a VXR form instruction.  */
a094f6
 #define VXR_MASK VXR(0x3f, 0x3ff, 1)
a094f6
 
a094f6
+/* A VX form instruction with a VA tertiary opcode.  */
a094f6
+#define VXVA(op, xop, vaop) (VX(op,xop) | (((vaop) & 0x1f) << 16))
a094f6
+
a094f6
 /* An X form instruction.  */
a094f6
 #define X(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
a094f6
 
a094f6
+/* A X form instruction for Quad-Precision FP Instructions.  */
a094f6
+#define XVA(op, xop, vaop) (X(op,xop) | (((vaop) & 0x1f) << 16))
a094f6
+
a094f6
 /* An EX form instruction.  */
a094f6
 #define EX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x7ff))
a094f6
 
a094f6
@@ -2401,6 +2613,9 @@ extract_vleil (unsigned long insn,
a094f6
 /* An XX2 form instruction.  */
a094f6
 #define XX2(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 2))
a094f6
 
a094f6
+/* A XX2 form instruction with the VA bits specified.  */
a094f6
+#define XX2VA(op, xop, vaop) (XX2(op,xop) | (((vaop) & 0x1f) << 16))
a094f6
+
a094f6
 /* An XX3 form instruction.  */
a094f6
 #define XX3(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0xff) << 3))
a094f6
 
a094f6
@@ -2416,12 +2631,18 @@ extract_vleil (unsigned long insn,
a094f6
 /* An X form instruction with the RC bit specified.  */
a094f6
 #define XRC(op, xop, rc) (X ((op), (xop)) | ((rc) & 1))
a094f6
 
a094f6
+/* A X form instruction for Quad-Precision FP Instructions with RC bit.  */
a094f6
+#define XVARC(op, xop, vaop, rc) (XVA ((op), (xop), (vaop)) | ((rc) & 1))
a094f6
+
a094f6
 /* A Z form instruction with the RC bit specified.  */
a094f6
 #define ZRC(op, xop, rc) (Z ((op), (xop)) | ((rc) & 1))
a094f6
 
a094f6
 /* The mask for an X form instruction.  */
a094f6
 #define X_MASK XRC (0x3f, 0x3ff, 1)
a094f6
 
a094f6
+/* The mask for an X form instruction with the BF bits specified.  */
a094f6
+#define XBF_MASK (X_MASK | (3 << 21))
a094f6
+
a094f6
 /* An X form wait instruction with everything filled in except the WC field.  */
a094f6
 #define XWC_MASK (XRC (0x3f, 0x3ff, 1) | (7 << 23) | RA_MASK | RB_MASK)
a094f6
 
a094f6
@@ -2437,9 +2658,18 @@ extract_vleil (unsigned long insn,
a094f6
 /* The mask for an XX2 form instruction with the UIM bits specified.  */
a094f6
 #define XX2UIM_MASK (XX2 (0x3f, 0x1ff) | (7 << 18))
a094f6
 
a094f6
+/* The mask for an XX2 form instruction with the 4 UIM bits specified.  */
a094f6
+#define XX2UIM4_MASK (XX2 (0x3f, 0x1ff) | (1 << 20))
a094f6
+
a094f6
 /* The mask for an XX2 form instruction with the BF bits specified.  */
a094f6
 #define XX2BF_MASK (XX2_MASK | (3 << 21) | (1))
a094f6
 
a094f6
+/* The mask for an XX2 form instruction with the BF and DCMX bits specified.  */
a094f6
+#define XX2BFD_MASK (XX2 (0x3f, 0x1ff) | 1)
a094f6
+
a094f6
+/* The mask for an XX2 form instruction with a split DCMX bits specified.  */
a094f6
+#define XX2DCMXS_MASK XX2 (0x3f, 0x1ee)
a094f6
+
a094f6
 /* The mask for an XX3 form instruction.  */
a094f6
 #define XX3_MASK XX3 (0x3f, 0xff)
a094f6
 
a094f6
@@ -2460,11 +2690,13 @@ extract_vleil (unsigned long insn,
a094f6
 #define Z_MASK ZRC (0x3f, 0x1ff, 1)
a094f6
 #define Z2_MASK ZRC (0x3f, 0xff, 1)
a094f6
 
a094f6
-/* An X_MASK with the RA field fixed.  */
a094f6
+/* An X_MASK with the RA/VA field fixed.  */
a094f6
 #define XRA_MASK (X_MASK | RA_MASK)
a094f6
+#define XVA_MASK XRA_MASK
a094f6
 
a094f6
-/* An XRA_MASK with the W field clear.  */
a094f6
+/* An XRA_MASK with the A_L/W field clear.  */
a094f6
 #define XWRA_MASK (XRA_MASK & ~((unsigned long) 1 << 16))
a094f6
+#define XRLA_MASK XWRA_MASK
a094f6
 
a094f6
 /* An X_MASK with the RB field fixed.  */
a094f6
 #define XRB_MASK (X_MASK | RB_MASK)
a094f6
@@ -2478,9 +2710,15 @@ extract_vleil (unsigned long insn,
a094f6
 /* An X_MASK with the RA and RB fields fixed.  */
a094f6
 #define XRARB_MASK (X_MASK | RA_MASK | RB_MASK)
a094f6
 
a094f6
+/* An XBF_MASK with the RA and RB fields fixed.  */
a094f6
+#define XBFRARB_MASK (XBF_MASK | RA_MASK | RB_MASK)
a094f6
+
a094f6
 /* An XRARB_MASK, but with the L bit clear.  */
a094f6
 #define XRLARB_MASK (XRARB_MASK & ~((unsigned long) 1 << 16))
a094f6
 
a094f6
+/* An XRARB_MASK, but with the L bits in a darn instruction clear.  */
a094f6
+#define XLRAND_MASK (XRARB_MASK & ~((unsigned long) 3 << 16))
a094f6
+
a094f6
 /* An X_MASK with the RT and RA fields fixed.  */
a094f6
 #define XRTRA_MASK (X_MASK | RT_MASK | RA_MASK)
a094f6
 
a094f6
@@ -2738,6 +2976,7 @@ extract_vleil (unsigned long insn,
a094f6
 #define POWER6	PPC_OPCODE_POWER6
a094f6
 #define POWER7	PPC_OPCODE_POWER7
a094f6
 #define POWER8	PPC_OPCODE_POWER8
a094f6
+#define POWER9	PPC_OPCODE_POWER9
a094f6
 #define CELL	PPC_OPCODE_CELL
a094f6
 #define PPC64	PPC_OPCODE_64 | PPC_OPCODE_64_BRIDGE
a094f6
 #define NON32	(PPC_OPCODE_64 | PPC_OPCODE_POWER4	\
a094f6
@@ -2753,8 +2992,10 @@ extract_vleil (unsigned long insn,
a094f6
 #define PPCPS	PPC_OPCODE_PPCPS
a094f6
 #define PPCVEC	PPC_OPCODE_ALTIVEC
a094f6
 #define PPCVEC2	PPC_OPCODE_ALTIVEC2
a094f6
+#define PPCVEC3	PPC_OPCODE_ALTIVEC2
a094f6
 #define PPCVSX	PPC_OPCODE_VSX
a094f6
 #define PPCVSX2	PPC_OPCODE_VSX
a094f6
+#define PPCVSX3	PPC_OPCODE_VSX3
a094f6
 #define POWER	PPC_OPCODE_POWER
a094f6
 #define POWER2	PPC_OPCODE_POWER | PPC_OPCODE_POWER2
a094f6
 #define PWR2COM PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_COMMON
a094f6
@@ -2864,11 +3105,13 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"twi",		OP(3),		OP_MASK,     PPCCOM,	PPCNONE,	{TO, RA, SI}},
a094f6
 {"ti",		OP(3),		OP_MASK,     PWRCOM,	PPCNONE,	{TO, RA, SI}},
a094f6
 
a094f6
-{"ps_cmpu0",	X  (4,	 0), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
+{"ps_cmpu0",	X  (4,	 0),    XBF_MASK,    PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
 {"vaddubm",	VX (4,	 0),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vmul10cuq",	VX (4,   1),	VXVB_MASK,   PPCVEC3,	    PPCNONE,	{VD, VA}},
a094f6
 {"vmaxub",	VX (4,	 2),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vrlb",	VX (4,	 4),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpequb",	VXR(4,	 6,0),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpneb",	VXR(4,	 7,0),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmuloub",	VX (4,	 8),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vaddfp",	VX (4,	10),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"psq_lx",	XW (4,	 6,0),	XW_MASK,     PPCPS,	PPCNONE,	{FRT,RA,RB,PSWM,PSQM}},
a094f6
@@ -2914,6 +3157,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vmaddfp",	VXA(4,	46),	VXA_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VC, VB}},
a094f6
 {"ps_sel.",	A  (4,	23,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
a094f6
 {"vnmsubfp",	VXA(4,	47),	VXA_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VC, VB}},
a094f6
+{"maddhd",	VXA(4,	48),	VXA_MASK,    POWER9,	PPCNONE,	{RT, RA, RB, RC}},
a094f6
+{"maddhdu",	VXA(4,	49),	VXA_MASK,    POWER9,	PPCNONE,	{RT, RA, RB, RC}},
a094f6
+{"maddld",	VXA(4,	51),	VXA_MASK,    POWER9,	PPCNONE,	{RT, RA, RB, RC}},
a094f6
 {"ps_res",	A  (4,	24,0), AFRAFRC_MASK, PPCPS,	PPCNONE,	{FRT, FRB}},
a094f6
 {"ps_res.",	A  (4,	24,1), AFRAFRC_MASK, PPCPS,	PPCNONE,	{FRT, FRB}},
a094f6
 {"ps_mul",	A  (4,	25,0), AFRB_MASK,    PPCPS,	PPCNONE,	{FRT, FRA, FRC}},
a094f6
@@ -2928,15 +3174,18 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"ps_nmsub.",	A  (4,	30,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
a094f6
 {"ps_nmadd",	A  (4,	31,0),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
a094f6
 {"ps_nmadd.",	A  (4,	31,1),	A_MASK,      PPCPS,	PPCNONE,	{FRT, FRA, FRC, FRB}},
a094f6
-{"ps_cmpo0",	X  (4,	32), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
+{"ps_cmpo0",	X  (4,	32),    XBF_MASK,    PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
+{"vpermr",	VXA(4,	59),	VXA_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB, VC}},
a094f6
 {"vaddeuqm",	VXA(4,	60),	VXA_MASK,    PPCVEC2,	PPCNONE,	{VD, VA, VB, VC}},
a094f6
 {"vaddecuq",	VXA(4,	61),	VXA_MASK,    PPCVEC2,	PPCNONE,	{VD, VA, VB, VC}},
a094f6
 {"vsubeuqm",	VXA(4,	62),	VXA_MASK,    PPCVEC2,	PPCNONE,	{VD, VA, VB, VC}},
a094f6
 {"vsubecuq",	VXA(4,	63),	VXA_MASK,    PPCVEC2,	PPCNONE,	{VD, VA, VB, VC}},
a094f6
 {"vadduhm",	VX (4,	64),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vmul10ecuq",	VX (4,  65),	VX_MASK,     PPCVEC3,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmaxuh",	VX (4,	66),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vrlh",	VX (4,	68),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpequh",	VXR(4,	70,0),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpneh",	VXR(4,  71,0),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmulouh",	VX (4,	72),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vsubfp",	VX (4,	74),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"psq_lux",	XW (4,	38,0),	XW_MASK,     PPCPS,	PPCNONE,	{FRT,RA,RB,PSWM,PSQM}},
a094f6
@@ -2951,11 +3200,13 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"machhw.",	XO (4,	44,0,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"nmachhw",	XO (4,	46,0,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"nmachhw.",	XO (4,	46,0,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
-{"ps_cmpu1",	X  (4,	64), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
+{"ps_cmpu1",	X  (4,	64),    XBF_MASK,    PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
 {"vadduwm",	VX (4,	128),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmaxuw",	VX (4,	130),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vrlw",	VX (4,	132),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vrlwmi",	VX (4,  133),	VX_MASK,     PPCVEC3,       PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpequw",	VXR(4,	134,0), VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpnew",	VXR(4,  135,0),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmulouw",	VX (4,  136),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmuluwm",	VX (4,  137),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmrghw",	VX (4,	140),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -2964,10 +3215,11 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"ps_mr.",	XRC(4,	72,1),	XRA_MASK,    PPCPS,	PPCNONE,	{FRT, FRB}},
a094f6
 {"machhwsu",	XO (4,	76,0,0),XO_MASK,     MULHW|PPCVLE,  PPCNONE,	{RT, RA, RB}},
a094f6
 {"machhwsu.",	XO (4,	76,0,1),XO_MASK,     MULHW|PPCVLE,  PPCNONE,	{RT, RA, RB}},
a094f6
-{"ps_cmpo1",	X  (4,	96), X_MASK|(3<<21), PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
+{"ps_cmpo1",	X  (4,	96),    XBF_MASK,    PPCPS,	PPCNONE,	{BF, FRA, FRB}},
a094f6
 {"vaddudm",	VX (4, 192),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmaxud",	VX (4, 194),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vrld",	VX (4, 196),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"vrldmi",	VX (4, 197),	VX_MASK,     PPCVEC3,   PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpeqfp",	VXR(4, 198,0),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpequd",	VXR(4, 199,0),	VXR_MASK,    PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vpkuwus",	VX (4, 206),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -2977,6 +3229,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"nmachhws.",	XO (4, 110,0,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"vadduqm",	VX (4, 256),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmaxsb",	VX (4, 258),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpnezb",	VXR(4, 263,0),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vslb",	VX (4, 260),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmulosb",	VX (4, 264),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vrefp",	VX (4, 266),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
@@ -2991,6 +3244,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vaddcuq",	VX (4, 320),	VX_MASK,     PPCVEC2,      PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmaxsh",	VX (4, 322),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vslh",	VX (4, 324),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpnezh",	VXR(4, 327,0),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmulosh",	VX (4, 328),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vrsqrtefp",	VX (4, 330),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"vmrglh",	VX (4, 332),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3004,6 +3258,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vaddcuw",	VX (4, 384),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmaxsw",	VX (4, 386),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vslw",	VX (4, 388),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vrlwnm",	VX (4, 389),	VX_MASK,     PPCVEC3,       PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpnezw",	VXR(4, 391,0),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmulosw",	VX (4, 392),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vexptefp",	VX (4, 394),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"vmrglw",	VX (4, 396),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3012,6 +3268,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"macchwsu.",	XO (4, 204,0,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"vmaxsd",	VX (4, 450),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vsl",		VX (4, 452),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vrldnm",	VX (4, 453),	VX_MASK,     PPCVEC3,       PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpgefp",	VXR(4, 454,0),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vlogefp",	VX (4, 458),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"vpkswss",	VX (4, 462),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3021,6 +3278,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"nmacchws.",	XO (4, 238,0,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"evaddw",	VX (4, 512),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vaddubs",	VX (4, 512),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vmul10uq",	VX (4, 513),	VXVB_MASK,   PPCVEC3,	    PPCNONE,	{VD, VA}},
a094f6
 {"evaddiw",	VX (4, 514),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RB, UIMM}},
a094f6
 {"vminub",	VX (4, 514),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"evsubfw",	VX (4, 516),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
@@ -3037,6 +3295,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evextsh",	VX (4, 523),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
 {"evrndw",	VX (4, 524),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
 {"vspltb",	VX (4, 524),	VXUIMM4_MASK,PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM4}},
a094f6
+{"vextractub",	VX (4, 525),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"evcntlzw",	VX (4, 525),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
 {"evcntlsw",	VX (4, 526),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
 {"vupkhsb",	VX (4, 526),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
@@ -3075,12 +3334,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evcmpeq",	VX (4, 564),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{CRFD, RA, RB}},
a094f6
 {"cget",	APU(4, 284,0),	APU_RA_MASK, PPC405,	PPCNONE,	{RT, FSL}},
a094f6
 {"vadduhs",	VX (4, 576),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vmul10euq",	VX (4, 577),	VX_MASK,     PPCVEC3,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vminuh",	VX (4, 578),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vsrh",	VX (4, 580),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpgtuh",	VXR(4, 582,0),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmuleuh",	VX (4, 584),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vrfiz",	VX (4, 586),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"vsplth",	VX (4, 588),	VXUIMM3_MASK,PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM3}},
a094f6
+{"vextractuh",	VX (4, 589),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"vupkhsh",	VX (4, 590),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"nget",	APU(4, 300,0),	APU_RA_MASK, PPC405,	PPCNONE,	{RT, FSL}},
a094f6
 {"evsel",	EVSEL(4,79),	EVSEL_MASK,  PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB, CRFS}},
a094f6
@@ -3100,6 +3361,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vrfip",	VX (4, 650),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"evfscmpgt",	VX (4, 652),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{CRFD, RA, RB}},
a094f6
 {"vspltw",	VX (4, 652),	VXUIMM2_MASK,PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM2}},
a094f6
+{"vextractuw",	VX (4, 653),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"evfscmplt",	VX (4, 653),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{CRFD, RA, RB}},
a094f6
 {"evfscmpeq",	VX (4, 654),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{CRFD, RA, RB}},
a094f6
 {"vupklsb",	VX (4, 654),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
@@ -3131,6 +3393,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"efsdiv",	VX (4, 713),	VX_MASK,     PPCEFS|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vrfim",	VX (4, 714),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"efscmpgt",	VX (4, 716),	VX_MASK,     PPCEFS|PPCVLE, PPCNONE,	{CRFD, RA, RB}},
a094f6
+{"vextractd",	VX (4, 717),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"efscmplt",	VX (4, 717),	VX_MASK,     PPCEFS|PPCVLE, PPCNONE,	{CRFD, RA, RB}},
a094f6
 {"efscmpeq",	VX (4, 718),	VX_MASK,     PPCEFS|PPCVLE, PPCNONE,	{CRFD, RA, RB}},
a094f6
 {"vupklsh",	VX (4, 718),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
@@ -3195,6 +3458,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vcuxwfp",	VX (4, 778),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM}},
a094f6
 {"evlhhousplatx",VX(4, 780),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vspltisb",	VX (4, 780),	VXVB_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, SIMM}},
a094f6
+{"vinsertb",	VX (4, 781),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"evlhhousplat",VX (4, 781),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, EVUIMM_2, RA}},
a094f6
 {"evlhhossplatx",VX(4, 782),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vpkpx",	VX (4, 782),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3228,6 +3492,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evstwwox",	VX (4, 828),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evstwwo",	VX (4, 829),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, EVUIMM_4, RA}},
a094f6
 {"vaddshs",	VX (4, 832),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"bcdcpsgn.",	VX (4, 833),	VX_MASK,     PPCVEC3,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vminsh",	VX (4, 834),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vsrah",	VX (4, 836),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpgtsh",	VXR(4, 838,0),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3235,6 +3500,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vcfsx",	VX (4, 842),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM}},
a094f6
 {"vcsxwfp",	VX (4, 842),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM}},
a094f6
 {"vspltish",	VX (4, 844),	VXVB_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, SIMM}},
a094f6
+{"vinserth",	VX (4, 845),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"vupkhpx",	VX (4, 846),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"mullhw",	XRC(4, 424,0),	X_MASK,      MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"mullhw.",	XRC(4, 424,1),	X_MASK,      MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
@@ -3250,6 +3516,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vctuxs",	VX (4, 906),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM}},
a094f6
 {"vcfpuxws",	VX (4, 906),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM}},
a094f6
 {"vspltisw",	VX (4, 908),	VXVB_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, SIMM}},
a094f6
+{"vinsertw",	VX (4, 909),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"maclhwsu",	XO (4, 460,0,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"maclhwsu.",	XO (4, 460,0,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"vminsd",	VX (4, 962),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3258,6 +3525,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vcmpgtsd",	VXR(4, 967,0),	VXR_MASK,    PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vctsxs",	VX (4, 970),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM}},
a094f6
 {"vcfpsxws",	VX (4, 970),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VB, UIMM}},
a094f6
+{"vinsertd",	VX (4, 973),	VXUIMM4_MASK,PPCVEC3,	    PPCNONE,	{VD, VB, UIMM4}},
a094f6
 {"vupklpx",	VX (4, 974),	VXVA_MASK,   PPCVEC|PPCVLE, PPCNONE,	{VD, VB}},
a094f6
 {"maclhws",	XO (4, 492,0,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"maclhws.",	XO (4, 492,0,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
@@ -3270,6 +3538,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evmhessf",	VX (4,1027),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vand",	VX (4,1028),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpequb.",	VXR(4,	 6,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpneb.",	VXR(4,	 7,1),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"udi0fcm.",	APU(4, 515,0), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
 {"udi0fcm",	APU(4, 515,1), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
 {"evmhossf",	VX (4,1031),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
@@ -3302,6 +3571,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vcmpequh.",	VXR(4,	70,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"udi1fcm.",	APU(4, 547,0), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
 {"udi1fcm",	APU(4, 547,1), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
+{"vcmpneh.",	VXR(4,  71,1),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmwhssf",	VX (4,1095),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vpmsumh",	VX (4,1096),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmwlumi",	VX (4,1096),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
@@ -3331,10 +3601,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evmwsmia",	VX (4,1145),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evmwsmfa",	VX (4,1147),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vsubuwm",	VX (4,1152),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"bcdus.",	VX (4,1153),	VX_MASK,     PPCVEC3,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vavguw",	VX (4,1154),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vabsduw",	VX (4,1155),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmr",		VX (4,1156),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VBA}},
a094f6
 {"vor",		VX (4,1156),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vcmpnew.",	VXR(4, 135,1),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vpmsumw",	VX (4,1160),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpequw.",	VXR(4, 134,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"udi2fcm.",	APU(4, 579,0), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
@@ -3345,6 +3617,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"ps_merge10.",	XOPS(4,592,1),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
a094f6
 {"vsubudm",	VX (4,1216),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"evaddusiaaw",	VX (4,1216),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
+{"bcds.",	VX (4,1217),	VXPS_MASK,   PPCVEC3,	    PPCNONE,	{VD, VA, VB, PS}},
a094f6
 {"evaddssiaaw",	VX (4,1217),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
 {"evsubfusiaaw",VX (4,1218),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
 {"evsubfssiaaw",VX (4,1219),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA}},
a094f6
@@ -3370,6 +3643,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"ps_merge11.",	XOPS(4,624,1),	XOPS_MASK,   PPCPS,	PPCNONE,	{FRT, FRA, FRB}},
a094f6
 {"vsubuqm",	VX (4,1280),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmheusiaaw",	VX (4,1280),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
+{"bcdtrunc.",	VX (4,1281),	VXPS_MASK,   PPCVEC3,	    PPCNONE,	{VD, VA, VB, PS}},
a094f6
 {"evmhessiaaw",	VX (4,1281),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vavgsb",	VX (4,1282),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmhessfaaw",	VX (4,1283),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
@@ -3379,6 +3653,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evmhossiaaw",	VX (4,1285),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"udi4fcm.",	APU(4, 643,0), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
 {"udi4fcm",	APU(4, 643,1), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
+{"vcmpnezb.",	VXR(4, 263,1),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmhossfaaw",	VX (4,1287),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evmheumiaaw",	VX (4,1288),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vcipher",	VX (4,1288),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3399,11 +3674,13 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evmhogsmfaa",	VX (4,1327),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vsubcuq",	VX (4,1344),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmwlusiaaw",	VX (4,1344),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
+{"bcdutrunc.",	VX (4,1345),	VX_MASK,     PPCVEC3,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmwlssiaaw",	VX (4,1345),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vavgsh",	VX (4,1346),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vorc",	VX (4,1348),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"udi5fcm.",	APU(4, 675,0), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
 {"udi5fcm",	APU(4, 675,1), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
+{"vcmpnezh.",	VXR(4, 327,1),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vncipher",	VX (4,1352),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmwlumiaaw",	VX (4,1352),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vncipherlast",VX (4,1353),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3421,6 +3698,13 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evmheusianw",	VX (4,1408),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vsubcuw",	VX (4,1408),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmhessianw",	VX (4,1409),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
+{"bcdctsq.",	VXVA(4,1409,0),	VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"bcdcfsq.",	VXVA(4,1409,2),	VXVAPS_MASK, PPCVEC3,	    PPCNONE,	{VD, VB, PS}},
a094f6
+{"bcdctz.",	VXVA(4,1409,4),	VXVAPS_MASK, PPCVEC3,	    PPCNONE,	{VD, VB, PS}},
a094f6
+{"bcdctn.",	VXVA(4,1409,5),	VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"bcdcfz.",	VXVA(4,1409,6),	VXVAPS_MASK, PPCVEC3,	    PPCNONE,	{VD, VB, PS}},
a094f6
+{"bcdcfn.",	VXVA(4,1409,7),	VXVAPS_MASK, PPCVEC3,	    PPCNONE,	{VD, VB, PS}},
a094f6
+{"bcdsetsgn.",	VXVA(4,1409,31),VXVAPS_MASK, PPCVEC3,	    PPCNONE,	{VD, VB, PS}},
a094f6
 {"vavgsw",	VX (4,1410),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmhessfanw",	VX (4,1411),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vnand",	VX (4,1412),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3428,6 +3712,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evmhossianw",	VX (4,1413),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"udi6fcm.",	APU(4, 707,0), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
 {"udi6fcm",	APU(4, 707,1), APU_MASK, PPC405|PPC440, PPC476,		{URT, URA, URB}},
a094f6
+{"vcmpnezw.",	VXR(4, 391,1),	VXR_MASK,    PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmhossfanw",	VX (4,1415),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evmheumianw",	VX (4,1416),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evmhesmianw",	VX (4,1417),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
@@ -3444,6 +3729,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"evmhogsmian",	VX (4,1453),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evmhogsmfan",	VX (4,1455),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evmwlusianw",	VX (4,1472),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
+{"bcdsr.",	VX (4,1473),	VXPS_MASK,   PPCVEC3,	    PPCNONE,	{VD, VA, VB, PS}},
a094f6
 {"evmwlssianw",	VX (4,1473),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"vsld",	VX (4,1476),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpgefp.",	VXR(4, 454,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3452,6 +3738,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vsbox",	VX (4,1480),	VXVB_MASK,   PPCVEC2,	    PPCNONE,	{VD, VA}},
a094f6
 {"evmwlumianw",	VX (4,1480),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"evmwlsmianw",	VX (4,1481),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
+{"vbpermd",	VX (4,1484),	VX_MASK,     PPCVEC3,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"vpksdss",	VX (4,1486),	VX_MASK,     PPCVEC2,	    PPCNONE,	{VD, VA, VB}},
a094f6
 {"evmwssfan",	VX (4,1491),	VX_MASK,     PPCSPE|PPCVLE, PPCNONE,	{RS, RA, RB}},
a094f6
 {"macchwso",	XO (4, 236,1,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
@@ -3462,17 +3749,35 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"nmacchwso",	XO (4, 238,1,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"nmacchwso.",	XO (4, 238,1,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"vsububs",	VX (4,1536),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vclzlsbb",	VXVA(4,1538,0), VXVA_MASK,   PPCVEC3,	    PPCNONE,	{RT, VB}},
a094f6
+{"vctzlsbb",	VXVA(4,1538,1), VXVA_MASK,   PPCVEC3,	    PPCNONE,	{RT, VB}},
a094f6
+{"vnegw",	VXVA(4,1538,6), VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vnegd",	VXVA(4,1538,7), VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vprtybw",	VXVA(4,1538,8), VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vprtybd",	VXVA(4,1538,9), VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vprtybq",	VXVA(4,1538,10),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vextsb2w",	VXVA(4,1538,16),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vextsh2w",	VXVA(4,1538,17),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vextsb2d",	VXVA(4,1538,24),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vextsh2d",	VXVA(4,1538,25),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vextsw2d",	VXVA(4,1538,26),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vctzb",	VXVA(4,1538,28),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vctzh",	VXVA(4,1538,29),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vctzw",	VXVA(4,1538,30),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
+{"vctzd",	VXVA(4,1538,31),VXVA_MASK,   PPCVEC3,	    PPCNONE,	{VD, VB}},
a094f6
 {"mfvscr",	VX (4,1540),	VXVAVB_MASK, PPCVEC|PPCVLE, PPCNONE,	{VD}},
a094f6
 {"vcmpgtub.",	VXR(4, 518,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"udi8fcm.",	APU(4, 771,0),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"udi8fcm",	APU(4, 771,1),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"vsum4ubs",	VX (4,1544),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vextublx",	VX (4,1549),	VX_MASK,     PPCVEC3,	    PPCNONE,	{RT, RA, VB}},
a094f6
 {"vsubuhs",	VX (4,1600),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"mtvscr",	VX (4,1604),	VXVDVA_MASK, PPCVEC|PPCVLE, PPCNONE,	{VB}},
a094f6
 {"vcmpgtuh.",	VXR(4, 582,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vsum4shs",	VX (4,1608),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"udi9fcm.",	APU(4, 804,0),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"udi9fcm",	APU(4, 804,1),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
+{"vextuhlx",	VX (4,1613),	VX_MASK,     PPCVEC3,	PPCNONE,	{RT, RA, VB}},
a094f6
 {"vupkhsw",	VX (4,1614),	VXVA_MASK,   PPCVEC2,	    PPCNONE,	{VD, VB}},
a094f6
 {"vsubuws",	VX (4,1664),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vshasigmaw",	VX (4,1666),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, ST, SIX}},
a094f6
@@ -3482,6 +3787,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"udi10fcm",	APU(4, 835,1),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"vsum2sws",	VX (4,1672),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmrgow",	VX (4,1676),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"vextuwlx",	VX (4,1677),	VX_MASK,     PPCVEC3,	PPCNONE,	{RT, RA, VB}},
a094f6
 {"vshasigmad",	VX (4,1730),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, ST, SIX}},
a094f6
 {"vsrd",	VX (4,1732),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpgtfp.",	VXR(4, 710,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
@@ -3492,16 +3798,20 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"vsubsbs",	VX (4,1792),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vclzb",	VX (4,1794),	VXVA_MASK,   PPCVEC2,	PPCNONE,	{VD, VB}},
a094f6
 {"vpopcntb",	VX (4,1795),	VXVA_MASK,   PPCVEC2,	PPCNONE,	{VD, VB}},
a094f6
+{"vsrv",	VX (4,1796),	VX_MASK,     PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpgtsb.",	VXR(4, 774,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"udi12fcm.",	APU(4, 899,0),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"udi12fcm",	APU(4, 899,1),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"vsum4sbs",	VX (4,1800),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vextubrx",	VX (4,1805),	VX_MASK,     PPCVEC3,	PPCNONE,	{RT, RA, VB}},
a094f6
 {"maclhwuo",	XO (4, 396,1,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"maclhwuo.",	XO (4, 396,1,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"vsubshs",	VX (4,1856),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vclzh",	VX (4,1858),	VXVA_MASK,   PPCVEC2,	PPCNONE,	{VD, VB}},
a094f6
 {"vpopcnth",	VX (4,1859),	VXVA_MASK,   PPCVEC2,	PPCNONE,	{VD, VB}},
a094f6
+{"vslv",	VX (4,1860),	VX_MASK,     PPCVEC3,	PPCNONE,	{VD, VA, VB}},
a094f6
 {"vcmpgtsh.",	VXR(4, 838,1),	VXR_MASK,    PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
+{"vextuhrx",	VX (4,1869),	VX_MASK,     PPCVEC3,	PPCNONE,	{RT, RA, VB}},
a094f6
 {"udi13fcm.",	APU(4, 931,0),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"udi13fcm",	APU(4, 931,1),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"maclhwo",	XO (4, 428,1,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
@@ -3516,6 +3826,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"udi14fcm",	APU(4, 963,1),	APU_MASK,    PPC440,	PPC476,		{URT, URA, URB}},
a094f6
 {"vsumsws",	VX (4,1928),	VX_MASK,     PPCVEC|PPCVLE, PPCNONE,	{VD, VA, VB}},
a094f6
 {"vmrgew",	VX (4,1932),	VX_MASK,     PPCVEC2,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"vextuwrx",	VX (4,1933),	VX_MASK,     PPCVEC3,	PPCNONE,	{RT, RA, VB}},
a094f6
 {"maclhwsuo",	XO (4, 460,1,0),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"maclhwsuo.",	XO (4, 460,1,1),XO_MASK,     MULHW|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"vclzd",	VX (4,1986),	VXVA_MASK,   PPCVEC2,	PPCNONE,	{VD, VB}},
a094f6
@@ -3854,6 +4165,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"mcrf",      XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM,	PPCNONE,	{BF, BFA}},
a094f6
 
a094f6
+{"addpcis",   DX(19,2),		DX_MASK,     POWER9,	PPCNONE,	{RT, DXD}},
a094f6
+{"subpcis",   DX(19,2),		DX_MASK,     POWER9,	PPCNONE,	{RT, NDXD}},
a094f6
+
a094f6
 {"bdnzlr",   XLO(19,BODNZ,16,0),	XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
a094f6
 {"bdnzlr-",  XLO(19,BODNZ,16,0),	XLBOBIBB_MASK, PPCCOM,   ISA_V2,	{0}},
a094f6
 {"bdnzlrl",  XLO(19,BODNZ,16,1),	XLBOBIBB_MASK, PPCCOM,	 PPCNONE,	{0}},
a094f6
@@ -4113,17 +4427,20 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"crset",	XL(19,289),	XL_MASK,     PPCCOM,	PPCNONE,	{BT, BAT, BBA}},
a094f6
 {"creqv",	XL(19,289),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
a094f6
 
a094f6
-{"doze",	XL(19,402),	0xffffffff,  POWER6,	PPCNONE,	{0}},
a094f6
+{"urfid",	XL(19,306),	0xffffffff,  POWER9,	PPCNONE,	{0}},
a094f6
+{"stop",	XL(19,370),	0xffffffff,  POWER9,	PPCNONE,	{0}},
a094f6
+
a094f6
+{"doze",	XL(19,402),	0xffffffff,  POWER6,	POWER9,		{0}},
a094f6
 
a094f6
 {"crorc",	XL(19,417),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
a094f6
 
a094f6
-{"nap",		XL(19,434),	0xffffffff,  POWER6,	PPCNONE,	{0}},
a094f6
+{"nap",		XL(19,434),	0xffffffff,  POWER6,	POWER9,		{0}},
a094f6
 
a094f6
 {"crmove",	XL(19,449),	XL_MASK,     PPCCOM,	PPCNONE,	{BT, BA, BBA}},
a094f6
 {"cror",	XL(19,449),	XL_MASK,     COM,	PPCNONE,	{BT, BA, BB}},
a094f6
 
a094f6
-{"sleep",	XL(19,466),	0xffffffff,  POWER6,	PPCNONE,	{0}},
a094f6
-{"rvwinkle",	XL(19,498),	0xffffffff,  POWER6,	PPCNONE,	{0}},
a094f6
+{"sleep",	XL(19,466),	0xffffffff,  POWER6,	POWER9,		{0}},
a094f6
+{"rvwinkle",	XL(19,498),	0xffffffff,  POWER6,	POWER9,		{0}},
a094f6
 
a094f6
 {"bctr",    XLO(19,BOU,528,0),		XLBOBIBB_MASK, COM,	 PPCNONE,	{0}},
a094f6
 {"bctrl",   XLO(19,BOU,528,1),		XLBOBIBB_MASK, COM,	 PPCNONE,	{0}},
a094f6
@@ -4459,7 +4776,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"ldepx",	X(31,29),	X_MASK,      E500MC|PPCA2|PPCVLE, PPCNONE, {RT, RA0, RB}},
a094f6
 
a094f6
-{"waitasec",	X(31,30),	XRTRARB_MASK,POWER8,	PPCNONE,	{0}},
a094f6
+{"waitasec",	X(31,30),	XRTRARB_MASK,POWER8,	POWER9,		{0}},
a094f6
+{"wait",	X(31,30),	XWC_MASK,    POWER9,	PPCNONE,	{WC}},
a094f6
 
a094f6
 {"lwepx",	X(31,31),	X_MASK,	     E500MC|PPCA2|PPCVLE, PPCNONE, {RT, RA0, RB}},
a094f6
 
a094f6
@@ -4591,6 +4909,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"dcbfep",	XRT(31,127,0),	XRT_MASK,    E500MC|PPCA2|PPCVLE, PPCNONE, {RA0, RB}},
a094f6
 
a094f6
+{"setb",	X(31,128),	XRB_MASK|(3<<16), POWER9, PPCNONE,	{RT, BFA}},
a094f6
+
a094f6
 {"wrtee",	X(31,131),	XRARB_MASK,  PPC403|BOOKE|PPCA2|PPC476|PPCVLE, PPCNONE, {RS}},
a094f6
 
a094f6
 {"dcbtstls",	X(31,134),	X_MASK,	     PPCCHLK|PPC476|TITAN|PPCVLE, PPCNONE, {CT, RA0, RB}},
a094f6
@@ -4673,6 +4993,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"prtyd",	X(31,186),	XRB_MASK, POWER6|PPCA2,	PPCNONE,	{RA, RS}},
a094f6
 
a094f6
+{"cmprb",	X(31,192),	XCMP_MASK,   POWER9,	PPCNONE,	{BF, L, RA, RB}},
a094f6
+
a094f6
 {"icblq.",	XRC(31,198,1),	X_MASK,      E6500,	PPCNONE,	{CT, RA0, RB}},
a094f6
 
a094f6
 {"stvewx",	X(31,199),	X_MASK,      PPCVEC,	PPCNONE,	{VS, RA0, RB}},
a094f6
@@ -4711,6 +5033,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"stbepx",	X(31,223),	X_MASK,      E500MC|PPCA2|PPCVLE, PPCNONE, {RS, RA0, RB}},
a094f6
 
a094f6
+{"cmpeqb",	X(31,224),	XCMPL_MASK,   POWER9,	PPCNONE,	{BF, RA, RB}},
a094f6
+
a094f6
 {"icblc",	X(31,230),	X_MASK,	PPCCHLK|PPC476|TITAN|PPCVLE, PPCNONE, {CT, RA0, RB}},
a094f6
 
a094f6
 {"stvx",	X(31,231),	X_MASK,      PPCVEC|PPCVLE, PPCNONE,	{VS, RA0, RB}},
a094f6
@@ -4770,14 +5094,22 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"doz",		XO(31,264,0,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"doz.",	XO(31,264,0,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"modud",	X(31,265),	X_MASK,      POWER9,	PPCNONE,	{RT, RA, RB}},
a094f6
+
a094f6
 {"add",		XO(31,266,0,0),	XO_MASK,     PPCCOM|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"cax",		XO(31,266,0,0),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"add.",	XO(31,266,0,1),	XO_MASK,     PPCCOM|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"cax.",	XO(31,266,0,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"moduw",	X(31,267),	X_MASK,      POWER9,	PPCNONE,	{RT, RA, RB}},
a094f6
+
a094f6
+{"lxvx",	X(31,268),	XX1_MASK|1<<6, PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+{"lxvl",	X(31,269),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+
a094f6
 {"ehpriv",	X(31,270),	0xffffffff, E500MC|PPCA2|PPCVLE, PPCNONE, {0}},
a094f6
 
a094f6
-{"tlbiel",	X(31,274),	XRTLRA_MASK, POWER4,	PPC476,		{RB, L}},
a094f6
+{"tlbiel",	X(31,274),	X_MASK|1<<20,POWER9,	PPC476,  	{RB, RSO, RIC, PRS, X_R}},
a094f6
+{"tlbiel",	X(31,274),	XRTLRA_MASK, POWER4,	POWER9|PPC476,	{RB, L}},
a094f6
 
a094f6
 {"mfapidi",	X(31,275),	X_MASK,      BOOKE,	E500|TITAN,  	{RT, RA}},
a094f6
 
a094f6
@@ -4805,12 +5137,19 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"lvexhx",	X(31,293),	X_MASK,      PPCVEC2,	PPCNONE,	{VD, RA0, RB}},
a094f6
 {"lvepx",	X(31,295),	X_MASK,      PPCVEC2|PPCVLE, PPCNONE,	{VD, RA0, RB}},
a094f6
 
a094f6
+{"lxvll",	X(31,301),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+
a094f6
 {"mfbhrbe",	X(31,302),	X_MASK,      POWER8,	PPCNONE,	{RT, BHRBE}},
a094f6
 
a094f6
-{"tlbie",	X(31,306),	XRA_MASK,    POWER7,	TITAN,  	{RB, RS}},
a094f6
+{"tlbie",	X(31,306),	X_MASK|1<<20,POWER9,	TITAN,  	{RB, RS, RIC, PRS, X_R}},
a094f6
+{"tlbie",	X(31,306),	XRA_MASK,    POWER7,	POWER9|TITAN,  	{RB, RS}},
a094f6
 {"tlbie",	X(31,306),	XRTLRA_MASK, PPC,	E500|POWER7|TITAN,  	{RB, L}},
a094f6
 {"tlbi",	X(31,306),	XRT_MASK,    POWER,	PPCNONE,	{RA0, RB}},
a094f6
 
a094f6
+{"mfvsrld",	X(31,307),	XX1RB_MASK,  PPCVSX3,	PPCNONE,	{RA, XS6}},
a094f6
+
a094f6
+{"ldmx",	X(31,309),	X_MASK,      POWER9,	PPCNONE,  	{RT, RA0, RB}},
a094f6
+
a094f6
 {"eciwx",	X(31,310),	X_MASK,      PPC,	E500|TITAN,  	{RT, RA0, RB}},
a094f6
 
a094f6
 {"lhzux",	X(31,311),	X_MASK,      COM|PPCVLE, PPCNONE,	{RT, RAL, RB}},
a094f6
@@ -4871,6 +5210,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"mfpmr",	X(31,334),	X_MASK, PPCPMR|PPCE300|PPCVLE, PPCNONE,	{RT, PMR}},
a094f6
 {"mftmr",	X(31,366),	X_MASK,	PPCTMR|E6500,	PPCNONE,	{RT, TMR}},
a094f6
 
a094f6
+{"slbsync",	X(31,338),      0xffffffff,  POWER9,	PPCNONE,	{0}},
a094f6
+
a094f6
 {"mfmq",	XSPR(31,339,  0), XSPR_MASK, M601,	PPCNONE,	{RT}},
a094f6
 {"mfxer",	XSPR(31,339,  1), XSPR_MASK, COM|PPCVLE, PPCNONE,	{RT}},
a094f6
 {"mfrtcu",	XSPR(31,339,  4), XSPR_MASK, COM,	TITAN,  	{RT}},
a094f6
@@ -5087,6 +5428,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divs",	XO(31,363,0,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"divs.",	XO(31,363,0,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"lxvwsx",	X(31,364),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+
a094f6
 {"tlbia",	X(31,370),	0xffffffff,  PPC,	E500|TITAN,  	{0}},
a094f6
 
a094f6
 {"mftbu",	XSPR(31,371,269), XSPR_MASK, PPC,	NO371|POWER4,	{RT}},
a094f6
@@ -5114,10 +5457,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divweu",	XO(31,395,0,0),	XO_MASK,  POWER7|PPCA2,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"divweu.",	XO(31,395,0,1),	XO_MASK,  POWER7|PPCA2,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"stxvx",	X(31,396),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+{"stxvl",	X(31,397),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+
a094f6
 {"dcblce",	X(31,398),	X_MASK,      PPCCHLK,	E500MC,		{CT, RA, RB}},
a094f6
 
a094f6
 {"slbmte",	X(31,402),	XRA_MASK,    PPC64,	PPCNONE,	{RS, RB}},
a094f6
 
a094f6
+{"mtvsrws",	X(31,403),	XX1RB_MASK,  PPCVSX3,	PPCNONE,	{XT6, RA}},
a094f6
+
a094f6
 {"pbt.",	XRC(31,404,1),	X_MASK,      POWER8,	PPCNONE,	{RS, RA0, RB}},
a094f6
 
a094f6
 {"icswx",	XRC(31,406,0),	X_MASK,   POWER7|PPCA2,	PPCNONE,	{RS, RA, RB}},
a094f6
@@ -5141,10 +5489,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divwe",	XO(31,427,0,0),	XO_MASK,  POWER7|PPCA2,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"divwe.",	XO(31,427,0,1),	XO_MASK,  POWER7|PPCA2,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"stxvll",	X(31,429),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+
a094f6
 {"clrbhrb",	X(31,430),	0xffffffff,  POWER8,	PPCNONE,	{0}},
a094f6
 
a094f6
 {"slbie",	X(31,434),	XRTRA_MASK,  PPC64,	PPCNONE,	{RB}},
a094f6
 
a094f6
+{"mtvsrdd",	X(31,435),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+
a094f6
 {"ecowx",	X(31,438),	X_MASK,      PPC,	E500|TITAN,  	{RT, RA0, RB}},
a094f6
 
a094f6
 {"sthux",	X(31,439),	X_MASK,      COM|PPCVLE, PPCNONE,	{RS, RAS, RB}},
a094f6
@@ -5214,6 +5566,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"mtpmr",	X(31,462),	X_MASK, PPCPMR|PPCE300|PPCVLE, PPCNONE,	{PMR, RS}},
a094f6
 {"mttmr",	X(31,494),	X_MASK,	PPCTMR|E6500,	PPCNONE,	{TMR, RS}},
a094f6
 
a094f6
+{"slbieg",	X(31,466),	XRA_MASK,    POWER9,	PPCNONE,	{RS, RB}},
a094f6
+
a094f6
 {"mtmq",	XSPR(31,467,  0), XSPR_MASK, M601,	PPCNONE,	{RS}},
a094f6
 {"mtxer",	XSPR(31,467,  1), XSPR_MASK, COM|PPCVLE, PPCNONE,	{RS}},
a094f6
 {"mtlr",	XSPR(31,467,  8), XSPR_MASK, COM|PPCVLE, PPCNONE,	{RS}},
a094f6
@@ -5413,7 +5767,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"cmpb",	X(31,508),	X_MASK, POWER6|PPCA2|PPC476, PPCNONE,	{RA, RS, RB}},
a094f6
 
a094f6
-{"mcrxr",	X(31,512), XRARB_MASK|(3<<21), COM|PPCVLE, POWER7,	{BF}},
a094f6
+{"mcrxr",	X(31,512),	XBFRARB_MASK, COM|PPCVLE, POWER7,	{BF}},
a094f6
 
a094f6
 {"lbdx",	X(31,515),	X_MASK,      E500MC|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
@@ -5456,6 +5810,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"rrib",	XRC(31,537,0),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
a094f6
 {"rrib.",	XRC(31,537,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, RB}},
a094f6
 
a094f6
+{"cnttzw",	XRC(31,538,0),	XRB_MASK,    POWER9,	PPCNONE,	{RA, RS}},
a094f6
+{"cnttzw.",	XRC(31,538,1),	XRB_MASK,    POWER9,	PPCNONE,	{RA, RS}},
a094f6
+
a094f6
 {"srd",		XRC(31,539,0),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
a094f6
 {"srd.",	XRC(31,539,1),	X_MASK,      PPC64,	PPCNONE,	{RA, RS, RB}},
a094f6
 
a094f6
@@ -5480,10 +5837,17 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"lfsux",	X(31,567),	X_MASK,      COM,	PPCEFS,		{FRT, RAS, RB}},
a094f6
 
a094f6
+{"cnttzd",	XRC(31,570,0),	XRB_MASK,    POWER9,	PPCNONE,	{RA, RS}},
a094f6
+{"cnttzd.",	XRC(31,570,1),	XRB_MASK,    POWER9,	PPCNONE,	{RA, RS}},
a094f6
+
a094f6
+{"mcrxrx",	X(31,576),	XBFRARB_MASK, POWER9,	PPCNONE,	{BF}},
a094f6
+
a094f6
 {"lwdx",	X(31,579),	X_MASK,      E500MC|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
 {"lvtlx",	X(31,581),	X_MASK,      PPCVEC2,	PPCNONE,	{VD, RA0, RB}},
a094f6
 
a094f6
+{"lwat",	X(31,582),	X_MASK,      POWER9,	PPCNONE,	{RT, RA0, FC}},
a094f6
+
a094f6
 {"lwfcmux",	APU(31,583,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
a094f6
 
a094f6
 {"lxsdx",	X(31,588),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA0, RB}},
a094f6
@@ -5496,8 +5860,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"hwsync",	XSYNC(31,598,0), 0xffffffff, POWER4,	BOOKE|PPC476,	{0}},
a094f6
 {"lwsync",	XSYNC(31,598,1), 0xffffffff, PPC,	E500,		{0}},
a094f6
 {"ptesync",	XSYNC(31,598,2), 0xffffffff, PPC64,	PPCNONE,	{0}},
a094f6
-{"sync",	X(31,598),	XSYNCLE_MASK,E6500,	PPCNONE,	{LS, ESYNC}},
a094f6
-{"sync",	X(31,598),	XSYNC_MASK, PPCCOM|PPCVLE, BOOKE|PPC476, {LS}},
a094f6
+{"sync",	X(31,598),	XSYNCLE_MASK,POWER9|E6500, PPCNONE,	{LS, ESYNC}},
a094f6
+{"sync",	X(31,598),	XSYNC_MASK, PPCCOM|PPCVLE, BOOKE|PPC476|POWER9, {LS}},
a094f6
 {"msync",	X(31,598),	0xffffffff, BOOKE|PPCA2|PPC476, PPCNONE, {0}},
a094f6
 {"sync",	X(31,598),	0xffffffff, BOOKE|PPC476, E6500,	{0}},
a094f6
 {"lwsync",	X(31,598),	0xffffffff, E500,	PPCNONE,	{0}},
a094f6
@@ -5512,6 +5876,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"lvswx",	X(31,613),	X_MASK,      PPCVEC2,	PPCNONE,	{VD, RA0, RB}},
a094f6
 
a094f6
+{"ldat",	X(31,614),	X_MASK,      POWER9,	PPCNONE,	{RT, RA0, FC}},
a094f6
+
a094f6
 {"lqfcmux",	APU(31,615,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
a094f6
 
a094f6
 {"nego",	XO(31,104,1,0),	XORB_MASK,   COM|PPCVLE, PPCNONE,	{RT, RA}},
a094f6
@@ -5584,6 +5950,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"stvflx",	X(31,709),	X_MASK,      PPCVEC2,	PPCNONE,	{VS, RA0, RB}},
a094f6
 
a094f6
+{"stwat",	X(31,710),	X_MASK,      POWER9,	PPCNONE,	{RS, RA0, FC}},
a094f6
+
a094f6
 {"stwfcmux",	APU(31,711,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
a094f6
 
a094f6
 {"stxsdx",	X(31,716),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA0, RB}},
a094f6
@@ -5620,6 +5988,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"stvswx",	X(31,741),	X_MASK,      PPCVEC2,	PPCNONE,	{VS, RA0, RB}},
a094f6
 
a094f6
+{"stdat",	X(31,742),	X_MASK,      POWER9,	PPCNONE,	{RS, RA0, FC}},
a094f6
+
a094f6
 {"stqfcmux",	APU(31,743,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
a094f6
 
a094f6
 {"subfmeo",	XO(31,232,1,0),	XORB_MASK,   PPCCOM,	PPCNONE,	{RT, RA}},
a094f6
@@ -5644,6 +6014,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"tresume.",	XRCL(31,750,1,1), XRTRARB_MASK,PPCHTM,	PPCNONE,	{0}},
a094f6
 {"tsr.",	XRC(31,750,1),    XRTLRARB_MASK,PPCHTM,	PPCNONE,	{L}},
a094f6
 
a094f6
+{"darn",	X(31,755),	XLRAND_MASK, POWER9,	PPCNONE,	{RT, LRAND}},
a094f6
+
a094f6
 {"dcba",	X(31,758), XRT_MASK, PPC405|PPC7450|BOOKE|PPCA2|PPC476|PPCVLE, PPCNONE, {RA0, RB}},
a094f6
 {"dcbal",	XOPL(31,758,1), XRT_MASK,    E500MC,	PPCNONE,	{RA0, RB}},
a094f6
 
a094f6
@@ -5653,6 +6025,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"srliq.",	XRC(31,760,1),	X_MASK,      M601,	PPCNONE,	{RA, RS, SH}},
a094f6
 
a094f6
 {"lvsm",	X(31,773),	X_MASK,      PPCVEC2,	PPCNONE,	{VD, RA0, RB}},
a094f6
+
a094f6
+{"copy_first",	XOPL(31,774,1),	XRT_MASK,    POWER9,	PPCNONE,	{RA0, RB}},
a094f6
+{"copy",	X(31,774),	XLRT_MASK,   POWER9,	PPCNONE,	{RA0, RB, L}},
a094f6
+
a094f6
 {"stvepxl",	X(31,775),	X_MASK,      PPCVEC2,	PPCNONE,	{VS, RA0, RB}},
a094f6
 {"lvlxl",	X(31,775),	X_MASK,      CELL,	PPCNONE,	{VD, RA0, RB}},
a094f6
 {"ldfcmux",	APU(31,775,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
a094f6
@@ -5665,7 +6041,11 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"addo.",	XO(31,266,1,1),	XO_MASK, PPCCOM|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 {"caxo.",	XO(31,266,1,1),	XO_MASK,     PWRCOM,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"modsd",	X(31,777),	X_MASK,      POWER9,	PPCNONE,	{RT, RA, RB}},
a094f6
+{"modsw",	X(31,779),	X_MASK,      POWER9,	PPCNONE,	{RT, RA, RB}},
a094f6
+
a094f6
 {"lxvw4x",	X(31,780),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+{"lxsibzx",	X(31,781),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
 
a094f6
 {"tabortwc.",	XRC(31,782,1),	X_MASK,      PPCHTM,	PPCNONE,	{TO, RA, RB}},
a094f6
 
a094f6
@@ -5692,6 +6072,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"stvepx",	X(31,807),	X_MASK,      PPCVEC2,	PPCNONE,	{VS, RA0, RB}},
a094f6
 {"lvrxl",	X(31,807),	X_MASK,      CELL,	PPCNONE,	{VD, RA0, RB}},
a094f6
 
a094f6
+{"lxvh8x",	X(31,812),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+{"lxsihzx",	X(31,813),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+
a094f6
 {"tabortdc.",	XRC(31,814,1),	X_MASK,      PPCHTM,	PPCNONE,	{TO, RA, RB}},
a094f6
 
a094f6
 {"rac",		X(31,818),	X_MASK,      M601,	PPCNONE,	{RT, RA, RB}},
a094f6
@@ -5714,17 +6097,20 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 
a094f6
 {"lvtlxl",	X(31,837),	X_MASK,      PPCVEC2,	PPCNONE,	{VD, RA0, RB}},
a094f6
 
a094f6
+{"cp_abort",	X(31,838),	XRTRARB_MASK,POWER9,	PPCNONE,	{0}},
a094f6
+
a094f6
 {"divo",	XO(31,331,1,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"divo.",	XO(31,331,1,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
 {"lxvd2x",	X(31,844),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA0, RB}},
a094f6
-{"lxvx",	X(31,844),	XX1_MASK,    PPCVSX,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+{"lxvx",	X(31,844),	XX1_MASK,    POWER8,	POWER9|PPCVSX3,	{XT6, RA0, RB}},
a094f6
 
a094f6
 {"tabortwci.",	XRC(31,846,1),	X_MASK,      PPCHTM,	PPCNONE,	{TO, RA, HTM_SI}},
a094f6
 
a094f6
 {"tlbsrx.",	XRC(31,850,1),	XRT_MASK,    PPCA2,	PPCNONE,	{RA0, RB}},
a094f6
 
a094f6
-{"slbmfev",	X(31,851),	XRA_MASK,    PPC64,	PPCNONE,	{RT, RB}},
a094f6
+{"slbmfev",	X(31,851),	XRLA_MASK,   POWER9,	PPCNONE,	{RT, RB, A_L}},
a094f6
+{"slbmfev",	X(31,851),	XRA_MASK,    PPC64,	POWER9,		{RT, RB}},
a094f6
 
a094f6
 {"lbzcix",	X(31,853),	X_MASK,      POWER6,	PPCNONE,	{RT, RA0, RB}},
a094f6
 
a094f6
@@ -5743,12 +6129,25 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divso",	XO(31,363,1,0),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"divso.",	XO(31,363,1,1),	XO_MASK,     M601,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"lxvb16x",	X(31,876),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA0, RB}},
a094f6
+
a094f6
 {"tabortdci.",	XRC(31,878,1),	X_MASK,      PPCHTM,	PPCNONE,	{TO, RA, HTM_SI}},
a094f6
 
a094f6
+{"rmieg",	X(31,882),	XRTRA_MASK,  POWER9,	PPCNONE,	{RB}},
a094f6
+
a094f6
 {"ldcix",	X(31,885),	X_MASK,      POWER6,	PPCNONE,	{RT, RA0, RB}},
a094f6
 
a094f6
+{"msgsync",	X(31,886),	0xffffffff,  POWER9,	PPCNONE,	{0}},
a094f6
+
a094f6
 {"lfiwzx",	X(31,887),	X_MASK,   POWER7|PPCA2,	PPCNONE,	{FRT, RA0, RB}},
a094f6
 
a094f6
+{"extswsli",	XS(31,445,0),	XS_MASK,     POWER9,	PPCNONE,	{RA, RS, SH6}},
a094f6
+{"extswsli.",	XS(31,445,1),	XS_MASK,     POWER9,	PPCNONE,	{RA, RS, SH6}},
a094f6
+
a094f6
+{"paste",	XRC(31,902,0),  XLRT_MASK,   POWER9,	PPCNONE,	{RA0, RB, L0}},
a094f6
+{"paste_last",	XRCL(31,902,1,1),XRT_MASK,   POWER9,	PPCNONE,	{RA0, RB}},
a094f6
+{"paste.",	XRC(31,902,1),  XLRT_MASK,   POWER9,	PPCNONE,	{RA0, RB, L1}},
a094f6
+
a094f6
 {"stvlxl",	X(31,903),	X_MASK,      CELL,	PPCNONE,	{VS, RA0, RB}},
a094f6
 {"stdfcmux",	APU(31,903,0), 	APU_MASK,    PPC405,	PPCNONE,	{FCRT, RA, RB}},
a094f6
 
a094f6
@@ -5758,13 +6157,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divweuo.",	XO(31,395,1,1),	XO_MASK,  POWER7|PPCA2,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
 {"stxvw4x",	X(31,908),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+{"stxsibx",	X(31,909),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XS6, RA0, RB}},
a094f6
 
a094f6
 {"tabort.",	XRC(31,910,1),	XRTRB_MASK,  PPCHTM,	PPCNONE,	{RA}},
a094f6
 
a094f6
 {"tlbsx",	XRC(31,914,0),	X_MASK, PPC403|BOOKE|PPCA2|PPC476, PPCNONE, {RTO, RA0, RB}},
a094f6
 {"tlbsx.",	XRC(31,914,1),	X_MASK, PPC403|BOOKE|PPCA2|PPC476, PPCNONE, {RTO, RA0, RB}},
a094f6
 
a094f6
-{"slbmfee",	X(31,915),	XRA_MASK,    PPC64,	PPCNONE,	{RT, RB}},
a094f6
+{"slbmfee",	X(31,915),	XRLA_MASK,   POWER9,	PPCNONE,	{RT, RB, A_L}},
a094f6
+{"slbmfee",	X(31,915),	XRA_MASK,    PPC64,	POWER9,		{RT, RB}},
a094f6
 
a094f6
 {"stwcix",	X(31,917),	X_MASK,      POWER6,	PPCNONE,	{RS, RA0, RB}},
a094f6
 
a094f6
@@ -5799,6 +6200,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divweo",	XO(31,427,1,0),	XO_MASK,  POWER7|PPCA2,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"divweo.",	XO(31,427,1,1),	XO_MASK,  POWER7|PPCA2,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"stxvh8x",	X(31,940),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+{"stxsihx",	X(31,941),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+
a094f6
 {"treclaim.",	XRC(31,942,1),	XRTRB_MASK,  PPCHTM,	PPCNONE,	{RA}},
a094f6
 
a094f6
 {"tlbrehi",	XTLB(31,946,0),	XTLB_MASK,   PPC403,	PPCA2,		{RT, RA}},
a094f6
@@ -5830,7 +6234,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divwuo.",	XO(31,459,1,1),	XO_MASK,     PPC|PPCVLE, PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
 {"stxvd2x",	X(31,972),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA0, RB}},
a094f6
-{"stxvx",	X(31,972),	XX1_MASK,    PPCVSX,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+{"stxvx",	X(31,972),	XX1_MASK,    POWER8,	POWER9|PPCVSX3,	{XS6, RA0, RB}},
a094f6
 
a094f6
 {"tlbld",	X(31,978),	XRTRA_MASK,  PPC, PPC403|BOOKE|PPCA2|PPC476, {RB}},
a094f6
 {"tlbwehi",	XTLB(31,978,0),	XTLB_MASK,   PPC403,	PPCNONE,	{RT, RA}},
a094f6
@@ -5863,6 +6267,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"divwo",	XO(31,491,1,0),	XO_MASK,   PPC|PPCVLE,	PPCNONE,	{RT, RA, RB}},
a094f6
 {"divwo.",	XO(31,491,1,1),	XO_MASK,   PPC|PPCVLE,	PPCNONE,	{RT, RA, RB}},
a094f6
 
a094f6
+{"stxvb16x",	X(31,1004),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XS6, RA0, RB}},
a094f6
+
a094f6
 {"trechkpt.",	XRC(31,1006,1),	XRTRARB_MASK,PPCHTM,	PPCNONE,	{0}},
a094f6
 
a094f6
 {"tlbli",	X(31,1010),	XRTRA_MASK,  PPC,	TITAN,  	{RB}},
a094f6
@@ -5947,6 +6353,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"psq_l",	OP(56),		OP_MASK,     PPCPS,	PPCNONE,	{FRT,PSD,RA,PSW,PSQ}},
a094f6
 {"lfq",		OP(56),		OP_MASK,     POWER2,	PPCNONE,	{FRT, D, RA0}},
a094f6
 
a094f6
+{"lxsd",	DSO(57,2),	DS_MASK,     PPCVSX3,	PPCNONE,	{VD, DS, RA0}},
a094f6
+{"lxssp",	DSO(57,3),	DS_MASK,     PPCVSX3,	PPCNONE,	{VD, DS, RA0}},
a094f6
 {"lfdp",	OP(57),		OP_MASK,     POWER6,	POWER7,		{FRTp, DS, RA0}},
a094f6
 {"psq_lu",	OP(57),		OP_MASK,     PPCPS,	PPCNONE,	{FRT,PSD,RA,PSW,PSQ}},
a094f6
 {"lfqu",	OP(57),		OP_MASK,     POWER2,	PPCNONE,	{FRT, D, RA0}},
a094f6
@@ -6046,6 +6454,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"dcmpu",	X(59,642),	X_MASK,      POWER6,	PPCNONE,	{BF,  FRA, FRB}},
a094f6
 
a094f6
 {"dtstsf",	X(59,674),	X_MASK,      POWER6,	PPCNONE,	{BF,  FRA, FRB}},
a094f6
+{"dtstsfi",	X(59,675),      X_MASK|1<<22,POWER9,	PPCNONE,	{BF, UIM6, FRB}},
a094f6
 
a094f6
 {"drsp",	XRC(59,770,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
a094f6
 {"drsp.",	XRC(59,770,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRB}},
a094f6
@@ -6068,6 +6477,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"xsaddsp",	XX3(60,0),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmaddasp",	XX3(60,1),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxsldwi",	XX3(60,2),	XX3SHW_MASK, PPCVSX,	PPCNONE,	{XT6, XA6, XB6, SHW}},
a094f6
+{"xscmpeqdp",	XX3(60,3),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xsrsqrtesp",	XX2(60,10),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xssqrtsp",	XX2(60,11),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xxsel",	XX4(60,3),	XX4_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6, XC6}},
a094f6
 {"xssubsp",	XX3(60,8),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmaddmsp",	XX3(60,9),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
@@ -6076,163 +6488,203 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"xxswapd",	XX3(60,10)|(2<<8), XX3_MASK, PPCVSX,	PPCNONE,	{XT6, XA6, XB6S}},
a094f6
 {"xxmrgld",	XX3(60,10)|(3<<8), XX3_MASK, PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxpermdi",	XX3(60,10),	XX3DM_MASK,  PPCVSX,	PPCNONE,	{XT6, XA6, XB6, DM}},
a094f6
-{"xsrsqrtesp",	XX2(60,10),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xssqrtsp",	XX2(60,11),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscmpgtdp",	XX3(60,11),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xsresp",	XX2(60,26),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xsmulsp",	XX3(60,16),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmsubasp",	XX3(60,17),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxmrghw",	XX3(60,18),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xscmpgedp",	XX3(60,19),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsdivsp",	XX3(60,24),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmsubmsp",	XX3(60,25),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xsresp",	XX2(60,26),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xxperm",	XX3(60,26),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xscmpnedp",	XX3(60,27),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsadddp",	XX3(60,32),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmaddadp",	XX3(60,33),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xscmpudp",	XX3(60,35),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
a094f6
+{"xscvdpuxws",	XX2(60,72),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsrdpi",	XX2(60,73),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsrsqrtedp",	XX2(60,74),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xssqrtdp",	XX2(60,75),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xssubdp",	XX3(60,40),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmaddmdp",	XX3(60,41),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xscmpodp",	XX3(60,43),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
a094f6
+{"xscvdpsxws",	XX2(60,88),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsrdpiz",	XX2(60,89),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsredp",	XX2(60,90),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xsmuldp",	XX3(60,48),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmsubadp",	XX3(60,49),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxmrglw",	XX3(60,50),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xsrdpip",	XX2(60,105),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xstsqrtdp",	XX2(60,106),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
a094f6
+{"xsrdpic",	XX2(60,107),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xsdivdp",	XX3(60,56),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsmsubmdp",	XX3(60,57),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xxpermr",	XX3(60,58),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xscmpexpdp",	XX3(60,59),	XX3BF_MASK,  PPCVSX3,	PPCNONE,	{BF, XA6, XB6}},
a094f6
+{"xsrdpim",	XX2(60,121),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xstdivdp",	XX3(60,61),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
a094f6
 {"xvaddsp",	XX3(60,64),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvmaddasp",	XX3(60,65),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpeqsp",	XX3RC(60,67,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpeqsp.",	XX3RC(60,67,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvspuxws",	XX2(60,136),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrspi",	XX2(60,137),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrsqrtesp",	XX2(60,138),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvsqrtsp",	XX2(60,139),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvsubsp",	XX3(60,72),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xscvdpuxws",	XX2(60,72),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvmaddmsp",	XX3(60,73),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xsrdpi",	XX2(60,73),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xsrsqrtedp",	XX2(60,74),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xssqrtdp",	XX2(60,75),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvcmpgtsp",	XX3RC(60,75,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpgtsp.",	XX3RC(60,75,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvspsxws",	XX2(60,152),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrspiz",	XX2(60,153),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvresp",	XX2(60,154),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvmulsp",	XX3(60,80),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvmsubasp",	XX3(60,81),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xxspltw",	XX2(60,164),	XX2UIM_MASK, PPCVSX,	PPCNONE,	{XT6, XB6, UIM}},
a094f6
+{"xxextractuw",	XX2(60,165),	XX2UIM4_MASK,PPCVSX3,	PPCNONE,	{XT6, XB6, UIMM4}},
a094f6
 {"xvcmpgesp",	XX3RC(60,83,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpgesp.",	XX3RC(60,83,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvuxwsp",	XX2(60,168),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrspip",	XX2(60,169),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvtsqrtsp",	XX2(60,170),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
a094f6
+{"xvrspic",	XX2(60,171),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvdivsp",	XX3(60,88),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xscvdpsxws",	XX2(60,88),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvmsubmsp",	XX3(60,89),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xsrdpiz",	XX2(60,89),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xsredp",	XX2(60,90),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xxspltib",	X(60,360),	XX1_MASK|3<<19, PPCVSX3,PPCNONE,	{XT6, IMM8}},
a094f6
+{"xxinsertw",	XX2(60,181),	XX2UIM4_MASK,PPCVSX3,	PPCNONE,	{XT6, XB6, UIMM4}},
a094f6
+{"xvcmpnesp",	XX3RC(60,91,0), XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcmpnesp.",	XX3RC(60,91,1), XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvsxwsp",	XX2(60,184),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrspim",	XX2(60,185),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvtdivsp",	XX3(60,93),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
a094f6
 {"xvadddp",	XX3(60,96),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvmaddadp",	XX3(60,97),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpeqdp",	XX3RC(60,99,0),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpeqdp.",	XX3RC(60,99,1),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvdpuxws",	XX2(60,200),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrdpi",	XX2(60,201),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrsqrtedp",	XX2(60,202),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvsqrtdp",	XX2(60,203),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvsubdp",	XX3(60,104),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvmaddmdp",	XX3(60,105),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xsrdpip",	XX2(60,105),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xstsqrtdp",	XX2(60,106),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
a094f6
-{"xsrdpic",	XX2(60,107),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvcmpgtdp",	XX3RC(60,107,0), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpgtdp.",	XX3RC(60,107,1), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvdpsxws",	XX2(60,216),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrdpiz",	XX2(60,217),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvredp",	XX2(60,218),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvmuldp",	XX3(60,112),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvmsubadp",	XX3(60,113),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpgedp",	XX3RC(60,115,0), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcmpgedp.",	XX3RC(60,115,1), XX3_MASK,   PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvuxwdp",	XX2(60,232),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrdpip",	XX2(60,233),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvtsqrtdp",	XX2(60,234),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
a094f6
+{"xvrdpic",	XX2(60,235),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvdivdp",	XX3(60,120),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvmsubmdp",	XX3(60,121),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xsrdpim",	XX2(60,121),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvcmpnedp",	XX3RC(60,123,0), XX3_MASK,   PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcmpnedp.",	XX3RC(60,123,1), XX3_MASK,   PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvsxwdp",	XX2(60,248),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvrdpim",	XX2(60,249),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvtdivdp",	XX3(60,125),	XX3BF_MASK,  PPCVSX,	PPCNONE,	{BF, XA6, XB6}},
a094f6
+{"xsmaxcdp",	XX3(60,128),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsnmaddasp",	XX3(60,129),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxland",	XX3(60,130),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvspuxws",	XX2(60,136),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvdpsp",	XX2(60,265),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvdpspn",	XX2(60,267),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsmincdp",	XX3(60,136),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsnmaddmsp",	XX3(60,137),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrspi",	XX2(60,137),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xxlandc",	XX3(60,138),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrsqrtesp",	XX2(60,138),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvsqrtsp",	XX2(60,139),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsrsp",	XX2(60,281),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsmaxjdp",	XX3(60,144),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsnmsubasp",	XX3(60,145),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxlor",	XX3(60,146),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvspsxws",	XX2(60,152),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvuxdsp",	XX2(60,296),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xststdcsp",	XX2(60,298),	XX2BFD_MASK, PPCVSX3,	PPCNONE,	{BF, XB6, DCMX}},
a094f6
+{"xsminjdp",	XX3(60,152),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsnmsubmsp",	XX3(60,153),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrspiz",	XX2(60,153),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xxlxor",	XX3(60,154),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvresp",	XX2(60,154),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvsxdsp",	XX2(60,312),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xsmaxdp",	XX3(60,160),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsnmaddadp",	XX3(60,161),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxlnor",	XX3(60,162),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xxspltw",	XX2(60,164),	XX2UIM_MASK, PPCVSX,	PPCNONE,	{XT6, XB6, UIM}},
a094f6
+{"xscvdpuxds",	XX2(60,328),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvspdp",	XX2(60,329),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvspdpn",	XX2(60,331),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xsmindp",	XX3(60,168),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvuxwsp",	XX2(60,168),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xsnmaddmdp",	XX3(60,169),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrspip",	XX2(60,169),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvtsqrtsp",	XX2(60,170),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
a094f6
 {"xxlorc",	XX3(60,170),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrspic",	XX2(60,171),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvdpsxds",	XX2(60,344),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsabsdp",	XX2(60,345),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsxexpdp",	XX2VA(60,347,0),XX2_MASK|1,  PPCVSX3,	PPCNONE,	{RT, XB6}},
a094f6
+{"xsxsigdp",	XX2VA(60,347,1),XX2_MASK|1,  PPCVSX3,	PPCNONE,	{RT, XB6}},
a094f6
+{"xscvhpdp",	XX2VA(60,347,16),XX2_MASK,   PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvdphp",	XX2VA(60,347,17),XX2_MASK,   PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xscpsgndp",	XX3(60,176),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xsnmsubadp",	XX3(60,177),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xxlnand",	XX3(60,178),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvsxwsp",	XX2(60,184),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xscvuxddp",	XX2(60,360),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsnabsdp",	XX2(60,361),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xststdcdp",	XX2(60,362),	XX2BFD_MASK, PPCVSX3,	PPCNONE,	{BF, XB6, DCMX}},
a094f6
 {"xsnmsubmdp",	XX3(60,185),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrspim",	XX2(60,185),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xxleqv",	XX3(60,186),	XX3_MASK,    PPCVSX2,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xscvsxddp",	XX2(60,376),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsnegdp",	XX2(60,377),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvmaxsp",	XX3(60,192),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvnmaddasp",	XX3(60,193),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvcvspuxds",	XX2(60,392),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvcvdpsp",	XX2(60,393),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvminsp",	XX3(60,200),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvdpuxws",	XX2(60,200),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvnmaddmsp",	XX3(60,201),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrdpi",	XX2(60,201),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvrsqrtedp",	XX2(60,202),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvsqrtdp",	XX2(60,203),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvcvspsxds",	XX2(60,408),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvabssp",	XX2(60,409),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvmovsp",	XX3(60,208),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6S}},
a094f6
 {"xvcpsgnsp",	XX3(60,208),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvnmsubasp",	XX3(60,209),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvdpsxws",	XX2(60,216),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvnmsubmsp",	XX3(60,217),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrdpiz",	XX2(60,217),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvredp",	XX2(60,218),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvmaxdp",	XX3(60,224),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvnmaddadp",	XX3(60,225),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvmindp",	XX3(60,232),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvnmaddmdp",	XX3(60,233),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvuxwdp",	XX2(60,232),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvrdpip",	XX2(60,233),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvtsqrtdp",	XX2(60,234),	XX2BF_MASK,  PPCVSX,	PPCNONE,	{BF, XB6}},
a094f6
-{"xvrdpic",	XX2(60,235),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvmovdp",	XX3(60,240),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6S}},
a094f6
-{"xvcpsgndp",	XX3(60,240),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvnmsubadp",	XX3(60,241),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvcvsxwdp",	XX2(60,248),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvnmsubmdp",	XX3(60,249),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
-{"xvrdpim",	XX2(60,249),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvdpsp",	XX2(60,265),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvdpspn",	XX2(60,267),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xsrsp",	XX2(60,281),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvuxdsp",	XX2(60,296),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvsxdsp",	XX2(60,312),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvdpuxds",	XX2(60,328),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvspdp",	XX2(60,329),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvspdpn",	XX2(60,331),	XX2_MASK,    PPCVSX2,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvdpsxds",	XX2(60,344),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xsabsdp",	XX2(60,345),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvuxddp",	XX2(60,360),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xsnabsdp",	XX2(60,361),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xscvsxddp",	XX2(60,376),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xsnegdp",	XX2(60,377),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvcvspuxds",	XX2(60,392),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvcvdpsp",	XX2(60,393),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvcvspsxds",	XX2(60,408),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
-{"xvabssp",	XX2(60,409),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvcvuxdsp",	XX2(60,424),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvnabssp",	XX2(60,425),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvtstdcsp",	XX2(60,426),	XX2DCMXS_MASK,PPCVSX3,	PPCNONE,	{XT6, XB6, DCMXS}},
a094f6
+{"xviexpsp",	XX3(60,216),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvnmsubmsp",	XX3(60,217),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcvsxdsp",	XX2(60,440),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvnegsp",	XX2(60,441),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvmaxdp",	XX3(60,224),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvnmaddadp",	XX3(60,225),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcvdpuxds",	XX2(60,456),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvcvspdp",	XX2(60,457),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xsiexpdp",	X(60,918),	XX1_MASK,    PPCVSX3,	PPCNONE,	{XT6, RA, RB}},
a094f6
+{"xvmindp",	XX3(60,232),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvnmaddmdp",	XX3(60,233),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcvdpsxds",	XX2(60,472),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvabsdp",	XX2(60,473),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvxexpdp",	XX2VA(60,475,0),XX2_MASK,    PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvxsigdp",	XX2VA(60,475,1),XX2_MASK,    PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xxbrh",	XX2VA(60,475,7),XX2_MASK,    PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvxexpsp",	XX2VA(60,475,8),XX2_MASK,    PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvxsigsp",	XX2VA(60,475,9),XX2_MASK,    PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xxbrw",	XX2VA(60,475,15),XX2_MASK,   PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xxbrd",	XX2VA(60,475,23),XX2_MASK,   PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvcvhpsp",	XX2VA(60,475,24),XX2_MASK,   PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvcvsphp",	XX2VA(60,475,25),XX2_MASK,   PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xxbrq",	XX2VA(60,475,31),XX2_MASK,   PPCVSX3,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvmovdp",	XX3(60,240),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6S}},
a094f6
+{"xvcpsgndp",	XX3(60,240),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvnmsubadp",	XX3(60,241),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcvuxddp",	XX2(60,488),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvnabsdp",	XX2(60,489),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
+{"xvtstdcdp",	XX2(60,490),	XX2DCMXS_MASK,PPCVSX3,	PPCNONE,	{XT6, XB6, DCMXS}},
a094f6
+{"xviexpdp",	XX3(60,248),	XX3_MASK,    PPCVSX3,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
+{"xvnmsubmdp",	XX3(60,249),	XX3_MASK,    PPCVSX,	PPCNONE,	{XT6, XA6, XB6}},
a094f6
 {"xvcvsxddp",	XX2(60,504),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 {"xvnegdp",	XX2(60,505),	XX2_MASK,    PPCVSX,	PPCNONE,	{XT6, XB6}},
a094f6
 
a094f6
 {"psq_st",	OP(60),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
a094f6
 {"stfq",	OP(60),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
a094f6
 
a094f6
+{"lxv",		DQX(61,1),	DQX_MASK,    PPCVSX3,	PPCNONE,	{XTQ6, DQ, RA0}},
a094f6
+{"stxv",	DQX(61,5),	DQX_MASK,    PPCVSX3,	PPCNONE,	{XSQ6, DQ, RA0}},
a094f6
+{"stxsd",	DSO(61,2),	DS_MASK,     PPCVSX3,	PPCNONE,	{VS, DS, RA0}},
a094f6
+{"stxssp",	DSO(61,3),	DS_MASK,     PPCVSX3,	PPCNONE,	{VS, DS, RA0}},
a094f6
 {"stfdp",	OP(61),		OP_MASK,     POWER6,	POWER7,		{FRSp, DS, RA0}},
a094f6
 {"psq_stu",	OP(61),		OP_MASK,     PPCPS,	PPCNONE,	{FRS,PSD,RA,PSW,PSQ}},
a094f6
 {"stfqu",	OP(61),		OP_MASK,     POWER2,	PPCNONE,	{FRS, D, RA}},
a094f6
@@ -6241,7 +6693,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"stdu",	DSO(62,1),	DS_MASK,     PPC64,	PPCNONE,	{RS, DS, RAS}},
a094f6
 {"stq",		DSO(62,2),	DS_MASK,     POWER4,	PPC476,		{RSQ, DS, RA0}},
a094f6
 
a094f6
-{"fcmpu",	X(63,0),     X_MASK|(3<<21), COM,	PPCEFS,		{BF, FRA, FRB}},
a094f6
+{"fcmpu",	X(63,0),        XBF_MASK,    COM,	PPCEFS,		{BF, FRA, FRB}},
a094f6
 
a094f6
 {"daddq",	XRC(63,2,0),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
 {"daddq.",	XRC(63,2,1),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
@@ -6249,6 +6701,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"dquaq",	ZRC(63,3,0),	Z2_MASK,     POWER6,	PPCNONE,	{FRTp, FRAp, FRBp, RMC}},
a094f6
 {"dquaq.",	ZRC(63,3,1),	Z2_MASK,     POWER6,	PPCNONE,	{FRTp, FRAp, FRBp, RMC}},
a094f6
 
a094f6
+{"xsaddqp",	XRC(63,4,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xsaddqpo",	XRC(63,4,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
+{"xsrqpi",	ZRC(63,5,0),	Z2_MASK,     PPCVSX3,	PPCNONE,	{R, VD, VB, RMC}},
a094f6
+{"xsrqpix",	ZRC(63,5,1),	Z2_MASK,     PPCVSX3,	PPCNONE,	{R, VD, VB, RMC}},
a094f6
+
a094f6
 {"fcpsgn",	XRC(63,8,0),	X_MASK, POWER6|PPCA2|PPC476, PPCNONE,	{FRT, FRA, FRB}},
a094f6
 {"fcpsgn.",	XRC(63,8,1),	X_MASK, POWER6|PPCA2|PPC476, PPCNONE,	{FRT, FRA, FRB}},
a094f6
 
a094f6
@@ -6321,7 +6779,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"fnmadd.",	A(63,31,1),	A_MASK,      PPCCOM,	PPCEFS,		{FRT, FRA, FRC, FRB}},
a094f6
 {"fnma.",	A(63,31,1),	A_MASK,      PWRCOM,	PPCNONE,	{FRT, FRA, FRC, FRB}},
a094f6
 
a094f6
-{"fcmpo",	X(63,32),    X_MASK|(3<<21), COM,	PPCEFS,		{BF, FRA, FRB}},
a094f6
+{"fcmpo",	X(63,32),       XBF_MASK,    COM,	PPCEFS,		{BF, FRA, FRB}},
a094f6
 
a094f6
 {"dmulq",	XRC(63,34,0),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
 {"dmulq.",	XRC(63,34,1),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
@@ -6329,6 +6787,11 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"drrndq",	ZRC(63,35,0),	Z2_MASK,     POWER6,	PPCNONE,	{FRTp, FRA, FRBp, RMC}},
a094f6
 {"drrndq.",	ZRC(63,35,1),	Z2_MASK,     POWER6,	PPCNONE,	{FRTp, FRA, FRBp, RMC}},
a094f6
 
a094f6
+{"xsmulqp",	XRC(63,36,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xsmulqpo",	XRC(63,36,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
+{"xsrqpxp",	Z(63,37),	Z2_MASK,     PPCVSX3,	PPCNONE,	{R, VD, VB, RMC}},
a094f6
+
a094f6
 {"mtfsb1",	XRC(63,38,0),	XRARB_MASK,  COM,	PPCNONE,	{BT}},
a094f6
 {"mtfsb1.",	XRC(63,38,1),	XRARB_MASK,  COM,	PPCNONE,	{BT}},
a094f6
 
a094f6
@@ -6355,10 +6818,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"drintxq",	ZRC(63,99,0),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRTp, FRBp, RMC}},
a094f6
 {"drintxq.",	ZRC(63,99,1),	Z2_MASK,     POWER6,	PPCNONE,	{R, FRTp, FRBp, RMC}},
a094f6
 
a094f6
-{"ftdiv",	X(63,128),   X_MASK|(3<<21), POWER7,	PPCNONE,	{BF, FRA, FRB}},
a094f6
+{"xscpsgnqp",	X(63,100),      X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
+{"ftdiv",	X(63,128),      XBF_MASK,    POWER7,	PPCNONE,	{BF, FRA, FRB}},
a094f6
 
a094f6
 {"dcmpoq",	X(63,130),	X_MASK,      POWER6,	PPCNONE,	{BF, FRAp, FRBp}},
a094f6
 
a094f6
+{"xscmpoqp",	X(63,132),      XBF_MASK,    PPCVSX3,	PPCNONE,	{BF, VA, VB}},
a094f6
+
a094f6
 {"mtfsfi",  XRC(63,134,0), XWRA_MASK|(3<<21)|(1<<11), POWER6|PPCA2|PPC476, PPCNONE, {BFF, U, W}},
a094f6
 {"mtfsfi",  XRC(63,134,0), XRA_MASK|(3<<21)|(1<<11), COM, POWER6|PPCA2|PPC476, {BFF, U}},
a094f6
 {"mtfsfi.", XRC(63,134,1), XWRA_MASK|(3<<21)|(1<<11), POWER6|PPCA2|PPC476, PPCNONE, {BFF, U, W}},
a094f6
@@ -6372,9 +6839,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"fctiwuz",	XRC(63,143,0),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
a094f6
 {"fctiwuz.",	XRC(63,143,1),	XRA_MASK,    POWER7,	PPCNONE,	{FRT, FRB}},
a094f6
 
a094f6
-{"ftsqrt",	X(63,160), X_MASK|(3<<21|FRA_MASK), POWER7, PPCNONE,	{BF, FRB}},
a094f6
+{"ftsqrt",	X(63,160),      XBF_MASK|FRA_MASK, POWER7, PPCNONE,	{BF, FRB}},
a094f6
 
a094f6
 {"dtstexq",	X(63,162),	X_MASK,      POWER6,	PPCNONE,	{BF, FRAp, FRBp}},
a094f6
+
a094f6
+{"xscmpexpqp",	X(63,164),      XBF_MASK,    PPCVSX3,	PPCNONE,	{BF, VA, VB}},
a094f6
+
a094f6
 {"dtstdcq",	Z(63,194),	Z_MASK,      POWER6,	PPCNONE,	{BF, FRAp, DCM}},
a094f6
 {"dtstdgq",	Z(63,226),	Z_MASK,      POWER6,	PPCNONE,	{BF, FRAp, DGM}},
a094f6
 
a094f6
@@ -6396,27 +6866,53 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"dxexq",	XRC(63,354,0),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRBp}},
a094f6
 {"dxexq.",	XRC(63,354,1),	X_MASK,      POWER6,	PPCNONE,	{FRT, FRBp}},
a094f6
 
a094f6
+{"xsmaddqp",	XRC(63,388,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xsmaddqpo",	XRC(63,388,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
 {"frin",	XRC(63,392,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
 {"frin.",	XRC(63,392,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
+
a094f6
+{"xsmsubqp",	XRC(63,420,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xsmsubqpo",	XRC(63,420,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
 {"friz",	XRC(63,424,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
 {"friz.",	XRC(63,424,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
+
a094f6
+{"xsnmaddqp",	XRC(63,452,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xsnmaddqpo",	XRC(63,452,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
 {"frip",	XRC(63,456,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
 {"frip.",	XRC(63,456,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
+
a094f6
+{"xsnmsubqp",	XRC(63,484,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xsnmsubqpo",	XRC(63,484,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
 {"frim",	XRC(63,488,0),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
 {"frim.",	XRC(63,488,1),	XRA_MASK,    POWER5,	PPCNONE,	{FRT, FRB}},
a094f6
 
a094f6
 {"dsubq",	XRC(63,514,0),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
 {"dsubq.",	XRC(63,514,1),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
 
a094f6
+{"xssubqp",	XRC(63,516,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xssubqpo",	XRC(63,516,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
 {"ddivq",	XRC(63,546,0),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
 {"ddivq.",	XRC(63,546,1),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRAp, FRBp}},
a094f6
 
a094f6
+{"xsdivqp",	XRC(63,548,0),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+{"xsdivqpo",	XRC(63,548,1),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
 {"mffs",	XRC(63,583,0),	XRARB_MASK,  COM,	PPCEFS,		{FRT}},
a094f6
 {"mffs.",	XRC(63,583,1),	XRARB_MASK,  COM,	PPCEFS,		{FRT}},
a094f6
 
a094f6
 {"dcmpuq",	X(63,642),	X_MASK,      POWER6,	PPCNONE,	{BF, FRAp, FRBp}},
a094f6
 
a094f6
+{"xscmpuqp",	X(63,644),      XBF_MASK,    PPCVSX3,	PPCNONE,	{BF, VA, VB}},
a094f6
+
a094f6
 {"dtstsfq",	X(63,674),	X_MASK,      POWER6,	PPCNONE,	{BF, FRA, FRBp}},
a094f6
+{"dtstsfiq",	X(63,675),      X_MASK|1<<22,POWER9,	PPCNONE,	{BF, UIM6, FRBp}},
a094f6
+
a094f6
+{"xststdcqp",	X(63,708),      X_MASK,      PPCVSX3,	PPCNONE,	{BF, VB, DCMX}},
a094f6
 
a094f6
 {"mtfsf",	XFL(63,711,0),	XFL_MASK, POWER6|PPCA2|PPC476, PPCNONE,	{FLM, FRB, XFL_L, W}},
a094f6
 {"mtfsf",	XFL(63,711,0),	XFL_MASK,    COM, POWER6|PPCA2|PPC476|PPCEFS,	{FLM, FRB}},
a094f6
@@ -6429,6 +6925,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"dcffixq",	XRC(63,802,0),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRB}},
a094f6
 {"dcffixq.",	XRC(63,802,1),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRB}},
a094f6
 
a094f6
+{"xsabsqp",	XVA(63,804,0),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xsxexpqp",	XVA(63,804,2),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xsnabsqp",	XVA(63,804,8),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xsnegqp",	XVA(63,804,16),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xsxsigqp",	XVA(63,804,18),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xssqrtqp",	XVARC(63,804,27,0), XVA_MASK, PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xssqrtqpo",	XVARC(63,804,27,1), XVA_MASK, PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+
a094f6
 {"fctid",	XRC(63,814,0),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
a094f6
 {"fctid",	XRC(63,814,0),	XRA_MASK,    PPC476,	PPCNONE,	{FRT, FRB}},
a094f6
 {"fctid.",	XRC(63,814,1),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
a094f6
@@ -6442,6 +6946,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"denbcdq",	XRC(63,834,0),	X_MASK,      POWER6,	PPCNONE,	{S, FRTp, FRBp}},
a094f6
 {"denbcdq.",	XRC(63,834,1),	X_MASK,      POWER6,	PPCNONE,	{S, FRTp, FRBp}},
a094f6
 
a094f6
+{"xscvqpuwz",	XVA(63,836,1),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvudqp",	XVA(63,836,2),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvqpswz",	XVA(63,836,9),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvsdqp",	XVA(63,836,10),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvqpudz",	XVA(63,836,17),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvqpdp",	XVARC(63,836,20,0), XVA_MASK, PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvqpdpo",	XVARC(63,836,20,1), XVA_MASK, PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvdpqp",	XVA(63,836,22),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+{"xscvqpsdz",	XVA(63,836,25),	XVA_MASK,    PPCVSX3,	PPCNONE,	{VD, VB}},
a094f6
+
a094f6
 {"fmrgow",	X(63,838),	X_MASK,      PPCVSX2,	PPCNONE,	{FRT, FRA, FRB}},
a094f6
 
a094f6
 {"fcfid",	XRC(63,846,0),	XRA_MASK,    PPC64,	PPCNONE,	{FRT, FRB}},
a094f6
@@ -6452,6 +6966,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
a094f6
 {"diexq",	XRC(63,866,0),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRA, FRBp}},
a094f6
 {"diexq.",	XRC(63,866,1),	X_MASK,      POWER6,	PPCNONE,	{FRTp, FRA, FRBp}},
a094f6
 
a094f6
+{"xsiexpqp",	X(63,868),	X_MASK,      PPCVSX3,	PPCNONE,	{VD, VA, VB}},
a094f6
+
a094f6
 {"fctidu",	XRC(63,942,0),	XRA_MASK, POWER7|PPCA2,	PPCNONE,	{FRT, FRB}},
a094f6
 {"fctidu.",	XRC(63,942,1),	XRA_MASK, POWER7|PPCA2,	PPCNONE,	{FRT, FRB}},
a094f6