]> granicus.if.org Git - yasm/log
yasm
17 years agoBump trunk version to 0.6.99 after 0.6.0 release.
Peter Johnson [Sun, 25 Feb 2007 18:41:04 +0000 (18:41 -0000)]
Bump trunk version to 0.6.99 after 0.6.0 release.

svn path=/trunk/yasm/; revision=1801

17 years agoAdd Mach-O to yasm_objfmts(7) man page.
Peter Johnson [Sat, 24 Feb 2007 23:33:27 +0000 (23:33 -0000)]
Add Mach-O to yasm_objfmts(7) man page.

svn path=/trunk/yasm/; revision=1796

17 years agostabs_test.sh: Fix line endings after removal of eol-style native property.
Peter Johnson [Sat, 24 Feb 2007 21:30:08 +0000 (21:30 -0000)]
stabs_test.sh: Fix line endings after removal of eol-style native property.

svn path=/trunk/yasm/; revision=1794

17 years agostabs_test.sh: Fix properties.
Peter Johnson [Sat, 24 Feb 2007 21:28:35 +0000 (21:28 -0000)]
stabs_test.sh: Fix properties.

svn path=/trunk/yasm/; revision=1793

17 years agoMassive warnings cleanup and cleanup of size_t vs uintptr_t vs unsigned long.
Peter Johnson [Sat, 24 Feb 2007 20:19:27 +0000 (20:19 -0000)]
Massive warnings cleanup and cleanup of size_t vs uintptr_t vs unsigned long.

svn path=/trunk/yasm/; revision=1792

17 years agointnum.c: Remove tracking of origsize. This wasn't useful.
Peter Johnson [Sat, 24 Feb 2007 18:52:08 +0000 (18:52 -0000)]
intnum.c: Remove tracking of origsize.  This wasn't useful.

svn path=/trunk/yasm/; revision=1791

17 years agoWarning cleanups (unused variable/label).
Peter Johnson [Sat, 24 Feb 2007 18:26:01 +0000 (18:26 -0000)]
Warning cleanups (unused variable/label).

svn path=/trunk/yasm/; revision=1790

17 years agoMove libyasm-stdint.h include out of util.h, as util.h is included from
Peter Johnson [Sat, 24 Feb 2007 04:16:05 +0000 (04:16 -0000)]
Move libyasm-stdint.h include out of util.h, as util.h is included from
build platform files.

While here, fix a few warnings by pushing uintptr_t to a few more register
usages.

Noticed by: rugxulo@gmail.com

svn path=/trunk/yasm/; revision=1786

17 years agoFix DJGPP build.
Peter Johnson [Fri, 23 Feb 2007 03:59:53 +0000 (03:59 -0000)]
Fix DJGPP build.

Reported by: rugxulo@gmail.com

svn path=/trunk/yasm/; revision=1785

17 years agoDon't distribute re2c-built files or configure-built stdint.h.
Peter Johnson [Thu, 22 Feb 2007 03:40:31 +0000 (03:40 -0000)]
Don't distribute re2c-built files or configure-built stdint.h.

svn path=/trunk/yasm/; revision=1783

17 years agoSet keyword expansion.
Peter Johnson [Wed, 21 Feb 2007 06:45:39 +0000 (06:45 -0000)]
Set keyword expansion.

svn path=/trunk/yasm/; revision=1782

17 years agoCV8: Don't put any ".name" symbols into the debug symbol table. These
Peter Johnson [Tue, 20 Feb 2007 05:18:47 +0000 (05:18 -0000)]
CV8: Don't put any ".name" symbols into the debug symbol table.  These
aren't really useful to the user, and caused issues with things like .xdata
and .pdata, which can't be referenced in other sections.

Reported by: Chris Tophe <cohika@gmail.com>

svn path=/trunk/yasm/; revision=1778

17 years agoRevamp macho object format design, fixing some bugs in the process.
Peter Johnson [Mon, 19 Feb 2007 08:21:17 +0000 (08:21 -0000)]
Revamp macho object format design, fixing some bugs in the process.
No new features yet.

svn path=/trunk/yasm/; revision=1777

17 years agoGAS parser: support calll and callq.
Peter Johnson [Mon, 19 Feb 2007 02:36:10 +0000 (02:36 -0000)]
GAS parser: support calll and callq.

svn path=/trunk/yasm/; revision=1776

17 years agoGAS parser: support labels on the same line as other instructions/directives.
Peter Johnson [Mon, 19 Feb 2007 02:17:41 +0000 (02:17 -0000)]
GAS parser: support labels on the same line as other instructions/directives.

