summaryrefslogtreecommitdiff
path: root/tools/python-yasm
Commit message (Collapse)AuthorAgeFilesLines
* Remove $Id$ and RCSID() usage.Peter Johnson2011-08-198-10/+0
| | | | These are useless now that we're using git.
* Fix build with recent Cython.Peter Johnson2011-06-251-2/+2
| | | | [#216 state:resolved]
* Update Pyxelator to avoid deprecation warnings on recent Python versions.Peter Johnson2010-01-032-6/+20
| | | | svn path=/trunk/yasm/; revision=2264
* Use Cython instead of Pyrex.Peter Johnson2010-01-012-3/+3
| | | | svn path=/trunk/yasm/; revision=2256
* Some minor Pyrex fixes:Peter Johnson2010-01-012-5/+5
| | | | | | | - Don't return self in IntNum.__abs__ (return a copy instead). - yasm_sym_status enum values have YASM_ prefixes. svn path=/trunk/yasm/; revision=2255
* All Pyrex files: Use __cinit__ instead of __new__ in extension classes.Peter Johnson2010-01-016-10/+10
| | | | svn path=/trunk/yasm/; revision=2254
* Unbreak python bindings on 64-bit Linux.Peter Johnson2009-12-302-6/+2
| | | | svn path=/trunk/yasm/; revision=2252
* Finish cleanup made in [1948].Peter Johnson2007-09-141-1/+1
| | | | svn path=/trunk/yasm/; revision=1951
* Now that part of the build uses just Python, break apart the PythonPeter Johnson2007-09-131-1/+1
| | | | | | and Pyrex (only required for bindings) checks. svn path=/trunk/yasm/; revision=1948
* Unbreak distcheck when Python is available by pulling in bitvect.h.Peter Johnson2007-09-071-1/+1
| | | | svn path=/trunk/yasm/; revision=1927
* Add support for second parameter (fill value) to .org directive in GASPeter Johnson2007-07-201-2/+2
| | | | | | | | | | | 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
* Pyxelator generation should depend on HEADERS rather than SOURCES.Peter Johnson2007-01-291-1/+1
| | | | svn path=/trunk/yasm/; revision=1747
* Clean up sed usage a tiny bit (don't use cat).Peter Johnson2007-01-291-3/+2
| | | | svn path=/trunk/yasm/; revision=1746
* Massive Python/Pyrex wrapper cleanup. We now use Pyxelator to generatePeter Johnson2007-01-2912-564/+158
| | | | | | | | | | | | | | 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
* Make python module DESTDIR-clean to unbreak distcheck when python module isPeter Johnson2007-01-261-2/+2
| | | | | | enabled. svn path=/trunk/yasm/; revision=1741
* Remove yasm_immval, moving remaining unique information (sign flag) intoPeter Johnson2007-01-212-36/+1
| | | | | | yasm_value. svn path=/trunk/yasm/; revision=1740
* intnum.c: Better internal error checking on intnum creation input strings.Peter Johnson2007-01-202-8/+27
| | | | svn path=/trunk/yasm/; revision=1739
* python-yasm/Makefile.inc: Pull in CPPFLAGS for Python build, which on somePeter Johnson2006-12-301-1/+1
| | | | | | systems can have important include directories that aren't in INCLUDES. svn path=/trunk/yasm/; revision=1726
* Pyxelator: Rip out code wrapper generation. Reindent. Add yasm wrapperPeter Johnson2006-12-1220-9478/+1846
| | | | | | | generator script. Still needs additional tweaks before it can be tied into the build. svn path=/trunk/yasm/; revision=1711
* Bring Pyxelator-r428 into trunk.Peter Johnson2006-12-1222-0/+11051
| | | | svn path=/trunk/yasm/; revision=1710
* Take [1423] to the next logical step by supporting the general case ofPeter Johnson2006-12-102-10/+22
| | | | | | | | | | | | (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
* expr.pxi: Sync with [1702].Peter Johnson2006-11-271-1/+0
| | | | svn path=/trunk/yasm/; revision=1703
* Have incbin search include paths (long-missing feature).Peter Johnson2006-10-281-1/+2
| | | | svn path=/trunk/yasm/; revision=1673
* Don't mix EQU expansion with other expr leveling; we could get confusedPeter Johnson2006-10-181-2/+1
| | | | | | | | | with certain combinations. (2nd half of #83) This also hides some internals of yasm_expr_level_tree. svn path=/trunk/yasm/; revision=1655
* Include test_bytecode.py and test_expr.py in the distribution, as they'rePeter Johnson2006-08-101-0/+2
| | | | | | called out by the python test framework. svn path=/trunk/yasm/; revision=1601
* In preparation for further work on optimizing multiple, break multiple apartPeter Johnson2006-06-201-4/+8
| | | | | | | | 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
* Implement first phase of align and org.Peter Johnson2006-06-111-7/+6
| | | | svn path=/branches/new-optimizer/; revision=1567
* Get rid of origin_prevbc; it's no longer needed due to yasm_value handlingPeter Johnson2006-06-102-2/+4
| | | | | | | | | 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
* Get rid of calc_bc_dist_func, the only times this was used was whenPeter Johnson2006-06-074-19/+21
| | | | | | | | | 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
* Fix major bug related to multiple handling. Unfortunately this slows downPeter Johnson2006-05-111-2/+3
| | | | | | | | | | | | | | | | | | | | | 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
* * coretype.h (yasm_value): Add size field (specified in bits).Peter Johnson2006-05-102-11/+21
| | | | | | | | | | | | | | | | | | | | (yasm_value_output_func): Remove valsize and shift parameters. * bytecode.h (yasm_effaddr): Remove disp_len, replacing with need_nonzero_len. (yasm_immval): Remove len. * value.h (yasm_value_initialize): Add size parameter. (yasm_value_finalize_expr): Likewise. (yasm_value_output_basic): Remove valsize and shift parameters. Update all implementations and users for the above. * intnum.c (yasm_intnum_calc): Fix bug in shift right (was doing a logical instead of arithmetic shift). * lc3b-basic.asm, lc3b-basic.errwarn, lc3b-basic.hex: Update based on fixed warnings. svn path=/trunk/yasm/; revision=1534
* * bc-int.h (yasm_bytecode_callback): Add reserve flag to indicate if thePeter Johnson2006-05-101-0/+1
| | | | | | | | | | | | | | | | 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
* Add/Use helpers to pass void* as manually type-checked PyCObjects.Michael Urman2006-05-075-12/+37
| | | | svn path=/trunk/yasm/; revision=1528
* Rework yasm.Expression to accept strings like '+' to indicate operation.Michael Urman2006-05-076-39/+72
| | | | | | Add tests for yasm.Expression and new yasm.ImmVal. svn path=/trunk/yasm/; revision=1527
* Raise SymbolTable redefinition errors in Python.Michael Urman2006-05-072-11/+44
| | | | | | | 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
* Raise IntNum division by zero errors in Python.Michael Urman2006-05-064-5/+64
| | | | svn path=/trunk/yasm/; revision=1524
* Revamp error/warning handling, using a model similar to Python's internalPeter Johnson2006-05-047-24/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * symrec.pxi: Change various things to properties rather than functions.Peter Johnson2006-04-172-23/+92
| | | | | | | Visibility is handled via set of strings. * test_symrec.py: Test. svn path=/trunk/yasm/; revision=1503
* * python_test.sh: Set srcdir and PYTHON to reasonable defaults if not alreadyPeter Johnson2006-04-171-0/+3
| | | | | | set, this allows easy manual execution of this script outside of make check. svn path=/trunk/yasm/; revision=1502
* * python_test.sh: Use PYTHON variable to find python executable.Peter Johnson2006-04-172-1/+2
| | | | | | | | * python-yasm/tests/Makefile.inc: Pass PYTHON setting down through TESTS_ENVIRONMENT. * Makefile.am: Initialize TESTS_ENVIRONMENT to empty. svn path=/trunk/yasm/; revision=1501
* Add intnum tests; test_cmp is failing right now and needs a source fix.Michael Urman2006-04-173-0/+59
| | | | svn path=/trunk/yasm/; revision=1499
* * test_symrec.py: Actually add test, and fix it to work.Peter Johnson2006-04-171-1/+2
| | | | svn path=/trunk/yasm/; revision=1498
* * python-yasm: Add test framework; large portions copied from Quod LibetPeter Johnson2006-04-175-1/+112
| | | | | | framework. svn path=/trunk/yasm/; revision=1497
* * symrec.pxi: Remove duplicate l.appends() in values() and items().Peter Johnson2006-04-171-2/+0
| | | | svn path=/trunk/yasm/; revision=1496
* * symrec.pxi: Implement iterators.Peter Johnson2006-04-161-23/+83
| | | | | | | | | | | * symrec.h (yasm_symtab_first, yasm_symtab_next, yasm_symtab_iter_value): Supporting functions. * symrec.c (yasm_symtab_first, yasm_symtab_next, yasm_symtab_iter_value): Implement by passing through to... * hamt.h (HAMT_first, HAMT_next, HAMTEntry_get_data): New. * hamt.c (HAMT_first, HAMT_next, HAMTEntry_get_data): Implement. svn path=/trunk/yasm/; revision=1495
* symrec.pxi: Implement __contains__ so that "'foo' in SymbolTable" works.Peter Johnson2006-04-161-0/+5
| | | | svn path=/trunk/yasm/; revision=1494
* * floatnum.pxi: yasm_floatnum doesn't support any ops other than NEG,Peter Johnson2006-04-161-23/+5
| | | | | | other cleanups along the lines of intnum. svn path=/trunk/yasm/; revision=1492
* * symrec.pxi: Revamp to more correctly generate Symbol objects, supportPeter Johnson2006-04-163-9/+112
| | | | | | | | | most dictionary functions (but not yet iterator protocol). * yasm.pyx: Add Py_INCREF, Py_DECREF, malloc, free externals. * coretype.pxi: Rename c_print to print_, add some missing yasm_expr_op enum values. svn path=/trunk/yasm/; revision=1491
* * intnum.pxi: Use correct name for NotImplementedError.Peter Johnson2006-04-161-2/+2
| | | | svn path=/trunk/yasm/; revision=1490
* * intnum.pxi: Implement full set of integer and comparison functions.Peter Johnson2006-04-161-36/+96
| | | | svn path=/trunk/yasm/; revision=1489