diff options
author | H. Peter Anvin <hpa@zytor.com> | 2002-06-02 05:35:05 +0000 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2002-06-02 05:35:05 +0000 |
commit | d308de119c81d611ea655340637b3d348011f9c6 (patch) | |
tree | 4164272fe1c381bea74557aca90a7da89ef5a760 /disasm.c | |
parent | 4cd2604ebf95e0e1644ae291a5b1cfce10460706 (diff) | |
download | nasm-d308de119c81d611ea655340637b3d348011f9c6.tar.gz nasm-d308de119c81d611ea655340637b3d348011f9c6.tar.bz2 nasm-d308de119c81d611ea655340637b3d348011f9c6.zip |
Make the disassembler correctly handle the new \34-\36 and \44-\46 codes.
Diffstat (limited to 'disasm.c')
-rw-r--r-- | disasm.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -334,7 +334,7 @@ static int matches (struct itemplate *t, unsigned char *data, int asize, if (c >= 034 && c <= 036) { ins->oprs[c-034].offset = *data++; ins->oprs[c-034].offset |= (*data++ << 8); - if (asize == 32) { + if (osize == 32) { ins->oprs[c-034].offset |= (((long) *data++) << 16); ins->oprs[c-034].offset |= (((long) *data++) << 24); } @@ -347,6 +347,16 @@ static int matches (struct itemplate *t, unsigned char *data, int asize, ins->oprs[c-040].offset |= (((long) *data++) << 16); ins->oprs[c-040].offset |= (((long) *data++) << 24); } + if (c >= 044 && c <= 046) { + ins->oprs[c-044].offset = *data++; + ins->oprs[c-044].offset |= (*data++ << 8); + if (asize == 32) { + ins->oprs[c-044].offset |= (((long) *data++) << 16); + ins->oprs[c-044].offset |= (((long) *data++) << 24); + } + if (segsize != asize) + ins->oprs[c-044].addr_size = asize; + } if (c >= 050 && c <= 052) { ins->oprs[c-050].offset = (signed char) *data++; ins->oprs[c-050].segment |= SEG_RELATIVE; |