This combines the C and perfect hash tables into a single source file,
and allows for easier future changes to the source-level structures.
The Python-built files are included in the distribution so that Python
is not added as a dependency.
The generated code has been verified equal against the old tables,
excepting a number of bugfixes.
Most of the bugs fixed are in the CPU field, plus a few GAS suffix fixes.
svn path=/trunk/yasm/; revision=1937
* modules.vcproj: Add x86cpu.c, x86regtmod.c, and lc3b arch files to fix build.
* x85geninsn.c: Clean up a couple of unused variables.
* genperf.c: Use sprintf instead of snprintf; convert filename backslashes to slashes.
svn path=/trunk/yasm/; revision=1932
instruction handling.
Use the GNU gperf file format, but continue to use our custom minimal
perfect hash generator.
svn path=/trunk/yasm/; revision=1929
parser.
Add testcase for both local labels and .org fill.
Noticed by: Jung Lee <moorang@gmail.com>
Testcase from: Xiaoming Mo <xiaoming.mo@skelix.org>
svn path=/trunk/yasm/; revision=1899
been using a mix of tabs and 4 spaces to indent; this looks horrible if
tab size is ever not 8. While I debated converting to tab-only indentation
that would have been a far higher impact to the source.
svn path=/trunk/yasm/; revision=1825
the C function and data structure wrappers for Pyrex. We now require
Pyrex 0.9.5 to build the Python wrappers, as only >=0.9.5 has working
weakref support. We actually need 0.9.5.1, but it's not yet released
(0.9.5 has a crash bug in enum wrapping that we trigger).
Pyxelator works a lot better with non-anonymous enums/structs, so libyasm
has been scrubbed for this.
Next step: full Yasm data structure inspection.
svn path=/trunk/yasm/; revision=1745
(sym in other section)-(sym in this section) rather than just
(sym in other section)-(curpos) (e.g. sym-$). Unfortunately supporting
this required precbc to be flowed down to the value_finalize functions,
but it's relatively reasonable to do so, as all of the _finalize() routines
have access to precbc.
Reported by: Peter Tanski <peter_tanski@cox.net>
svn path=/trunk/yasm/; revision=1705
from bytecode.len into bytecode.mult_int. Add new function
yasm_bc_next_offset() to handle the most common use case of bytecode.len,
figuring out the following bytecode's offset.
svn path=/branches/new-optimizer/; revision=1586
of PC-relative values.
Add new yasm_value_get_intnum(); this is a simplified variant of
yasm_value_output_basic().
svn path=/branches/new-optimizer/; revision=1560
yasm_common_calc_bc_dist was used. Rename yasm_common_calc_bc_dist to
yasm_calc_bc_dist, call it directly from the expr functions, and change
higher-level callers to boolean flags of whether to calculate bc distance
or not.
svn path=/branches/new-optimizer/; revision=1550
bytecode multiple output significantly, but this way handles generating
relocations correctly (otherwise extern foo; times 5 dd foo doesn't work!).
* bytecode.h (yasm_bc_tobytes): Remove multiple output parameter.
(yasm_bc_get_multiple): New.
* bytecode.c (yasm_bc_tobytes): Update to iterate through multiple here.
(yasm_bc_get_multiple): New.
* xdf-objfmt.c, elf-objfmt.c, bin-objfmt.c, coff-objfmt.c: Don't iterate
through multiple here.
* nasm-listfmt.c: Use yasm_bc_get_multiple() to get multiple instead of
yasm_bc_tobytes().
* bytecode.pxi: Update.
* tests/win32-relocovfl.asm: Tests both this and [1534] but generates too
huge of a file (3MB) to be put into the automated tests.
svn path=/trunk/yasm/; revision=1536
bytecode outputs just space and not data.
* bytecode.pxi: Update to match.
* bytecode.c (yasm_bc_tobytes): Use reserve flag instead of checking
against bytecode_reserve as special case.
* dwarf2-info.c, dwarf2-line.c, dwarf2-dbgfmt.c, cv-symline.c, cv-type.c,
* stabs-dbgfmt.c, lc3bbc.c, x86bc.c: Update to set reserve=0.
* bc-align.c, bc-insn.c, bc-reserve.c, bc-org.c, bc-incbin.c, bc-data.c,
* bytecode.c: Split out bytecodes into separate files. While we're here,
merge LEB128 into general data bytecode.
svn path=/trunk/yasm/; revision=1532
Fix a double-free problem encountered during this testing.
Redefine symtab.define_special() vis parameter to match symrec.visibility.
svn path=/trunk/yasm/; revision=1526
exception handling. There are now two layers an error or warning goes
through before it hits the user: first an error is logged via
yasm_error_set() (or yasm_warn_set() for a warning). Only one error may
be set, whereas multiple warnings can be set (yasm_warn_set maintains a
linked list). Then, calling yasm_errwarn_propagate() propagates any error
and/or warning(s) to an errwarns structure and associates the
errors/warnings with a line number at that time; this call also clears the
pending errors/warnings and allows new ones to be set. The propagate
function can safely be called when there are no pending error/warnings.
In addition, there are some helper errwarn functions that allow clearing of
an error/warning without propagating, getting it separately, etc.
Still yet to be done: changing most/all uses of yasm_internal_error() into
yasm_error_set(YASM_ERROR_ASSERTION).
The main advantage this change has is making libyasm functions feel much
more library like, and separating the user code line numbers from the inner
function error handling (e.g. intnum create functions only needed the line
number to trigger errors; this is no longer required).
The set/propagate/etc functions use global data structures to avoid passing
around a pointer to every function. This would need to be made thread-local
data in a threaded app. Errwarns containers (that keep associated line
numbers) are no longer global, so multiple source streams can be processed
separately with no conflict (at least if there's only a single thread of
execution).
svn path=/trunk/yasm/; revision=1521