summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Kyu Song <jin.kyu.song@intel.com>2013-11-30 16:38:42 -0800
committerJin Kyu Song <jin.kyu.song@intel.com>2013-12-02 18:42:19 -0800
commit0873ef5626d7cdfcb87bf4c8643cc508e79549b8 (patch)
tree42975b385d577f49086f468234c50611d2c10fd9
parent50137b82748b4fad54591571bf756d9c3a2746b5 (diff)
downloadnasm-0873ef5626d7cdfcb87bf4c8643cc508e79549b8.tar.gz
nasm-0873ef5626d7cdfcb87bf4c8643cc508e79549b8.tar.bz2
nasm-0873ef5626d7cdfcb87bf4c8643cc508e79549b8.zip
pfmask: Limit the preferred mask to the vendor specific flags
In ndisasm, the priority follows the order of instructions in insns.dat. Other iflags could affect this mechanism when a proper instruction form had a higher iflag bit set. The preferred mask bits are now limited to vendor flags (Cyrix and AMD) and other flags do not affect disassembler any more. Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
-rw-r--r--iflag.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/iflag.h b/iflag.h
index 8754174..7bc31cc 100644
--- a/iflag.h
+++ b/iflag.h
@@ -143,10 +143,9 @@ static inline int iflag_cmp_cpu_level(const iflag_t *a, const iflag_t *b)
static inline iflag_t _iflag_pfmask(const iflag_t *a)
{
- iflag_t r = (iflag_t) {
- .field[1] = a->field[1],
- .field[2] = a->field[2],
- };
+ iflag_t r;
+
+ memset(&r, 0, sizeof(r));
if (iflag_test(a, IF_CYRIX))
iflag_set(&r, IF_CYRIX);