svn path=/trunk/yasm/; revision=1775

17 years agoFix build (hopefully) on Win64 by using uintptr_t more widely; Win64 is a
Peter Johnson [Sun, 18 Feb 2007 20:42:55 +0000 (20:42 -0000)]
Fix build (hopefully) on Win64 by using uintptr_t more widely; Win64 is a
LLP64 platform so it's unsafe to cast pointers to unsigned long.

Reported by: Chris Tophe <cohika@gmail.com>

svn path=/trunk/yasm/; revision=1774

17 years agoAdd a jump_target flag to the yasm_value structure. This will be used in
Peter Johnson [Sun, 18 Feb 2007 08:10:37 +0000 (08:10 -0000)]
Add a jump_target flag to the yasm_value structure.  This will be used in
the macho objfmt to differentiate between jump targets and data values.

svn path=/trunk/yasm/; revision=1773

17 years agoFix crash when possibly 32-bit 64-bit immediate is a weird absolute value.
Peter Johnson [Fri, 16 Feb 2007 08:02:33 +0000 (08:02 -0000)]
Fix crash when possibly 32-bit 64-bit immediate is a weird absolute value.

svn path=/trunk/yasm/; revision=1772

17 years agoWork around other warnings by including util.h earlier.
Peter Johnson [Thu, 15 Feb 2007 03:05:12 +0000 (03:05 -0000)]
Work around other warnings by including util.h earlier.

svn path=/trunk/yasm/; revision=1771

17 years agoFix up some GCC 4.x warnings.
Peter Johnson [Thu, 15 Feb 2007 03:03:12 +0000 (03:03 -0000)]
Fix up some GCC 4.x warnings.

Submitted by: Charles Bailey <yasm@hashpling.org>

svn path=/trunk/yasm/; revision=1770

17 years agoTry to cut down on DJGPP build warnings.
Peter Johnson [Thu, 15 Feb 2007 03:01:08 +0000 (03:01 -0000)]
Try to cut down on DJGPP build warnings.

svn path=/trunk/yasm/; revision=1769

17 years agoUpdate to gettext 0.16.1.
Peter Johnson [Tue, 13 Feb 2007 07:31:11 +0000 (07:31 -0000)]
Update to gettext 0.16.1.

