summaryrefslogtreecommitdiff
path: root/nasmlib.h
AgeCommit message (Collapse)AuthorFilesLines
2007-10-16Floating-point warning fixes; fix round-to-overflowH. Peter Anvin1-1/+1
Actually generate the appropriate floating-point warnings, and only one per assembly, pretty please. Correct the round-to-overflow condition; as written all numbers with a positive exponent were considered overflows!
2007-10-16Handle rounding of denorms correctly; make fp overflow a warningH. Peter Anvin1-7/+13
- Handle rounding of denorms correctly - Make fp overflow a warning, not an error (produces Inf) - Make fp warnings controllable
2007-10-11Additional uses of bool and enumH. Peter Anvin1-2/+2
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.
2007-10-10Use the compiler-provided booleans if available, otherwise emulateH. Peter Anvin1-2/+2
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.
2007-10-04Rewrite the handling of SAA's to allow random accessH. Peter Anvin1-11/+24
SAA's were never intended to allow random access, but several backends do random or semirandom access via saa_fread() and saa_fwrite() anyway. Rewrite the SAA system to allow for efficient random access. On "label.pl 10000000" this improves performance by a factor of 12.
2007-10-02Portability fixesH. Peter Anvin1-12/+13
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.)
2007-09-25Add nasm_zalloc() to nasmlib.cH. Peter Anvin1-0/+3
Add nasm_zalloc(), a wrapper around calloc(), to allocate zero-initialized memory. For large allocations, this is often far more efficient than allocating and zeroing, since the operating system tends to keep a pool of zero pages around.
2007-09-19Make nasm_malloc() et al available from inside ndisasmH. Peter Anvin1-16/+42
Clean up nasmlib to remove functions irrelevant for ndisasm; make nasm_malloc() etc usable inside ndisasm.
2007-09-17Cleaner way to handle MSVC's _snprintf() underscore damageH. Peter Anvin1-0/+1
Some versions of MSVC have snprintf() and vsnprintf() only with a leading underscore. Handle that a bit more cleanly.
2007-09-12Use a perfect hash to look up preprocessor directivesH. Peter Anvin1-0/+3
Use a perfect hash to look up preprocessor directives, and generate the preprocessor directive list automatically.
2007-08-30Finishing touches on perfect hash tokenizer; actually turn the thing onH. Peter Anvin1-10/+0
Finish the perfect hash tokenizer, and actually enable it. Move stdscan() et al to a separate file, since it's not needed in any of the clients of nasmlib other than nasm itself. Run make alldeps.
2007-08-29nasmlib: add bsii() case-insensitive version of bsi()H. Peter Anvin1-0/+3
2007-08-26add nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't workFrank Kotler1-0/+7
2007-04-28Initial support for ELF64Chuck Crayne1-0/+1
2007-04-17Handle "LOCK as REX.R" for MOV CRx; fix warning for invalid 64-bit regsH. Peter Anvin1-0/+2
- MOV gpr,CRx or MOV CRx,gpr can access high control registers with a LOCK prefix; handle that in both the assembler and disassembler. - Get a saner error message when trying to access high resources in non-64-bit mode.
2007-04-13Fixed distinction between char and int8_t data types.Keith Kanios1-20/+20
2007-04-12General push for x86-64 support, dubbed 0.99.00.Keith Kanios1-41/+54
2005-01-15Apply Nindent to all .c and .h filesH. Peter Anvin1-46/+44
2003-09-06First attempt at fixing the stabs/ELF issue.H. Peter Anvin1-6/+11
2002-09-12"const"-ipation fixes from Trevor WoernerH. Peter Anvin1-3/+3
2002-05-17added const keyword to strdupEd Beroset1-2/+2
2002-05-14Code cleanup fixes from Ed BerosetH. Peter Anvin1-1/+1
2002-04-30NASM 0.98.03H. Peter Anvin1-0/+17
2002-04-30NASM 0.98p3H. Peter Anvin1-5/+74
2002-04-30NASM 0.96H. Peter Anvin1-0/+33
2002-04-30NASM 0.94H. Peter Anvin1-0/+24
2002-04-30NASM 0.91H. Peter Anvin1-0/+115