diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-08-16 22:13:14 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-08-16 22:13:14 -0700 |
commit | 7023d638de1db6cf3694ac81343101a1bcf6751e (patch) | |
tree | 0a93d219a1e5db203102ba0b2ee37b3aa05b4ee8 /disasm.c | |
parent | 8810e0f79460aaf762266c6fa33d8daddcfdf175 (diff) | |
download | nasm-7023d638de1db6cf3694ac81343101a1bcf6751e.tar.gz nasm-7023d638de1db6cf3694ac81343101a1bcf6751e.tar.bz2 nasm-7023d638de1db6cf3694ac81343101a1bcf6751e.zip |
ndisasm: fix handing of byte codes 250-253, 324
Fix handling of byte codes 250-253 (sign-extended 32-bit immediate,
extended to 64 bits) and 324 (instruction must have osize 64).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'disasm.c')
-rw-r--r-- | disasm.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2009 The NASM Authors - All Rights Reserved + * Copyright 1996-2010 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -674,6 +674,16 @@ static int matches(const struct itemplate *t, uint8_t *data, break; } + case4(0250): + if (s_field_for == op1) { + opx->offset = gets8(data); + data++; + } else { + opx->offset = gets32(data); + data += 4; + } + break; + case4(0260): { int vexm = *r++; @@ -823,7 +833,7 @@ static int matches(const struct itemplate *t, uint8_t *data, break; case 0324: - if (!(ins->rex & (REX_P|REX_W)) || osize != 64) + if (osize != 64) return false; o_used = true; break; |