summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJin Kyu Song <jin.kyu.song@intel.com>2013-08-21 19:29:11 -0700
committerCyrill Gorcunov <gorcunov@gmail.com>2013-08-22 19:37:44 +0400
commitd4760c19b55ad7cda97c66e5caa29b405fa539a4 (patch)
treeaeac44dbf3ede5692c856a01f37d3612f1172036
parent4d1fc3f1a0865b82bbf5212cd601c0a4a1495fd6 (diff)
downloadnasm-d4760c19b55ad7cda97c66e5caa29b405fa539a4.tar.gz
AVX-512: Add ZWORD keyword
ZWORD (512 bits) keyword is added Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--assemble.c2
-rw-r--r--disasm.c3
-rw-r--r--nasm.h1
-rw-r--r--parser.c5
-rw-r--r--tokens.dat1
5 files changed, 12 insertions, 0 deletions
diff --git a/assemble.c b/assemble.c
index 83971f62..4f0cd9c0 100644
--- a/assemble.c
+++ b/assemble.c
@@ -265,6 +265,8 @@ static const char *size_name(int size)
return "oword";
case 32:
return "yword";
+ case 64:
+ return "zword";
default:
return "???";
}
diff --git a/disasm.c b/disasm.c
index 9d2e1b12..cc55d2c5 100644
--- a/disasm.c
+++ b/disasm.c
@@ -1303,6 +1303,9 @@ int32_t disasm(uint8_t *data, char *output, int outbufsize, int segsize,
if (t & BITS256)
slen +=
snprintf(output + slen, outbufsize - slen, "yword ");
+ if (t & BITS512)
+ slen +=
+ snprintf(output + slen, outbufsize - slen, "zword ");
if (t & FAR)
slen += snprintf(output + slen, outbufsize - slen, "far ");
if (t & NEAR)
diff --git a/nasm.h b/nasm.h
index e46b5caf..fc5a18de 100644
--- a/nasm.h
+++ b/nasm.h
@@ -1011,6 +1011,7 @@ enum special_tokens {
S_TWORD,
S_WORD,
S_YWORD,
+ S_ZWORD,
SPECIAL_ENUM_LIMIT
};
diff --git a/parser.c b/parser.c
index 4b3f059c..ccbce49a 100644
--- a/parser.c
+++ b/parser.c
@@ -660,6 +660,11 @@ is_expression:
result->oprs[operand].type |= BITS256;
setsize = 1;
break;
+ case S_ZWORD:
+ if (!setsize)
+ result->oprs[operand].type |= BITS512;
+ setsize = 1;
+ break;
case S_TO:
result->oprs[operand].type |= TO;
break;
diff --git a/tokens.dat b/tokens.dat
index 1a00e3d3..d12b2964 100644
--- a/tokens.dat
+++ b/tokens.dat
@@ -72,6 +72,7 @@ to
tword
word
yword
+zword
% TOKEN_FLOAT, 0, 0, 0
__infinity__