Peter Johnson [Tue, 22 Oct 2002 08:51:06 +0000 (08:51 -0000)]
Actually include new tests in distribution.
svn path=/trunk/yasm/; revision=780
Peter Johnson [Tue, 22 Oct 2002 08:48:29 +0000 (08:48 -0000)]
Actually include new tests in the distribution.
svn path=/trunk/yasm/; revision=779
Peter Johnson [Tue, 22 Oct 2002 08:42:16 +0000 (08:42 -0000)]
Get rid of expr_xform_neg_tree(), integrating its functionality into
expr_level_tree(). This fixes negative equ's and probably other issues.
This also makes expr_simplify() a macro pointing to expr_level_tree().
svn path=/trunk/yasm/; revision=778
Peter Johnson [Tue, 22 Oct 2002 07:45:45 +0000 (07:45 -0000)]
Use automake's standard macro for dmalloc instead of rolling our own.
svn path=/trunk/yasm/; revision=777
Peter Johnson [Tue, 22 Oct 2002 06:38:44 +0000 (06:38 -0000)]
Assume all sys/queue.h implementations are broken, and always use our local
one (more implementations are broken than not broken).
svn path=/trunk/yasm/; revision=776
Peter Johnson [Tue, 22 Oct 2002 06:37:24 +0000 (06:37 -0000)]
Fix COFF_SET_VMA output (needed to add section start address to addend).
To ensure all section start addresses are known, added a first pre-pass of
sections to calculate each one's address.
svn path=/trunk/yasm/; revision=775
Peter Johnson [Mon, 21 Oct 2002 09:33:27 +0000 (09:33 -0000)]
Use the current date as the version (for nightly builds). Releases will be
branched and the release version set here.
svn path=/trunk/yasm/; revision=774
Peter Johnson [Mon, 21 Oct 2002 09:10:37 +0000 (09:10 -0000)]
Add COFF object format (for DJGPP). No debugging support yet (need to design
dbgfmt interface).
svn path=/trunk/yasm/; revision=773
Peter Johnson [Mon, 21 Oct 2002 08:56:44 +0000 (08:56 -0000)]
symrec_data_print() doesn't need to handle a NULL data pointer.
svn path=/trunk/yasm/; revision=772
Peter Johnson [Mon, 21 Oct 2002 07:38:15 +0000 (07:38 -0000)]
Run test input files through standard input instead of as input files to avoid
pathname changing issues when builddir != srcdir (previous workaround worked
for text files, but for more complex objfmts such as coff that embed the source
filename in the binary output file, we need to find a different way).
svn path=/trunk/yasm/; revision=771
Peter Johnson [Mon, 21 Oct 2002 05:01:30 +0000 (05:01 -0000)]
Don't treat xfree as a real function (taking its address), as this doesn't work
if dmalloc is enabled.
svn path=/trunk/yasm/; revision=770
Peter Johnson [Mon, 21 Oct 2002 04:53:41 +0000 (04:53 -0000)]
Check for NULL pointer in LT_DLMEM_REASSIGN() before freeing it.
svn path=/trunk/yasm/; revision=769
Peter Johnson [Mon, 21 Oct 2002 04:14:01 +0000 (04:14 -0000)]
Add expr_extract_symrec() to assist in performing relocation output.
svn path=/trunk/yasm/; revision=768
Peter Johnson [Sun, 20 Oct 2002 20:39:29 +0000 (20:39 -0000)]
Add offset parameter to output_expr functions (needed for relocation support).
svn path=/trunk/yasm/; revision=767
Peter Johnson [Sun, 20 Oct 2002 08:59:47 +0000 (08:59 -0000)]
Combine global/common/extern handling into general of_data in symrec.
svn path=/trunk/yasm/; revision=766
Peter Johnson [Fri, 18 Oct 2002 18:30:06 +0000 (18:30 -0000)]
Cleanup objfmt before deleting sections and symrecs.
svn path=/trunk/yasm/; revision=765
Peter Johnson [Thu, 17 Oct 2002 17:02:17 +0000 (17:02 -0000)]
Change how section of_data is allocated/destroyed, separating it from the
sections_switch_general() function.
svn path=/trunk/yasm/; revision=764
Peter Johnson [Tue, 15 Oct 2002 06:45:45 +0000 (06:45 -0000)]
Add general objfmt-specific data to symrec.
Add delete function for symrec objfmt-specific data to objfmt interface.
Delete declare_data_copy function from objfmt interface (it wasn't being called
from anywhere).
Implement functions missing from dbg objfmt.
svn path=/trunk/yasm/; revision=763
Peter Johnson [Sun, 13 Oct 2002 17:01:31 +0000 (17:01 -0000)]
Remove obsolete references to HAVE_GNU_C_LIBRARY which were causing build
breakage on some Linux platforms.
svn path=/trunk/yasm/; revision=762
Peter Johnson [Sat, 12 Oct 2002 07:41:39 +0000 (07:41 -0000)]
Make bytecode and effaddr "data" extensions more portable by including the
base structure as the first element in each data structure. Concept taken from
the JPEG library.
svn path=/trunk/yasm/; revision=761
Peter Johnson [Fri, 11 Oct 2002 06:29:44 +0000 (06:29 -0000)]
Add a rex field in x86_insn (and some default initialization/output handling)
in preparation for x86-64 support.
svn path=/trunk/yasm/; revision=760
Peter Johnson [Wed, 9 Oct 2002 09:03:16 +0000 (09:03 -0000)]
Fix segreg mov instructions.
svn path=/trunk/yasm/; revision=759
Peter Johnson [Wed, 9 Oct 2002 08:11:00 +0000 (08:11 -0000)]
Add extended error/warning handling (just functionality, it's not actually
used yet).
svn path=/trunk/yasm/; revision=758
Peter Johnson [Tue, 8 Oct 2002 08:59:39 +0000 (08:59 -0000)]
Add test for just-committed changes to x86id.re (proper catchalls).
svn path=/trunk/yasm/; revision=757
Peter Johnson [Tue, 8 Oct 2002 08:56:08 +0000 (08:56 -0000)]
Comment out "marker"s, as in these cases re2c doesn't use them.
svn path=/trunk/yasm/; revision=756
Peter Johnson [Tue, 8 Oct 2002 08:54:04 +0000 (08:54 -0000)]
bitvect_test doesn't need any sources besides itself and check.
svn path=/trunk/yasm/; revision=755
Peter Johnson [Tue, 8 Oct 2002 08:53:07 +0000 (08:53 -0000)]
Fix catchalls so they really do catch everything else.
svn path=/trunk/yasm/; revision=754
Peter Johnson [Mon, 7 Oct 2002 19:39:47 +0000 (19:39 -0000)]
Unbreak bin output (label resolution, Bug#6). Also fix alignment bug.
svn path=/trunk/yasm/; revision=753
Peter Johnson [Mon, 7 Oct 2002 19:23:38 +0000 (19:23 -0000)]
Comment spacing fix.
svn path=/trunk/yasm/; revision=752
Peter Johnson [Mon, 7 Oct 2002 19:06:09 +0000 (19:06 -0000)]
Add the ability to add an additional transformation function into the execution
flow of expr_level_tree(). Feature needed for objfmts/bin upcoming fixes.
svn path=/trunk/yasm/; revision=751
Peter Johnson [Sun, 6 Oct 2002 20:38:14 +0000 (20:38 -0000)]
Integrate BitVector version 6.3 changes.
svn path=/trunk/yasm/; revision=750
Peter Johnson [Sun, 6 Oct 2002 19:43:51 +0000 (19:43 -0000)]
Make output endian-tolerant by making intnum and floatnum output functions for
arch. This will also simplify other objfmt expr output functions. Change
file functions to use bits instead of byte/short/long, and create both little
and big endian versions. This name change caused changes in several other
files.
svn path=/trunk/yasm/; revision=747
Peter Johnson [Sat, 5 Oct 2002 09:17:39 +0000 (09:17 -0000)]
Run sed on the re2c output to update the newly added #line output.
svn path=/trunk/yasm/; revision=746
Peter Johnson [Sat, 5 Oct 2002 09:16:13 +0000 (09:16 -0000)]
Output something a little more unique than just - for the output file #line's.
svn path=/trunk/yasm/; revision=745
Peter Johnson [Sat, 5 Oct 2002 09:10:58 +0000 (09:10 -0000)]
Generate #line in the output in a useful way. Now it's much more usable for
debugging, code coverage, etc. (with a little post-processing sed help).
svn path=/trunk/yasm/; revision=744
Peter Johnson [Sat, 5 Oct 2002 07:59:40 +0000 (07:59 -0000)]
Replace #line .. "lex.yy.c" with #line .. "output.c".
svn path=/trunk/yasm/; revision=743
Peter Johnson [Sat, 5 Oct 2002 07:58:20 +0000 (07:58 -0000)]
Import ylwrap from automake-1.5, as we're going to make some custom changes
to it.
svn path=/trunk/yasm/; revision=742
Peter Johnson [Sat, 5 Oct 2002 06:37:44 +0000 (06:37 -0000)]
Use _CFLAGS to eliminate extra CFLAGS (esp. gcov ones) from hitting on the
tests.
svn path=/trunk/yasm/; revision=741
Peter Johnson [Sat, 5 Oct 2002 06:24:50 +0000 (06:24 -0000)]
Include src/compat-queue.h as an EXTRA_yasm_SOURCES instead of just EXTRA_DIST.
svn path=/trunk/yasm/; revision=740
Peter Johnson [Sat, 5 Oct 2002 06:00:37 +0000 (06:00 -0000)]
Undo part of the tools/re2c flattening. Specifying a re2c_CFLAGS causes
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
Peter Johnson [Sat, 5 Oct 2002 05:22:35 +0000 (05:22 -0000)]
Add gcov-related files.
svn path=/trunk/yasm/; revision=738
Peter Johnson [Fri, 4 Oct 2002 09:18:23 +0000 (09:18 -0000)]
Add an option to enable gcov code coverage compiler flags.
svn path=/trunk/yasm/; revision=737
Peter Johnson [Fri, 4 Oct 2002 07:23:11 +0000 (07:23 -0000)]
Make test scripts more portable by detecting echo line-ending features, using
fewer options for sed, and using a perl script for hexdump. As a side effect,
hexdumps are more accurate (the hexdump util put * for as many multiples as
were output, whereas the perl script outputs a line for every byte, no matter
what).
svn path=/trunk/yasm/; revision=736
Peter Johnson [Thu, 3 Oct 2002 19:23:44 +0000 (19:23 -0000)]
Add parsers/nasm automated tests.
svn path=/trunk/yasm/; revision=735
Peter Johnson [Thu, 3 Oct 2002 19:10:56 +0000 (19:10 -0000)]
Add automated arch/x86 tests. Some were moved from tests/nasm, others are new.
svn path=/trunk/yasm/; revision=734
Peter Johnson [Thu, 3 Oct 2002 19:08:13 +0000 (19:08 -0000)]
Create a common out_test.sh test script to be used by a variety of tests.
Rename objfmts/bin/tests/*.bin.hx to *.hex to fit better in the common usage.
svn path=/trunk/yasm/; revision=733
Peter Johnson [Thu, 3 Oct 2002 19:02:53 +0000 (19:02 -0000)]
x86_bc_resolve_insn(): If x86_expr_checkea fails, return not only
BC_RESOLVE_UNKNOWN_LEN but also BC_RESOLVE_ERROR so that a spurious circular
reference detected is not output from the basic optimizer.
svn path=/trunk/yasm/; revision=732
Peter Johnson [Thu, 3 Oct 2002 18:03:17 +0000 (18:03 -0000)]
Increase strictness of EA part of lds family (e.g. so no size specifier is
legal).
svn path=/trunk/yasm/; revision=731
Peter Johnson [Thu, 3 Oct 2002 09:26:47 +0000 (09:26 -0000)]
Fix a major bug: after switching sections, prev_bc was always being set to
NULL, causing any labels at that point to point to the start of the section
instead of the current position!
svn path=/trunk/yasm/; revision=730
Peter Johnson [Thu, 3 Oct 2002 09:23:37 +0000 (09:23 -0000)]
Make bcs_last() a fully visible function rather than a bc-int macro.
svn path=/trunk/yasm/; revision=729
Peter Johnson [Thu, 3 Oct 2002 09:16:11 +0000 (09:16 -0000)]
expr_level_op(): Pull up IDENT-EXPR as well as EXPR-IDENT subtrees.
expr_level_tree(): Call recursively after calling expr_xform_bc_dist instead
of just calling expr_level_op, which wasn't simplifying the whole tree
properly.
svn path=/trunk/yasm/; revision=728
Peter Johnson [Thu, 3 Oct 2002 08:19:21 +0000 (08:19 -0000)]
bc_tobytes(): Check for multiple of 0 and return with bufsize of 0.
svn path=/trunk/yasm/; revision=727
Peter Johnson [Thu, 3 Oct 2002 07:48:12 +0000 (07:48 -0000)]
EQU's should not affect local label mechanism.
svn path=/trunk/yasm/; revision=726
Peter Johnson [Thu, 3 Oct 2002 07:38:15 +0000 (07:38 -0000)]
Fix incorrect invalidation of [eax+ebx+ecx-eax] and others like it.
svn path=/trunk/yasm/; revision=725
Peter Johnson [Thu, 3 Oct 2002 07:06:45 +0000 (07:06 -0000)]
Don't fully simplify effective addresses before trying to determine their
registers.
svn path=/trunk/yasm/; revision=724
Peter Johnson [Thu, 3 Oct 2002 06:45:45 +0000 (06:45 -0000)]
Check for circular equ references (Bug#8).
svn path=/trunk/yasm/; revision=723
Peter Johnson [Wed, 2 Oct 2002 17:06:24 +0000 (17:06 -0000)]
Add missing files: x86id.c, src/section.c, src/arch/x86/x86arch.c.
svn path=/trunk/yasm/; revision=722
Peter Johnson [Wed, 2 Oct 2002 16:56:09 +0000 (16:56 -0000)]
x86_bc_resolve_jmprel(): Delete unused variable 'target'.
svn path=/trunk/yasm/; revision=721
Peter Johnson [Wed, 2 Oct 2002 16:54:24 +0000 (16:54 -0000)]
bin_objfmt_section_data_print(): Fix warning/bug in fprintf call.
svn path=/trunk/yasm/; revision=720
Peter Johnson [Wed, 2 Oct 2002 07:19:44 +0000 (07:19 -0000)]
Update to gettext-0.11.5.
svn path=/trunk/yasm/; revision=719
Peter Johnson [Tue, 1 Oct 2002 18:56:28 +0000 (18:56 -0000)]
Completely revamp how label resolution is done (part of Bug#6). Now calculates
/distances/ between bytecodes in a section using bc_calc_dist() functions (a
"typical" one is provided for most occasions). expr_expand_labelequ() is gone,
as its functionality is integrated into expr_simplify(). Currently these
changes break most bin objfmt output, as it doesn't know how to resolve
absolute labels yet. Also, very preliminary expr support for :, SEG, and WRT
operators has been added (part of Bug#2). Several other minor bug fixes.
svn path=/trunk/yasm/; revision=718
Peter Johnson [Tue, 1 Oct 2002 18:29:08 +0000 (18:29 -0000)]
Update comment for sym_table variable.
svn path=/trunk/yasm/; revision=717
Peter Johnson [Tue, 1 Oct 2002 17:09:44 +0000 (17:09 -0000)]
PSHUFW has 3 operands, not 2 (typo in num_operands value).
svn path=/trunk/yasm/; revision=716
Peter Johnson [Tue, 1 Oct 2002 17:03:16 +0000 (17:03 -0000)]
RET and RETN are exactly equivalent (the previous commit was wrong, but not
for the reason stated; it just had the wrong base opcode).
svn path=/trunk/yasm/; revision=715
Peter Johnson [Fri, 27 Sep 2002 07:49:10 +0000 (07:49 -0000)]
Revert previous commit until we can do this the right way (C2 iw is an
invalid opcode, it needs to be C2 or C3 iw).
svn path=/trunk/yasm/; revision=714
Peter Johnson [Fri, 27 Sep 2002 07:37:31 +0000 (07:37 -0000)]
RET is a form of RETNF.
svn path=/trunk/yasm/; revision=713
Peter Johnson [Fri, 27 Sep 2002 07:30:08 +0000 (07:30 -0000)]
Fix lexing bug for XMM[0-7] (wrong character used to get register index).
svn path=/trunk/yasm/; revision=712
Peter Johnson [Fri, 27 Sep 2002 06:46:59 +0000 (06:46 -0000)]
Declare shifted constants unsigned longs (with UL) before shifting, to
increase portability.
svn path=/trunk/yasm/; revision=711
Peter Johnson [Thu, 26 Sep 2002 18:11:11 +0000 (18:11 -0000)]
The data argument to section_data_print() can never be null.
svn path=/trunk/yasm/; revision=710
Peter Johnson [Thu, 26 Sep 2002 18:00:16 +0000 (18:00 -0000)]
errwarn_new(): Fix bug that could cause infinite loops.
svn path=/trunk/yasm/; revision=709
Peter Johnson [Tue, 24 Sep 2002 18:35:51 +0000 (18:35 -0000)]
Rename intnum_new_int to intnum_new_uint, and add new signed version of
intnum_new_int. Currently only just calls intnum_new_uint with a cast, but
eventually there may be a better way of handling signed numbers.
svn path=/trunk/yasm/; revision=708
Peter Johnson [Mon, 23 Sep 2002 16:29:34 +0000 (16:29 -0000)]
InternalError on unrecognized operations rather than just dropping them.
svn path=/trunk/yasm/; revision=707
Peter Johnson [Mon, 23 Sep 2002 16:25:39 +0000 (16:25 -0000)]
Create LTLIBOBJS from LIBOBJS and add to libyasm.
Change use of LDADD for libraries to LIBADD (automake warning).
svn path=/trunk/yasm/; revision=706
Peter Johnson [Mon, 23 Sep 2002 06:16:59 +0000 (06:16 -0000)]
Move yasm core files into a libyasm shared library (avoiding backlinking).
Some cleanups still needed; a few things in globals should really be somewhere
else, or named differently.
svn path=/trunk/yasm/; revision=705
Peter Johnson [Mon, 23 Sep 2002 05:44:19 +0000 (05:44 -0000)]
Move cur_parser from globals to main (as it's only used in main).
svn path=/trunk/yasm/; revision=704
Peter Johnson [Mon, 23 Sep 2002 03:00:49 +0000 (03:00 -0000)]
With dynamic linking, it's possible for the default object format to not load,
so error out with message instead of asserting.
svn path=/trunk/yasm/; revision=703
Peter Johnson [Sun, 18 Aug 2002 18:47:20 +0000 (18:47 -0000)]
Fix build breakage caused by not using sect access function.
svn path=/trunk/yasm/; revision=702
Peter Johnson [Sun, 18 Aug 2002 03:48:17 +0000 (03:48 -0000)]
Eliminate duplicate code for callbacks from expr_expand_labelequ() by moving
code and adding a resolve_precall function parameter (which caused cascading
changes in bytecode-related sources).
svn path=/trunk/yasm/; revision=701
Peter Johnson [Sat, 17 Aug 2002 05:08:53 +0000 (05:08 -0000)]
Support dynamic linking for objfmts, and make bin and dbg both dynamically
loadable.
svn path=/trunk/yasm/; revision=700
Peter Johnson [Fri, 16 Aug 2002 05:48:10 +0000 (05:48 -0000)]
Warning cleanups.
svn path=/trunk/yasm/; revision=699
Peter Johnson [Fri, 16 Aug 2002 02:45:10 +0000 (02:45 -0000)]
Re-add a hackish fix to set initial bits setting from objfmt for x86 arch.
svn path=/trunk/yasm/; revision=698
Peter Johnson [Wed, 14 Aug 2002 03:48:40 +0000 (03:48 -0000)]
The short forms (0x50+reg) of push/pop reg should be selected before the long
(0xFF, ModRM) forms.
svn path=/trunk/yasm/; revision=697
Peter Johnson [Wed, 14 Aug 2002 03:02:19 +0000 (03:02 -0000)]
Fix %line handling.
svn path=/trunk/yasm/; revision=696
Peter Johnson [Wed, 14 Aug 2002 01:47:25 +0000 (01:47 -0000)]
Remove lemon. We aren't using it, it doesn't need to be in our source tree.
svn path=/trunk/yasm/; revision=695
Peter Johnson [Tue, 13 Aug 2002 05:56:39 +0000 (05:56 -0000)]
Finish remaining instructions (SSE, SSE2, Cyrix MMX). Changed CPU flags for
MMX/SSE2 to reflect that it's the MMX or SSE2 cpu feature, not the cpu family.
svn path=/trunk/yasm/; revision=694
Peter Johnson [Mon, 12 Aug 2002 07:01:31 +0000 (07:01 -0000)]
Add MMX/SSE2 instructions.
svn path=/trunk/yasm/; revision=693
Peter Johnson [Mon, 12 Aug 2002 06:14:57 +0000 (06:14 -0000)]
Add segreg moves.
svn path=/trunk/yasm/; revision=692
Peter Johnson [Mon, 12 Aug 2002 06:00:48 +0000 (06:00 -0000)]
Fix some bugs.
- Typos in imul reg, imm (# of operands)
- Fixes to push/pop. word/dword override opersize now.
svn path=/trunk/yasm/; revision=691
Peter Johnson [Mon, 12 Aug 2002 05:59:12 +0000 (05:59 -0000)]
Allow one-digit hex-constants of the form "0h".
svn path=/trunk/yasm/; revision=690
Peter Johnson [Mon, 12 Aug 2002 05:16:01 +0000 (05:16 -0000)]
Implement relative jumps and calls.
svn path=/trunk/yasm/; revision=689
Peter Johnson [Mon, 12 Aug 2002 03:58:01 +0000 (03:58 -0000)]
Fix writing of PC-relative values (broken in rev. 1.9).
svn path=/trunk/yasm/; revision=688
Peter Johnson [Mon, 12 Aug 2002 03:36:50 +0000 (03:36 -0000)]
x86_parse_targetmod enum should start with value 1, not 0.
svn path=/trunk/yasm/; revision=687
Peter Johnson [Mon, 12 Aug 2002 02:20:35 +0000 (02:20 -0000)]
Take opersize as an input for x86_bc_new_jmprel().
svn path=/trunk/yasm/; revision=686
Peter Johnson [Sun, 11 Aug 2002 18:49:52 +0000 (18:49 -0000)]
Flatten x86_targetval into x86_new_jmprel_data, as the former is no longer used
in the parser.
svn path=/trunk/yasm/; revision=685
Peter Johnson [Sun, 11 Aug 2002 03:32:40 +0000 (03:32 -0000)]
Finish all instructions except for relative jumps, mov segreg, MMX, SSE, and
SSE2.
svn path=/trunk/yasm/; revision=684
Peter Johnson [Sun, 11 Aug 2002 01:07:20 +0000 (01:07 -0000)]
Added rest of floating point instructions. Needed to add new action to
add to opcode byte 1.
svn path=/trunk/yasm/; revision=683
Peter Johnson [Sat, 10 Aug 2002 23:04:28 +0000 (23:04 -0000)]
Add checking of target modifier.
Change operand typing mask constants to be more uniform.
Increase operand type size to long from int, as it now can go over 16 bits.
svn path=/trunk/yasm/; revision=682
Peter Johnson [Sat, 10 Aug 2002 22:48:16 +0000 (22:48 -0000)]
Make "TO" a x86 targetmod.
svn path=/trunk/yasm/; revision=681
Peter Johnson [Sat, 10 Aug 2002 22:09:30 +0000 (22:09 -0000)]
Don't include malloc.h. It's deprecated on most systems.
svn path=/trunk/yasm/; revision=680
Peter Johnson [Sat, 10 Aug 2002 22:06:49 +0000 (22:06 -0000)]
Fix pointer comparison. Should be checking for == NULL, not <0.
svn path=/trunk/yasm/; revision=679