Commit graph

17 commits

Author SHA1 Message Date
Peter Johnson
fe09480565 Fix major bug related to multiple handling. Unfortunately this slows down
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
2006-05-11 07:00:33 +00:00
Peter Johnson
2368686527 Add automated arch/x86 tests. Some were moved from tests/nasm, others are new.
svn path=/trunk/yasm/; revision=734
2002-10-03 19:10:56 +00:00
Peter Johnson
ade764b8e9 Add some bin objfmt related testcases. These should go into a framework
sometime!

svn path=/trunk/yasm/; revision=532
2002-03-18 08:23:39 +00:00
Peter Johnson
f6f4313ff6 Use non-preprocessed BITS directive so this can be assembled with current YASM.
svn path=/trunk/yasm/; revision=477
2002-03-02 22:39:35 +00:00
Peter Johnson
01481e7d47 Test circular reference detection. Very basic examples from NASM's docs on
critical expressions.
NASM behavior: 1-3 fail, 4 generates a 4-byte offset in the memory expression.
YASM behavior: 1&2 fail (and rightfully so :), 3 works as expected, and 4
 generates a 1-byte offset.

svn path=/trunk/yasm/; revision=473
2002-02-20 08:16:13 +00:00
Peter Johnson
ca6a1c8167 Massive build system change: single Makefile instead of recursive.
Note: still is automake-generated, but uses .inc files in the various
subdirectories instead of .am files.
TODO: Move arch-specific components of bytecode_test and memexpr_test to
arch/x86.

svn path=/trunk/yasm/; revision=395
2001-12-26 07:14:06 +00:00
Peter Johnson
41d256accc General tests of directives.
svn path=/trunk/yasm/; revision=362
2001-11-21 08:42:56 +00:00
Peter Johnson
77bf842ffc Test the imm and imm8x forms of add.
svn path=/trunk/yasm/; revision=361
2001-11-21 08:42:41 +00:00
Peter Johnson
f371273c90 Add two larger NASM-preprocessed files from UIUC ECE 291's PModeLib as more
typical assembly files.

svn path=/trunk/yasm/; revision=360
2001-11-21 08:41:53 +00:00
Peter Johnson
afcdf3ecd9 Test global/common sharing in addition to extern.
svn path=/trunk/yasm/; revision=359
2001-11-21 08:40:15 +00:00
Peter Johnson
9dc4e6eccc How does NASM's bin format handle sections?
svn path=/trunk/yasm/; revision=358
2001-11-21 08:39:35 +00:00
Peter Johnson
b2876e5f3a Allow multiple EXTERN's of same variable without error (NASM's behavior).
svn path=/trunk/yasm/; revision=354
2001-11-20 23:30:19 +00:00
Peter Johnson
dd9ad840fe Decided to go ahead and commit these little NASM-syntax test files I've been
using for testing various things during development.  Many don't even actually
assemble, as they're testing error conditions.  These all need to be integrated
into a test suite at some point to be truly useful.

svn path=/trunk/yasm/; revision=336
2001-11-17 08:39:14 +00:00
Peter Johnson
91f41e241b Try to fix configure and automake files so everything builds a bit cleaner.
Also try to fix the warnings on the GNU C Library.
Still a lot of work and testing to be done here, but making progress.

svn path=/trunk/yasm/; revision=204
2001-09-20 06:25:05 +00:00
Peter Johnson
3bd6541c5f Allow make check and tests module to be disabled, as it's not portable yet.
svn path=/trunk/yasm/; revision=200
2001-09-19 19:35:53 +00:00
Peter Johnson
0b24caa55c Cleanup of local .cvsignore files after addition of global CVSROOT/cvsignore.
svn path=/trunk/yasm/; revision=193
2001-09-18 18:02:23 +00:00
Peter Johnson
9397744af8 Add unit test framework using Check (http://check.sourceforge.net/).
Only test included right now is a tiny one for one bytecode function, but
will grow as time goes on.
TODO: check for non ANSI C things required by Check.

svn path=/trunk/yasm/; revision=190
2001-09-18 17:38:45 +00:00