summaryrefslogtreecommitdiff
path: root/ndisasm.c
Commit message (Collapse)AuthorAgeFilesLines
* Use fputs instead of fprintf for plain stringsVictor van den Elzen2009-08-131-1/+1
| | | | LLVM's Clang warns about this. outieee.c had a real problem.
* Remove function pointers in output, simplify error handlingH. Peter Anvin2009-07-181-5/+3
| | | | | | | | | | | | | | | Remove a bunch of function pointers in the output stage; they are never changed and don't add any value. Also make "ofile" a global variable and let the backend use it directly. All we ever did with these variables were stashing it in locals and using them as-is anyway for no benefit. Also change the global error function, nasm_error() into a true function which invokes a function pointer internally. That lets us use direct calls to it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM: relicense under the 2-clause BSD licenseH. Peter Anvin2009-07-061-12/+0
| | | | | | | | *To the best of my knowledge*, we now have authorization from everyone who has significantly contributed to NASM in the past. As such, change the license to the 2-clause BSD license. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add copyright headers to the *.c/*.h files in the main directoryH. Peter Anvin2009-06-281-5/+46
| | | | | | | | | | Add copyright headers to the *.c/*.h files in the main directory. For files where I'm sure enough that we have all the approvals, I have given them the 2-BSD license, the others have been given the "LGPL for now" license header. Most of them can probably be changed after auditing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* disasm: when no instruction is found, consider a naked prefixH. Peter Anvin2009-03-181-4/+5
| | | | | If we can't find a matching instruction, rather than printing it as a "db" literal, consider first if we can disassemble it as a naked prefix.
* Move all version strings to a single compilation unit (ver.c)H. Peter Anvin2008-10-311-2/+2
| | | | | | | Move all the version strings to a single compilation unit, ver.c; this does not include the version macros, which are fed into macros.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Use an explicit table for tolower() to avoid a function callH. Peter Anvin2008-06-111-1/+2
| | | | | | | | | | On some platforms, tolower() is implemented as a function call, in order to handle locale support. We never change locales, so can the result of tolower() into a table, so we don't have to sit through the function call every time. ~1.3% overall performance improvement on a macro-heavy benchmark under Linux x86-64.
* regularized spelling of license to match name of LICENSE fileBeroset2007-12-291-1/+1
|
* ndisasm: handle instructions at offset zeroH. Peter Anvin2007-12-201-3/+6
| | | | Correctly handle instructions at offset zero
* ndisasm: handle the case of "no more sync points"H. Peter Anvin2007-11-201-2/+2
| | | | | Handle the case of "no more sync points" explicitly, instead of saying the next sync point is at UINT32_MAX.
* Suppress signedness warnings in disassemblerCharles Crayne2007-10-181-4/+4
|
* Additional uses of bool and enumH. Peter Anvin2007-10-111-1/+1
| | | | | | Proper use of bool and enum makes code easier to debug. Do more of it. In particular, we really should stomp out any residual uses of magic constants that aren't enums or, in some cases, even #defines.
* Use the compiler-provided booleans if available, otherwise emulateH. Peter Anvin2007-10-101-4/+4
| | | | | | | Both C and C++ have "bool", "true" and "false" in lower case; C requires <stdbool.h> for this, in C++ it is an inherent type built into the compiler. Use those instead of the old macros; emulate with a simple typedef enum if unavailable.
* Portability fixesH. Peter Anvin2007-10-021-0/+2
| | | | | | | | | Concentrate compiler dependencies to compiler.h; make sure compiler.h is included first in every .c file (since some prototypes may depend on the presence of feature request macros.) Actually use the conditional inclusion of various functions (totally broken in previous releases.)
* Make nasm_malloc() et al available from inside ndisasmH. Peter Anvin2007-09-191-0/+14
| | | | | Clean up nasmlib to remove functions irrelevant for ndisasm; make nasm_malloc() etc usable inside ndisasm.
* Clean up the 64-bitification of regs.dat for 64-bit ndisasm supportH. Peter Anvin2007-04-151-13/+13
| | | | | | | 64-bit support required some major changes to regs.dat; clean some of it up (re-introduce patterns, where appropriate) and allow a single register to belong to multiple disassembly classes; also keep track of the x86 register number again.
* c99 printf/fprintf compliance.Keith Kanios2007-04-141-3/+2
|
* Fixed distinction between char and int8_t data types.Keith Kanios2007-04-131-8/+8
|
* Remove obsolete types; add <inttypes.h> where needed; header fixesH. Peter Anvin2007-04-121-1/+1
| | | | | | | | | | | - Remove obsolete types like "uint32"; use "uint32_t" consistently. - Make sure we include <inttypes.h> where needed. - Header file guards should be FOO_H or SUBDIR_FOO_H; _FOO_H infringes on the C implementation's namespace and should only be used when writing libc! - Change a few "int8_t" back to "char" where appropriate. There are a lot more places where that should be done, though. - Clean up the check for getuid/getgid in rdoff/rdlar.h.
* General push for x86-64 support, dubbed 0.99.00.Keith Kanios2007-04-121-22/+23
|
* Apply Nindent to all .c and .h filesnasm-0.98.39LATESTH. Peter Anvin2005-01-151-226/+247
|
* added buffer length parameter to prevent vulnerability to bufferEd Beroset2004-12-151-2/+2
| | | | overflow exploits.
* NASM 0.98.17nasm-0.98.17H. Peter Anvin2002-04-301-7/+7
|
* NASM 0.98.11nasm-0.98.11H. Peter Anvin2002-04-301-5/+11
|
* NASM 0.98p7nasm-0.98p7H. Peter Anvin2002-04-301-1/+1
|
* NASM 0.98p6nasm-0.98p6H. Peter Anvin2002-04-301-0/+3
|
* NASM 0.98p3.5nasm-0.98p3.5H. Peter Anvin2002-04-301-3/+24
|
* NASM 0.98p3nasm-0.98p3H. Peter Anvin2002-04-301-14/+27
|
* NASM 0.97nasm-0.97fork-0.98-jH. Peter Anvin2002-04-301-1/+4
|
* NASM 0.96nasm-0.96H. Peter Anvin2002-04-301-0/+6
|
* NASM 0.94nasm-0.94H. Peter Anvin2002-04-301-2/+1
|
* NASM 0.91nasm-0.91H. Peter Anvin2002-04-301-0/+270