yasm_intnum_get_sized().
* intnum.h (yasm_intnum_create_sized): Prototype.
* yasm.pyx: Bring in _PyLong_From/AsByteArray functions.
* intnum.pyx: Use yasm_intnum_create_sized(), etc to implement full 128-bit
number handling.
* intnum.c (yasm_intnum_get_str): Return strings in hex rather than in
decimal.
svn path=/trunk/yasm/; revision=1488
we shouldn't need to remove the build directory. Not removing it speeds up
the build considerably (we don't have to rebuild all of the Python bindings
just because the Makefile changed, for example).
svn path=/trunk/yasm/; revision=1486
* configure.ac: Pass GCC value to Makefile
* Makefile.inc: Pass GCC value to python-setup.txt
* setup.py: Check GCC value and append -w if necessary.
svn path=/trunk/yasm/; revision=1460
and the "pyrexc" command is just a wrapper, so instead of looking for
"pyrexc" look for the module instead.
* pyrex.m4: New macro to check Pyrex version.
* m4/Makefile.inc: Add to dist.
* configure.ac: Use macro to check for Pyrex >= 0.9.3.
* python-yasm/Makefile.inc: Run Python directly instead of pyrexc wrapper.
svn path=/trunk/yasm/; revision=1457
enabled with --enable-python (defaults to auto-detect).
Thanks to some magic in python-yasm/Makefile.inc and setup.py, this actually
plays nicely with automake distcheck.
* m4/pythonhead.m4: Script to find Python.h.
* m4/Makefile.inc: Include it in distfiles.
* configure.ac: Add --enable-python option and Python and Pyrex detection.
* tools/Makefile.inc: Pull tools/python-yasm/Makefile.inc into build.
* python-yasm/Makefile.inc: Add automake build magic for extension.
* setup.py: Likewise.
svn path=/trunk/yasm/; revision=1456
bit broken: you need to remove yasm.c before running python setup.py build
or the pyrex step may not actually run.
svn path=/trunk/yasm/; revision=1450
works so far. Build it with the command {{{python setup.py build}}}, and
optionally symlink to the built yasm.so to enable importing it from a
python started in the same directory.
svn path=/trunk/yasm/; revision=1449
* Makefile.inc: Remove hamt.c from GAP build and turn off -g when building.
* hamt.c: Revert [1404] (no longer required).
svn path=/trunk/yasm/; revision=1405
calculations so that these functions behave identically on 32-bit and >32-bit
architectures.
* gap.c: Fix warnings.
* perfect.c: Change K&R to prototypes to avoid warnings.
svn path=/trunk/yasm/; revision=1398
instead of re2c-generated code. This gives identifier recognition a
significant speedup and also drastically shortens compilation time of yasm
itself. This rewrite encouraged combining instruction and prefix
recognition into one function and register and target modifier
recognition into a second function (rather than having 5 or so separate
functions).
Also created a state in the NASM parser (as was done in the GAS parser),
so instructions/prefixes are only looked for until an instruction is
recognized. This avoids search time in the instructions hash for operands.
The tool used to generate the new identifier recognition is called GAP.
Someday we might extend this to generate more code than just the perfect
hash lookup.
* tools/gap: New tool to Generate Architecture Parser (aka perfect hashes).
* phash.c, phash.h: Helper functions used by GAP-generated code.
* x86id.re: Delete. Split into..
* x86parse.gap: Contains all identifier recognition portions.
* x86id.c: Contains instruction operand tables and code and higher-level
entry points into x86parse.gap perfect hash recognizers. Chose to flow
history of x86id.re into this file.
* arch.h: Combine instruction/prefix entry points and register/target
modifier entry points.
* lc3barch.c, lc3bid.re, lc3barch.h: Update to match.
* x86arch.c, x86arch.h: Update to match.
* Makefile.am, various Makefile.inc: Update.
* POTFILES.in: Update due to numerous file changes (not just this commit).
* Mkfiles: Update. VC build files untested at the moment.
svn path=/trunk/yasm/; revision=1395
* Mkfiles/vc8/config.h: Define _CRT_SECURE_NO_DEPRECATE to avoid most warnings about *_s functions.
Also use _stricmp directly instead of stricmp to avoid warnings.
* libyasm/strcasecmp.c: Support _stricmp usage.
* util.h: Likewise.
* tools/re2c/actions.c: Include ctype.h to define toupper/tolower.
* Mkfiles/vc8/modules/modules.vcproj: Don't include nasm-macros.c directly; this file is included
into another file and has no public variables.
* Mkfiles/vc8/yasm.sln: Allow x64 cross-builds from Win32 by building genmacro, genmodule, and
re2c for Win32 target.
svn path=/trunk/yasm/; revision=1328
Going ahead and removing the cleanup script; a later commit will get rid
of the remaining unused variable warnings that the cleanup script took care
of as well.
svn path=/trunk/yasm/; revision=1273
control whether the symbol is replaced with the symbol's value (old
behavior), or just replace it with 0 (new optional behavior). The old
behavior is enabled by setting relocate=1.
* expr.h (yasm_expr_extract_symrec): Likewise (and document new behavior).
* elf-objfmt.c (elf_objfmt_output_expr): Use new function (with relocate=1).
* coff-objfmt.c (coff_objfmt_output_expr): Likewise.
* expr.c (yasm_expr_extract_segment): Renamed to yasm_expr_extract_segoff, a
more approprate name given what operator it looks at.
* expr.h (yasm_expr_extract_segment): Likewise.
* x86bc.c (x86_bc_jmp_tobytes): Use new function name.
* expr.c (yasm_expr_extract_seg): New function to remove SEG unary operator.
* expr.h (yasm_expr_extract_seg): Likewise.
* expr.c (yasm_expr_extract_shr): New function to split SHR operator into
left and right halves.
* expr.h (yasm_expr_extract_shr): Likewise.
* xdf.h: New header file describing the newly added Extended Dynamic Object
Format (XDF). Note: GCC-only code.
* xdfdump.c: New utility that uses the format described in xdf.h to
completely dump an XDF file. Note: non-portable code (runs correctly on
little endian machines only).
Neither of these files are currently included in the distribution.
* xdf-objfmt.c: New YASM objfmt module to output XDF format object files.
* modules/objfmts/xdf/Makefile.inc: Add to build.
* modules/objfmts/Makefile.inc: Likewise.
The XDF object format is a blend between COFF and OMF. It is a very simple
object format intended for use by operating system loaders or similar types
of targets. It allows shifted relocations (useful for static interrupt or
page tables), both flat and segment-relative, and the use of the SEG, WRT,
and x86 JMP FAR notations.
Test cases will be committed soon.
svn path=/trunk/yasm/; revision=1149
Remove use of "inline". This could cause breakage on non-gcc systems (as
these files do not use config.h because of cross-build reasons).
* yasm.dep, yasm.mak, yasm.dsp, yasm.dsw: Remove support for VC6 builds.
* libyasm.dsp, libyasm.mak, libyasm.dep: Likewise.
* modules.dsp, modules.mak, modules.dep: Likewise.
* yasm.suo: Remove unneeded user options file.
* vc: Update svn:ignore property to reflect removal of VC6 builds and user
options file.
* genmacro.vcproj: Generate genmacro tool.
* genmacro/run.bat: Use genmacro to generate nasm-macros.c.
* modules.vcproj: Point to the new location for nasm-macros.c.
* re2c.vcproj: Generate re2c tool.
* re2c/run.bat: Use re2c to generate re2c-generated .c files.
* yasm.sln: Utilize genmacro and re2c.
svn path=/trunk/yasm/; revision=1144
automake to automatically prepend re2c- to all generated object files,
eliminating the main.o conflict. Also, it prevents extended compilation flags
from applying to the re2c build.
In Makefile.am, also allow automake to automatically include the autoconf
conditionally-included files strsep and mergesort.
svn path=/trunk/yasm/; revision=739
- Moved (by repocopy) main.c to re2c.c
- Moved (by repocopy) parser.y to re2c-parser.y
- Changed to Makefile.inc's rather than Makefile.am's
- Modified all the source file local includes to point to tools/re2c/*.h
svn path=/trunk/yasm/; revision=668