diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2009-03-17 16:13:10 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2009-03-17 16:16:39 -0700 |
commit | ef72b03fb4338f98db41fc6e14307b9dbbb81a4a (patch) | |
tree | f991faea1a82d450744be3dee0e34ff00ba2fe47 /misc | |
parent | cdf42e675dd1164d2ee0409fd4dd1ab2eb17607c (diff) | |
download | nasm-ef72b03fb4338f98db41fc6e14307b9dbbb81a4a.tar.gz nasm-ef72b03fb4338f98db41fc6e14307b9dbbb81a4a.tar.bz2 nasm-ef72b03fb4338f98db41fc6e14307b9dbbb81a4a.zip |
BR 2690688: add missing VFM instructions
The Perl script which auto-generated the VFM instructions had
incorrectly conflated the VEX.W and VEX.L bits, with the result that
only half the valid instructions were generated.
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/genfma.pl | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/misc/genfma.pl b/misc/genfma.pl index 09551ab..b1bb001 100755 --- a/misc/genfma.pl +++ b/misc/genfma.pl @@ -21,22 +21,25 @@ foreach $pi ( sort(keys(%packed_insns)) ) { $xorder = substr($order,1,1).substr($order,0,1).substr($order,2,1); foreach $o ($order, $xorder) { for ($w = 0; $w < 2; $w++) { - $suf = $w ? 'pd' : 'ps'; - $mm = $w ? 'ymm' : 'xmm'; - $sx = $w ? 'SY' : 'SO'; - $ww = $w ? 256 : 128; - printf "%-15s %-31s %-47s %s\n", - "\U${pi}${o}${suf}", - "${mm}reg,${mm}reg,${mm}rm", - sprintf("[rvm:\tvex.dds.%d.66.0f38.w%d %02x /r]", - $ww, $w, $op), - "FMA,FUTURE,${sx}"; - printf "%-15s %-31s %-47s %s\n", - "\U${pi}${o}${suf}", - "${mm}reg,${mm}rm", - sprintf("[r+vm:\tvex.dds.%d.66.0f38.w%d %02x /r]", - $ww, $w, $op), - "FMA,FUTURE,${sx}"; + $suf = $w ? 'pd' : 'ps'; + for ($l = 128; $l <= 256; $l <<= 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}"; + printf "%-15s %-31s %-8s%-39s %s\n", + "\U${pi}${o}${suf}", + "${mm}reg,${mm}rm", + "[r+vm:", + sprintf("vex.dds.%d.66.0f38.w%d %02x /r]", + $l, $w, $op), + "FMA,FUTURE,${sx}"; + } } } $op++; @@ -50,20 +53,22 @@ foreach $si ( sort(keys(%scalar_insns)) ) { foreach $o ($order, $xorder) { for ($w = 0; $w < 2; $w++) { $suf = $w ? 'sd' : 'ss'; - $mm = 'xmm'; $sx = $w ? 'SQ' : 'SD'; - $ww = 128; - printf "%-15s %-31s %-47s %s\n", + $l = 128; + $mm = 'xmm'; + printf "%-15s %-31s %-8s%-39s %s\n", "\U${si}${o}${suf}", "${mm}reg,${mm}reg,${mm}rm", - sprintf("[rvm:\tvex.dds.%d.66.0f38.w%d %02x /r]", - $ww, $w, $op), + '[rvm:', + sprintf("vex.dds.%d.66.0f38.w%d %02x /r]", + $l, $w, $op), "FMA,FUTURE,${sx}"; - printf "%-15s %-31s %-47s %s\n", + printf "%-15s %-31s %-8s%-39s %s\n", "\U${si}${o}${suf}", "${mm}reg,${mm}rm", - sprintf("[r+vm:\tvex.dds.%d.66.0f38.w%d %02x /r]", - $ww, $w, $op), + '[r+vm:', + sprintf("vex.dds.%d.66.0f38.w%d %02x /r]", + $l, $w, $op), "FMA,FUTURE,${sx}"; } } |