Note that due to an m4 bug, you need at least m4 1.4.5, and autoconf built
with the newer version of m4, to run autoconf on the source now (this does
not apply if you're just running ./configure from a tarball).

svn path=/trunk/yasm/; revision=1768

17 years agoAllow more than just times to trigger on any change during optimization;
Peter Johnson [Tue, 13 Feb 2007 07:28:53 +0000 (07:28 -0000)]
Allow more than just times to trigger on any change during optimization;
now any negative id is treated as trigger on any change as well.

svn path=/trunk/yasm/; revision=1767

17 years agoOnly enable -ansi -pedantic -Wall in maintainer mode.
Peter Johnson [Tue, 13 Feb 2007 06:29:01 +0000 (06:29 -0000)]
Only enable -ansi -pedantic -Wall in maintainer mode.

svn path=/trunk/yasm/; revision=1766

17 years agoFix some warnings.
Peter Johnson [Tue, 13 Feb 2007 06:17:45 +0000 (06:17 -0000)]
Fix some warnings.

svn path=/trunk/yasm/; revision=1765

17 years agoPyrex detection: strip a-z suffix to correctly detect Pyrex 0.9.5.1a.
Peter Johnson [Mon, 12 Feb 2007 08:44:58 +0000 (08:44 -0000)]
Pyrex detection: strip a-z suffix to correctly detect Pyrex 0.9.5.1a.

Reported by: Danny Reeves <danny_reeves@hotmail.com>

svn path=/trunk/yasm/; revision=1764

17 years agoEnable .pdata and .xdata special handling only for win64, not for win32
Peter Johnson [Mon, 12 Feb 2007 08:27:02 +0000 (08:27 -0000)]
Enable .pdata and .xdata special handling only for win64, not for win32
and win64.

svn path=/trunk/yasm/; revision=1763

17 years agoAdd support for Win64 structured exception handling (aka .xdata and .pdata).
Peter Johnson [Mon, 12 Feb 2007 03:48:53 +0000 (03:48 -0000)]
Add support for Win64 structured exception handling (aka .xdata and .pdata).

Requested by: Myria Chan, Brian Gladman, several others
Helped by: Brian Gladman (format documentation pointers)

This commit adds the necessary directives and some higher-level macros to
make it easier to generate the .xdata and .pdata sections needed for
structured exception handling on Win64.  The overall construction mirrors
MASM very closely, so it should be possible for near-direct translation of
MASM code to Yasm; see for example objfmts/win64/tests/sce3.masm and
objfmts/win64/tests/sce4.asm.  This commit does *not* break generating these
yourself (which you may want to do if you're a compiler).

This commit adds special proc macros so the function layout will look like:

proc_frame <procname>
... (frame setup and unwind directives)
end_prologue (or alternatively [endprolog])
...
endproc_frame

The "raw pseudo operations" (.directives) as described in MSDN
(http://msdn2.microsoft.com/en-us/library/ms235231(VS.80).aspx)
have been exactly mirrored in Yasm, as follows:
[pushreg], [setframe], [allocstack], [savereg], [savexmm128], [pushframe],
[endprolog]

Note the [] are required.

Additionally, the following macros have been implemented that MASM provides
in ksamd64.inc, and as documented in MSDN
(http://msdn2.microsoft.com/en-us/library/ms235217(VS.80).aspx):
push_reg, rex_push_reg, push_eflags, rex_push_eflags, alloc_stack,
save_reg, save_xmm128, push_frame, set_frame, end_prologue

I'll next work on getting all of this documented in the user manual.

svn path=/trunk/yasm/; revision=1762

17 years agocoff-objfmt.c: Refactor directives. Also fix small feature regression
Peter Johnson [Thu, 8 Feb 2007 08:13:42 +0000 (08:13 -0000)]
coff-objfmt.c: Refactor directives.  Also fix small feature regression
introduced in [1712] by re-supporting the .ident directive for COFF output.

svn path=/trunk/yasm/; revision=1761

17 years agoUpdate copyright date to 2007.
Peter Johnson [Thu, 8 Feb 2007 05:02:37 +0000 (05:02 -0000)]
Update copyright date to 2007.
Sync list of contributors with wiki/YasmTeam.

svn path=/trunk/yasm/; revision=1760

17 years agoTokenize registers in directives.
Peter Johnson [Thu, 8 Feb 2007 04:40:54 +0000 (04:40 -0000)]
Tokenize registers in directives.

svn path=/trunk/yasm/; revision=1759

17 years agoMissed one NULL-handling case in previous commit.
Peter Johnson [Wed, 7 Feb 2007 08:35:33 +0000 (08:35 -0000)]
Missed one NULL-handling case in previous commit.

svn path=/trunk/yasm/; revision=1758

17 years agoAllow directives to have no parameters in the parser, and check for it at
Peter Johnson [Wed, 7 Feb 2007 08:29:41 +0000 (08:29 -0000)]
Allow directives to have no parameters in the parser, and check for it at
a lower level.

To reduce code duplication, refactor several of the large if/else structures
into multiple functions with a lookup table.

Add support for registers to be used in directive expressions.

Allow directives to have underscores and numbers (still cannot start with
numbers).

svn path=/trunk/yasm/; revision=1757

17 years agomacho-objfmt.c: Fix unused variable warning.
Peter Johnson [Tue, 6 Feb 2007 07:42:52 +0000 (07:42 -0000)]
macho-objfmt.c: Fix unused variable warning.

svn path=/trunk/yasm/; revision=1756

17 years agonasm-listfmt.c: Fix warning due to [1752] multiple -> signed change.
Peter Johnson [Tue, 6 Feb 2007 07:41:55 +0000 (07:41 -0000)]
nasm-listfmt.c: Fix warning due to [1752] multiple -> signed change.

svn path=/trunk/yasm/; revision=1755

17 years agoSupport forced identifiers ($foo) in directives. This makes yasm match
Peter Johnson [Mon, 5 Feb 2007 08:11:52 +0000 (08:11 -0000)]
Support forced identifiers ($foo) in directives.  This makes yasm match
NASM behavior with regards to e.g. extern $foo.

Unfortunately this makes yasm start not matching NASM behavior with regards
to the RDF module directive.  In NASM, module $foo results in a literal $foo
reference; yasm now requires either a double $ (e.g. $$foo) or quotes (e.g.
"$foo").  The special case for section (section $foo --> literal $foo) is
still present, but keeping this for other directives is extremely difficult.

svn path=/trunk/yasm/; revision=1754

17 years agoFix #98. Fix implemented by merging any reserve multiple into the main
Peter Johnson [Sun, 4 Feb 2007 00:41:42 +0000 (00:41 -0000)]
Fix #98.  Fix implemented by merging any reserve multiple into the main
bytecode multiple.

strucsize.asm tests both creation and instantiation of a nested structure.
[1751] and [1752] fix bugs found during the testing of the instantiation
portion of this testcase.

A side effect of this change is that some errors are found in different
phases, and the error messages are slightly different.  Split
reserve-error.asm testcase into two parts to still get full coverage.

svn path=/trunk/yasm/; revision=1753

17 years agoAllow multiples to become temporarily negative during optimization.
Peter Johnson [Sun, 4 Feb 2007 00:34:28 +0000 (00:34 -0000)]
Allow multiples to become temporarily negative during optimization.
Negative multiples are still checked for during output.

svn path=/trunk/yasm/; revision=1752

17 years agosection.c (check_cylce): Avoid segfault by checking for bt_size=0.
Peter Johnson [Sun, 4 Feb 2007 00:31:44 +0000 (00:31 -0000)]
section.c (check_cylce): Avoid segfault by checking for bt_size=0.

svn path=/trunk/yasm/; revision=1751

17 years agoFix handling of times 0 <...>.
Peter Johnson [Sat, 3 Feb 2007 23:52:44 +0000 (23:52 -0000)]
Fix handling of times 0 <...>.

svn path=/trunk/yasm/; revision=1750

17 years agoActually fully support "gnu" alias for "gas" parser. A number of places
Peter Johnson [Wed, 31 Jan 2007 18:29:12 +0000 (18:29 -0000)]
Actually fully support "gnu" alias for "gas" parser.  A number of places
do a check against the parser name.

Reported by: rugxulo@gmail.com

svn path=/trunk/yasm/; revision=1749

17 years agoNow that Pyrex 0.9.5.1 is out, require it (incorporates a needed fix).
Peter Johnson [Wed, 31 Jan 2007 04:08:27 +0000 (04:08 -0000)]
Now that Pyrex 0.9.5.1 is out, require it (incorporates a needed fix).

svn path=/trunk/yasm/; revision=1748

17 years agoPyxelator generation should depend on HEADERS rather than SOURCES.
Peter Johnson [Mon, 29 Jan 2007 03:56:37 +0000 (03:56 -0000)]
Pyxelator generation should depend on HEADERS rather than SOURCES.

svn path=/trunk/yasm/; revision=1747

17 years agoClean up sed usage a tiny bit (don't use cat).
Peter Johnson [Mon, 29 Jan 2007 03:44:23 +0000 (03:44 -0000)]
Clean up sed usage a tiny bit (don't use cat).

svn path=/trunk/yasm/; revision=1746

17 years agoMassive Python/Pyrex wrapper cleanup. We now use Pyxelator to generate
Peter Johnson [Mon, 29 Jan 2007 03:32:37 +0000 (03:32 -0000)]
Massive Python/Pyrex wrapper cleanup.  We now use Pyxelator to generate
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

17 years agoFix #97: Support right-shifted symbols in binary output (the root cause).
Peter Johnson [Sun, 28 Jan 2007 00:47:16 +0000 (00:47 -0000)]
Fix #97: Support right-shifted symbols in binary output (the root cause).

Also fix the symptom by checking for non-NULL value->rel.

svn path=/trunk/yasm/; revision=1744

17 years agoUnbreak out_test.sh; the previous commit caused an infinite loop.
Peter Johnson [Sun, 28 Jan 2007 00:40:36 +0000 (00:40 -0000)]
Unbreak out_test.sh; the previous commit caused an infinite loop.

svn path=/trunk/yasm/; revision=1743

17 years agoFix #96 by setting the timestamp in the COFF header. VC2005's incremental linker...
Peter Johnson [Sat, 27 Jan 2007 08:42:48 +0000 (08:42 -0000)]
Fix #96 by setting the timestamp in the COFF header.  VC2005's incremental linker uses the
timestamp to determine if the object file has been updated, so not setting it makes for
bad behavior (the object file gets updated, but when the executable is linked it uses the
older "internal" version).

To keep tests passing, check an environment variable (YASM_TEST_SUITE); if this exists, the
timestamp is set to 0.  Set this environment variable in out_test.sh.

svn path=/trunk/yasm/; revision=1742

17 years agoMake python module DESTDIR-clean to unbreak distcheck when python module is
Peter Johnson [Fri, 26 Jan 2007 07:39:01 +0000 (07:39 -0000)]
Make python module DESTDIR-clean to unbreak distcheck when python module is
enabled.

svn path=/trunk/yasm/; revision=1741

17 years agoRemove yasm_immval, moving remaining unique information (sign flag) into
Peter Johnson [Sun, 21 Jan 2007 22:01:34 +0000 (22:01 -0000)]
Remove yasm_immval, moving remaining unique information (sign flag) into
yasm_value.

svn path=/trunk/yasm/; revision=1740

17 years agointnum.c: Better internal error checking on intnum creation input strings.
Peter Johnson [Sat, 20 Jan 2007 19:37:02 +0000 (19:37 -0000)]
intnum.c: Better internal error checking on intnum creation input strings.

svn path=/trunk/yasm/; revision=1739

17 years agoFix bug in [1737]. Using a valid environment variable after a non-existent
Peter Johnson [Sat, 20 Jan 2007 05:52:32 +0000 (05:52 -0000)]
Fix bug in [1737].  Using a valid environment variable after a non-existent
one would result in the part of the string prior to the non-existent one
getting dropped.

svn path=/trunk/yasm/; revision=1738

17 years agoSupport environment variables in %include along the lines of FASM:
Peter Johnson [Fri, 19 Jan 2007 08:05:17 +0000 (08:05 -0000)]
Support environment variables in %include along the lines of FASM:
%include "%SOMEVAR%/subdir/file.inc"

Multiple %VAR% are supported in a single %include.
Undefined vars are not expanded.

Suggested by: Martin Mocko <vid512@gmail.com>

svn path=/trunk/yasm/; revision=1737

17 years agoAdd dbgfmt_cv8 to flat Mkfiles (DJGPP).
Peter Johnson [Fri, 19 Jan 2007 07:30:19 +0000 (07:30 -0000)]
Add dbgfmt_cv8 to flat Mkfiles (DJGPP).

Noticed by: Rugxulo <rugxulo@gmail.com>

svn path=/trunk/yasm/; revision=1736

17 years agoMake gnu an alias for gas parser.
Peter Johnson [Thu, 18 Jan 2007 04:09:59 +0000 (04:09 -0000)]
Make gnu an alias for gas parser.

Suggested by: Rugxulo <rugxulo@gmail.com>

svn path=/trunk/yasm/; revision=1735

17 years agoAdd macho to Mkfiles.
Peter Johnson [Thu, 18 Jan 2007 04:03:33 +0000 (04:03 -0000)]
Add macho to Mkfiles.

Noticed by: Rugxulo <rugxulo@gmail.com>

svn path=/trunk/yasm/; revision=1734

17 years agoUnbreak distcheck (missing test shell scripts from EXTRA_DIST).
Peter Johnson [Mon, 15 Jan 2007 17:54:46 +0000 (17:54 -0000)]
Unbreak distcheck (missing test shell scripts from EXTRA_DIST).

svn path=/trunk/yasm/; revision=1733

17 years agoInitial commit of Mach-O object format.
Peter Johnson [Sat, 13 Jan 2007 19:34:04 +0000 (19:34 -0000)]
Initial commit of Mach-O object format.

Contributed by: Henryk Richter <henryk.richter@comlab.uni-rostock.de>

This adds 3 object format keywords: macho, macho32, macho64.  These work in
the same way as elf, elf32, and elf64.  The object format is still a work
in progress; amongst other things it does not yet support full cross-section
references (othersym1-othersym2), dynamic linking, or GAS input syntax.  We
will continue to improve and work on these features in the near future.

svn path=/trunk/yasm/; revision=1732

17 years ago.indent.pro: Update ancient typedef list.
Peter Johnson [Thu, 11 Jan 2007 04:58:53 +0000 (04:58 -0000)]
.indent.pro: Update ancient typedef list.

svn path=/trunk/yasm/; revision=1731

17 years agocoretype.h: Remove yasm_optimizer typedef.
Peter Johnson [Thu, 11 Jan 2007 04:58:22 +0000 (04:58 -0000)]
coretype.h: Remove yasm_optimizer typedef.

svn path=/trunk/yasm/; revision=1730

17 years agox86arch.c, x86id.c: Explicitly cast to unsigned char.
Peter Johnson [Sun, 7 Jan 2007 22:00:53 +0000 (22:00 -0000)]
x86arch.c, x86id.c: Explicitly cast to unsigned char.
stabs-dbgfmt.c: Check for overflow, cast to unsigned short.

svn path=/trunk/yasm/; revision=1729

17 years agogas-parse.c: Delete unused variables.
Peter Johnson [Sun, 7 Jan 2007 21:58:51 +0000 (21:58 -0000)]
gas-parse.c: Delete unused variables.

svn path=/trunk/yasm/; revision=1728

17 years agocoff-objfmt.c: Close small memory leak.
Peter Johnson [Sat, 30 Dec 2006 06:08:54 +0000 (06:08 -0000)]
coff-objfmt.c: Close small memory leak.

svn path=/trunk/yasm/; revision=1727

17 years agopython-yasm/Makefile.inc: Pull in CPPFLAGS for Python build, which on some
Peter Johnson [Sat, 30 Dec 2006 05:44:20 +0000 (05:44 -0000)]
python-yasm/Makefile.inc: Pull in CPPFLAGS for Python build, which on some
systems can have important include directories that aren't in INCLUDES.

svn path=/trunk/yasm/; revision=1726

17 years agobc-data.c: Fix memory leak when handling LEB128 data.
Peter Johnson [Sat, 30 Dec 2006 05:43:18 +0000 (05:43 -0000)]
bc-data.c: Fix memory leak when handling LEB128 data.

svn path=/trunk/yasm/; revision=1725

17 years agoGAS parser: convert to recursive descent.
Peter Johnson [Sat, 30 Dec 2006 03:19:24 +0000 (03:19 -0000)]
GAS parser: convert to recursive descent.

Remove all Bison supporting struts as we no longer need Bison.

svn path=/trunk/yasm/; revision=1724

17 years agoNASM parser bugfixes, and add support for section names that include "-"
Peter Johnson [Sat, 30 Dec 2006 02:48:17 +0000 (02:48 -0000)]
NASM parser bugfixes, and add support for section names that include "-"
(such as the common .note.GNU-stack section).  While Yasm allows such section
names by enclosing with double-quotes, NASM allows this, so for compatibility
it makes sense for Yasm to as well.

svn path=/trunk/yasm/; revision=1723

17 years agoyasm_value_delete(): Check for NULL expr before attempting to delete it.
Peter Johnson [Sat, 30 Dec 2006 02:45:39 +0000 (02:45 -0000)]
yasm_value_delete(): Check for NULL expr before attempting to delete it.

svn path=/trunk/yasm/; revision=1722

18 years agonasm-parse.c, x86id.c: Fix unused variable warnings.
Peter Johnson [Wed, 27 Dec 2006 21:06:50 +0000 (21:06 -0000)]
nasm-parse.c, x86id.c: Fix unused variable warnings.
coff-objfmt.c: Fix return without a value.

svn path=/trunk/yasm/; revision=1721

18 years agoPOTFILES.in: Bring up to date by adding a couple of missing files.
Peter Johnson [Sun, 24 Dec 2006 21:22:54 +0000 (21:22 -0000)]
POTFILES.in: Bring up to date by adding a couple of missing files.

svn path=/trunk/yasm/; revision=1720

18 years agoRemove remaining references to nasm-bison.c/h.
Peter Johnson [Sun, 24 Dec 2006 21:18:01 +0000 (21:18 -0000)]
Remove remaining references to nasm-bison.c/h.
Noticed by: Sean Darcy <seandarcy2@gmail.com>
Patch by: Charles Bailey <charles@hashpling.org>

Fix automake 1.10 error.
Noticed/fix by: Sean Darcy <seandarcy2@gmail.com>

svn path=/trunk/yasm/; revision=1719

18 years agoPort re2c parser from YACC to recursive descent.
Peter Johnson [Sun, 24 Dec 2006 00:13:19 +0000 (00:13 -0000)]
Port re2c parser from YACC to recursive descent.

svn path=/trunk/yasm/; revision=1718

18 years agoFix Mkfiles for previous commit (NASM recursive descent parser).
Peter Johnson [Sat, 23 Dec 2006 21:06:10 +0000 (21:06 -0000)]
Fix Mkfiles for previous commit (NASM recursive descent parser).

svn path=/trunk/yasm/; revision=1717

18 years agoNASM parser: change from Bison parser to hand-written recursive descent
Peter Johnson [Sat, 23 Dec 2006 10:20:51 +0000 (10:20 -0000)]
NASM parser: change from Bison parser to hand-written recursive descent
parser with one token of lookahead.  This allows for better error handling
and proper handling of things like "xxxx"/5.  There may be a minor speedup
but it's probably a wash.

Still TODO:
 - Unify the expression parser with the NASM preproc one.
 - Change the GAS parser to recursive descent.

Only had to change one test result; this is due to re-ordering of symrec
creation versus symrec use in data expressions such as x db y.  With the
Bison parser, the symrec use (y) would come first, now the symrec creation
(x) comes first.

svn path=/trunk/yasm/; revision=1716

18 years agoRename yasm_dvs_destroy() to yasm_dvs_delete() to match the fact it's an
Peter Johnson [Sat, 23 Dec 2006 06:45:14 +0000 (06:45 -0000)]
Rename yasm_dvs_destroy() to yasm_dvs_delete() to match the fact it's an
initialized not allocated, so the function doesn't actually free the
provided pointer.

svn path=/trunk/yasm/; revision=1715

18 years agoFix bad valparams setup introduced in previous commit. yasm_vps_append()
Peter Johnson [Sun, 17 Dec 2006 18:11:00 +0000 (18:11 -0000)]
Fix bad valparams setup introduced in previous commit.  yasm_vps_append()
is a macro and does bad things when given a non-variable.

Tracked down by: Peter Tanski <p.tanski@gmail.com>

svn path=/trunk/yasm/; revision=1713

18 years agoPush down GAS .ident directive handling into objfmts. Note this makes it
Peter Johnson [Thu, 14 Dec 2006 07:39:01 +0000 (07:39 -0000)]
Push down GAS .ident directive handling into objfmts.  Note this makes it
such that only ELF and COFF actually handle .ident; all other object
formats silently ignore it.

In Win32/Win64, the .ident contents are dumped into the .rdata$zzz section
rather than the .comment section as in COFF and ELF; this is due to the
fact the GNU linker for Win32 is broken and puts .comment in the output
executable as a separate section, breaking the executable.  The .rdata$zzz
name matches that used by GAS to work around this same linker bug.

Reported and tracked down by: Peter Tanski <p.tanski@gmail.com>

svn path=/trunk/yasm/; revision=1712

18 years agoPyxelator: Rip out code wrapper generation. Reindent. Add yasm wrapper
Peter Johnson [Tue, 12 Dec 2006 07:16:45 +0000 (07:16 -0000)]
Pyxelator: Rip out code wrapper generation.  Reindent.  Add yasm wrapper
generator script.  Still needs additional tweaks before it can be tied
into the build.

svn path=/trunk/yasm/; revision=1711

18 years agoBring Pyxelator-r428 into trunk.
Peter Johnson [Tue, 12 Dec 2006 07:11:48 +0000 (07:11 -0000)]
Bring Pyxelator-r428 into trunk.

svn path=/trunk/yasm/; revision=1710

18 years agoTake [1423] to the next logical step by supporting the general case of
Peter Johnson [Sun, 10 Dec 2006 07:05:06 +0000 (07:05 -0000)]
Take [1423] to the next logical step by supporting the general case of
(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

18 years agovalparam.h (yasm_vps_destroy): Fix documentation.
Peter Johnson [Mon, 4 Dec 2006 03:14:22 +0000 (03:14 -0000)]
valparam.h (yasm_vps_destroy): Fix documentation.

svn path=/trunk/yasm/; revision=1704

18 years agoexpr.pxi: Sync with [1702].
Peter Johnson [Mon, 27 Nov 2006 03:38:36 +0000 (03:38 -0000)]
expr.pxi: Sync with [1702].

svn path=/trunk/yasm/; revision=1703

18 years agoRemove YASM_EXPR_SYMREC hack; it's no longer used due to changes in
Peter Johnson [Mon, 27 Nov 2006 03:37:59 +0000 (03:37 -0000)]
Remove YASM_EXPR_SYMREC hack; it's no longer used due to changes in
absolute section reference expansion.

svn path=/trunk/yasm/; revision=1702

18 years agoRename linemgr.c and linemgr.h to linemap.c and linemap.h. The "manager"
Peter Johnson [Sun, 26 Nov 2006 21:02:59 +0000 (21:02 -0000)]
Rename linemgr.c and linemgr.h to linemap.c and linemap.h.  The "manager"
part of linemgr is long gone, and the current naming is a little confusing.

svn path=/trunk/yasm/; revision=1701

18 years agoGAS parser: match .file and .line handling to that of GAS. In GAS, both
Peter Johnson [Sun, 26 Nov 2006 20:50:23 +0000 (20:50 -0000)]
GAS parser: match .file and .line handling to that of GAS.  In GAS, both
.file (sans file number) and .line need to be given before error messages
start having the file/line numbers specified.

This temporarily breaks .rept error reporting somewhat (as the current code
outputs just .line for .rept expansion), but this will be fixed soon.

svn path=/trunk/yasm/; revision=1700

18 years agoerrwarn.c (yasm_warn_occurred): New, warning near-equivalent to
Peter Johnson [Sun, 26 Nov 2006 06:49:31 +0000 (06:49 -0000)]
errwarn.c (yasm_warn_occurred): New, warning near-equivalent to
yasm_error_occurred().

svn path=/trunk/yasm/; revision=1699

18 years agoFix #92: CPU 8086 doesn't support PUSH imm; this was added in the 186.
Peter Johnson [Thu, 23 Nov 2006 02:15:47 +0000 (02:15 -0000)]
Fix #92: CPU 8086 doesn't support PUSH imm; this was added in the 186.

svn path=/trunk/yasm/; revision=1698

18 years agogas-token.re: Use new yasm_unescape_cstring() to handle string constants.
Peter Johnson [Tue, 21 Nov 2006 09:00:29 +0000 (09:00 -0000)]
gas-token.re: Use new yasm_unescape_cstring() to handle string constants.

svn path=/trunk/yasm/; revision=1697

18 years agofile.c (yasm_unescape_cstring): New function to unescape a string following
Peter Johnson [Tue, 21 Nov 2006 08:55:43 +0000 (08:55 -0000)]
file.c (yasm_unescape_cstring): New function to unescape a string following
C-style escaping conventions.  Will update GAS parser to use this.

svn path=/trunk/yasm/; revision=1696

18 years agoerrwarn.c (yasm_warn_fetch): Follow documentation and don't crash if no
Peter Johnson [Tue, 21 Nov 2006 08:54:05 +0000 (08:54 -0000)]
errwarn.c (yasm_warn_fetch): Follow documentation and don't crash if no
warnings pending and this is called.

svn path=/trunk/yasm/; revision=1695

18 years agoOutput warnings if no errors occurred in preproc-only mode.
Peter Johnson [Mon, 20 Nov 2006 07:37:17 +0000 (07:37 -0000)]
Output warnings if no errors occurred in preproc-only mode.

svn path=/trunk/yasm/; revision=1694

18 years agoyapp_test.sh: Fix error recording and srcdir replacement.
Peter Johnson [Mon, 20 Nov 2006 07:36:46 +0000 (07:36 -0000)]
yapp_test.sh: Fix error recording and srcdir replacement.

svn path=/trunk/yasm/; revision=1693

18 years agogas-token.re (strbuf_append): Remove line parameter.
Peter Johnson [Mon, 20 Nov 2006 06:27:03 +0000 (06:27 -0000)]
gas-token.re (strbuf_append): Remove line parameter.

svn path=/trunk/yasm/; revision=1692

18 years agogas-bison.y: Fix crash when .ident is used with an object format that
Peter Johnson [Mon, 20 Nov 2006 01:20:11 +0000 (01:20 -0000)]
gas-bison.y: Fix crash when .ident is used with an object format that
doesn't support the .comment section.

svn path=/trunk/yasm/; revision=1691

18 years agoClean up a few minor nits (warnings).
Peter Johnson [Sun, 19 Nov 2006 01:04:29 +0000 (01:04 -0000)]
Clean up a few minor nits (warnings).

svn path=/trunk/yasm/; revision=1690

18 years agogas-parser.h: Fix nit (NASM_PARSER_H define instead of GAS_PARSER_H).
Peter Johnson [Sat, 18 Nov 2006 09:34:42 +0000 (09:34 -0000)]
gas-parser.h: Fix nit (NASM_PARSER_H define instead of GAS_PARSER_H).

svn path=/trunk/yasm/; revision=1689

18 years agoFix #91 and a few other minor nits. Reorganize to make for clearer flow.
Peter Johnson [Sat, 18 Nov 2006 06:20:06 +0000 (06:20 -0000)]
Fix #91 and a few other minor nits.  Reorganize to make for clearer flow.

svn path=/trunk/yasm/; revision=1688

18 years agoyapp_test.sh: Unbreak.
Peter Johnson [Thu, 16 Nov 2006 07:49:37 +0000 (07:49 -0000)]
yapp_test.sh: Unbreak.

svn path=/trunk/yasm/; revision=1687

18 years agoFix quoting error.
Peter Johnson [Thu, 16 Nov 2006 07:19:23 +0000 (07:19 -0000)]
Fix quoting error.

svn path=/trunk/yasm/; revision=1686

18 years agoyapp-preproc.c: Build fix.
Peter Johnson [Thu, 16 Nov 2006 04:49:34 +0000 (04:49 -0000)]
yapp-preproc.c: Build fix.

svn path=/trunk/yasm/; revision=1685