<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
%packed_insns = (
    'vfmadd'    =&gt; 0x98,
    'vfmaddsub' =&gt; 0x96,
    'vfmsubadd' =&gt; 0x97,
    'vfmsub'    =&gt; 0x9a,
    'vfnmadd'   =&gt; 0x9c,
    'vfnmsub'   =&gt; 0x9e
    );

%scalar_insns = (
    'vfmadd'    =&gt; 0x99,
    'vfmsub'    =&gt; 0x9b,
    'vfnmadd'   =&gt; 0x9d,
    'vfnmsub'   =&gt; 0x9f
    );

foreach $pi ( sort(keys(%packed_insns)) ) {
    $op = $packed_insns{$pi};
    foreach $order ('132', '213', '231') {
	$xorder = substr($order,1,1).substr($order,0,1).substr($order,2,1);
	foreach $o ($order, $xorder) {
	    for ($w = 0; $w &lt; 2; $w++) {
		$suf = $w  ? 'pd' : 'ps';
		for ($l = 128; $l &lt;= 256; $l &lt;&lt;= 1) {
		    $sx  = ($l == 256) ? 'SY' : 'SO';
		    $mm  = ($l == 256) ? 'ymm' : 'xmm';
		    printf "%-15s %-31s %-8s%-39s %s\n",
		    	"\U${pi}${o}${suf}",
			"${mm}reg,${mm}reg,${mm}rm",
		    	"[rvm:",
		        sprintf("vex.dds.%d.66.0f38.w%d %02x /r]",
			    $l, $w, $op),
		    "FMA,FUTURE,${sx}";
		}
	    }
	}
	$op += 0x10;
    }
}

foreach $si ( sort(keys(%scalar_insns)) ) {
    $op = $scalar_insns{$si};
    foreach $order ('132', '213', '231') {
	$xorder = substr($order,1,1).substr($order,0,1).substr($order,2,1);
	foreach $o ($order, $xorder) {
	    for ($w = 0; $w &lt; 2; $w++) {
		$suf = $w ? 'sd' : 'ss';
		$sx  = $w ? 'SQ' : 'SD';
		$l  = 128;
		$mm  = 'xmm';
		printf "%-15s %-31s %-8s%-39s %s\n",
		    "\U${si}${o}${suf}",
		    "${mm}reg,${mm}reg,${mm}rm",
		    '[rvm:',
		    sprintf("vex.dds.%d.66.0f38.w%d %02x /r]",
			$l, $w, $op),
		"FMA,FUTURE,${sx}";
	    }
	}
	$op += 0x10;
    }
}
</pre></body></html>