Commit graph

5 commits

Author SHA1 Message Date
H. Peter Anvin
b20bc733c9 asm/*: Move directive processing to its own file, refactor error handling
Move directive processing to its own file, and move nasmlib/error.c to
asm/error.c (it was not used by the disassembler); remove some extern
declarations from .c files, and do some general code cleanups.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-03-07 19:31:04 -08:00
Ruslan Kabatsayev
3ebed50146 disasm: Add support for 64-bit origin
This fixes disassembly of instructions like jmp/call when target address
is larger than 2^32-1, and also printing of current address when it's
large.

After this change ndisasm still assumes that the files to disassemble
will never reach 4GiB: only offsets are made 64 bit, but not lengths.

https://bugzilla.nasm.us/show_bug.cgi?id=3392349

Signed-off-by: Ruslan Kabatsayev <b7.10110111@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-02-12 20:19:34 +03:00
Martin Lindhe
3478078c5f disasm: matches -- fix operator priority error with parenthesis
fixes pvs-studio error 'V502 Perhaps the '?:' operator works in a different way
than it was expected. The '?:' operator has a lower priority than the '!=' operator.'

Signed-off-by: Martin Lindhe <martin-commit@ubique.se>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-01-05 22:38:41 +03:00
Martin Lindhe
e29e321e62 Dont set @mod twice
pvs-studio: V519 The 'mod' variable is assigned values twice successively.
Perhaps this is a mistake. Check lines: 398, 405.

Signed-off-by: Martin Lindhe <martin-commit@ubique.se>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-01-05 22:38:41 +03:00
H. Peter Anvin
e1f985c167 Reorganize the source code into subdirectories
Make the source code easier to understand and keep track of by
organizing it into subdirectories depending on the function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2016-05-25 12:06:29 -07:00