summaryrefslogtreecommitdiff
path: root/insns.pl
diff options
context:
space:
mode:
authorJin Kyu Song <jin.kyu.song@intel.com>2013-11-26 17:14:07 -0800
committerJin Kyu Song <jin.kyu.song@intel.com>2013-11-27 15:43:32 -0800
commit08ae610ec96d2f07543eb0caf90ec429ddf89f32 (patch)
treea3609ac6cf5ab441ad4a28fd80b8745767a5e5c8 /insns.pl
parent1ab16e46731678dd965c9e1148e62c944d9c5ed6 (diff)
downloadnasm-08ae610ec96d2f07543eb0caf90ec429ddf89f32.tar.gz
nasm-08ae610ec96d2f07543eb0caf90ec429ddf89f32.tar.bz2
nasm-08ae610ec96d2f07543eb0caf90ec429ddf89f32.zip
opflags: Separate vector registers into low-16 and high-16
Since only EVEX supports all 32 vector registers encoding for now, VEX/REX encoded instructions should not take high-16 registers as operands. This filtering had been done using instruction flag so far, but using the opflags makes more sense. [XYZ]MMREG operands used for non-EVEX instructions are automatically converted to [XYZ]MM_L16 in insns.pl Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Diffstat (limited to 'insns.pl')
-rwxr-xr-xinsns.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/insns.pl b/insns.pl
index 8515c02..2ce9a51 100755
--- a/insns.pl
+++ b/insns.pl
@@ -464,6 +464,11 @@ sub format_insn($$$$$) {
$opp =~ s/^([a-z]+)rm$/rm_$1/;
$opp =~ s/^rm$/rm_gpr/;
$opp =~ s/^reg$/reg_gpr/;
+ # only for evex insns, high-16 regs are allowed
+ if ($codes !~ /(^|\s)evex\./) {
+ $opp =~ s/^(rm_[xyz]mm)$/$1_l16/;
+ $opp =~ s/^([xyz]mm)reg$/$1_l16/;
+ }
push(@opx, $opp, @oppx) if $opp;
}
$op = join('|', @opx);