]> granicus.if.org Git - yasm/log
yasm
17 years agoMerge bc-int.h into bytecode.h, removing YASM_BC_INTERNAL in the process.
Peter Johnson [Sat, 14 Jul 2007 04:34:41 +0000 (04:34 -0000)]
Merge bc-int.h into bytecode.h, removing YASM_BC_INTERNAL in the process.

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

17 years agoRemove YASM_LIB_INTERNAL. It never really gained us that much in terms of
Peter Johnson [Sat, 14 Jul 2007 03:11:32 +0000 (03:11 -0000)]
Remove YASM_LIB_INTERNAL.  It never really gained us that much in terms of
visibility savings, as basically everything defined it.

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

17 years agoClean up a number of obsolete autoconf-detected standard C things.
Peter Johnson [Fri, 13 Jul 2007 20:56:28 +0000 (20:56 -0000)]
Clean up a number of obsolete autoconf-detected standard C things.

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

17 years agoBring Mkfiles up-to-date with [1889].
Peter Johnson [Fri, 13 Jul 2007 17:34:21 +0000 (17:34 -0000)]
Bring Mkfiles up-to-date with [1889].

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

17 years agoBring POTFILES.in up to date.
Peter Johnson [Fri, 13 Jul 2007 17:29:59 +0000 (17:29 -0000)]
Bring POTFILES.in up to date.

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

17 years agoChange handling of frontend (mnenomic) instructions to make it easier to
Peter Johnson [Sun, 8 Jul 2007 05:31:59 +0000 (05:31 -0000)]
Change handling of frontend (mnenomic) instructions to make it easier to
customize on the arch side of things.  Instead of passing around an
arch_data[4] for instructions, now the arch can extend the structure itself
to add additional information in any format it likes.

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

17 years agoProperly mark yasm_arch->create() error parameter as an output param.
Peter Johnson [Sat, 30 Jun 2007 20:19:20 +0000 (20:19 -0000)]
Properly mark yasm_arch->create() error parameter as an output param.

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

17 years agoUpdate splint script.
Peter Johnson [Sat, 30 Jun 2007 20:18:50 +0000 (20:18 -0000)]
Update splint script.

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

17 years agoOptimize negating a simple intnum.
Peter Johnson [Sat, 30 Jun 2007 19:46:36 +0000 (19:46 -0000)]
Optimize negating a simple intnum.

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

17 years agoFix buglet in handling of SEG of SEG:OFF. We were deleting the term at
Peter Johnson [Mon, 25 Jun 2007 01:05:04 +0000 (01:05 -0000)]
Fix buglet in handling of SEG of SEG:OFF.  We were deleting the term at
the wrong level.  As we weren't changing numterms before either, this
really could have no effect other than not freeing the memory immediately
(it would be freed later).

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

17 years agoFix default filename buffer overflow.
Peter Johnson [Sat, 23 Jun 2007 00:19:57 +0000 (00:19 -0000)]
Fix default filename buffer overflow.
Note: this is not a security issue.

Noticed by: Mike Frysinger <vapier@gentoo.org>

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

17 years agoRemove errant else. This should not have had any serious effects, as
Peter Johnson [Sun, 10 Jun 2007 03:44:27 +0000 (03:44 -0000)]
Remove errant else.  This should not have had any serious effects, as
combining IP-relative and shifts is very unusual (and probably not possible).

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

17 years agoFix bin objfmt handling of cross-section RIP-relative values; also clean
Peter Johnson [Mon, 4 Jun 2007 01:12:37 +0000 (01:12 -0000)]
Fix bin objfmt handling of cross-section RIP-relative values; also clean
up absolute value handling.

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

17 years agoMake sure objfmt_coff->win64 gets set to 0 in win32 mode.
Peter Johnson [Sat, 2 Jun 2007 08:34:40 +0000 (08:34 -0000)]
Make sure objfmt_coff->win64 gets set to 0 in win32 mode.

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

17 years agoFix uninitialized variable, memory leak.
Peter Johnson [Sat, 2 Jun 2007 08:23:29 +0000 (08:23 -0000)]
Fix uninitialized variable, memory leak.

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

17 years agoCorrect CPU definitions for Prescott, Conroe, Penryn, and Nehalem.
Peter Johnson [Sat, 2 Jun 2007 05:21:33 +0000 (05:21 -0000)]
Correct CPU definitions for Prescott, Conroe, Penryn, and Nehalem.
All are 64-bit capable and thus should set CPU_Hammer; Prescott
was mistakingly also setting AMD features such as 3DNow.

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

17 years agoDon't try to yasm_expr_copy(NULL).
Peter Johnson [Fri, 1 Jun 2007 19:44:38 +0000 (19:44 -0000)]
Don't try to yasm_expr_copy(NULL).

Found by: zzuf

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

17 years agoFix use-after-free in linemap_poke. The first yasm_linemap_set call can
Peter Johnson [Fri, 1 Jun 2007 19:39:29 +0000 (19:39 -0000)]
Fix use-after-free in linemap_poke.  The first yasm_linemap_set call can
realloc linemap->map->vector, invalidating the mapping pointer.

Found by: zzuf+valgrind

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

17 years agoFix a few bugs in new directive handling.
Peter Johnson [Fri, 1 Jun 2007 19:31:00 +0000 (19:31 -0000)]
Fix a few bugs in new directive handling.

Found by: zzuf

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

17 years agoFix typo in filename reference in [1853].
Peter Johnson [Thu, 31 May 2007 06:16:49 +0000 (06:16 -0000)]
Fix typo in filename reference in [1853].

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

17 years agoFix #102: Permit non-standard macho section names.
Peter Johnson [Mon, 28 May 2007 08:52:18 +0000 (08:52 -0000)]
Fix #102: Permit non-standard macho section names.

Two forms are legal ({} are replaceables):
SECTION {segname} {sectname}
SECTION {sectname} segname={segname}
Also,
SECTION {sectname}
where sectname is unrecognized is also legal, defaults segname to __TEXT,
and generates a warning.

Contributed by: bird-yasm@anduin.net

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

17 years agoClean up directive handling. This standardizes error/warning messages and
Peter Johnson [Sat, 26 May 2007 17:56:36 +0000 (17:56 -0000)]
Clean up directive handling.  This standardizes error/warning messages and
makes value/parameters more well-defined and flexible enough to handle
string parameters.  Value/parameters would now be better called name/values,
but avoid changing the name for now.

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

17 years agoSupport .set in GAS parser.
Peter Johnson [Sat, 26 May 2007 17:39:42 +0000 (17:39 -0000)]
Support .set in GAS parser.

Contributed by: Sebastian D'Alessandro <sejawoya@yahoo.com.ar>

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

17 years agoFix issue with [1843]; we can't use strlen() here as we can be given
Peter Johnson [Sun, 20 May 2007 19:50:04 +0000 (19:50 -0000)]
Fix issue with [1843]; we can't use strlen() here as we can be given
an unterminated input string.

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

17 years agoFix yasm__xstrdup() for the case when the destination is larger than the
Peter Johnson [Fri, 18 May 2007 21:11:46 +0000 (21:11 -0000)]
Fix yasm__xstrdup() for the case when the destination is larger than the
source.

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

17 years agoMove absolute section handling into NASM parser, removing all traces of it
Peter Johnson [Tue, 15 May 2007 07:27:26 +0000 (07:27 -0000)]
Move absolute section handling into NASM parser, removing all traces of it
from libyasm core.  Now absolute sections are tracked locally to the parser
and the parser generates EQUs directly for labels in absolute sections.

Fixes #106 and #103.

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

17 years agoUpdated testcase result to match [1840] missed in that commit.
Peter Johnson [Tue, 15 May 2007 06:26:52 +0000 (06:26 -0000)]
Updated testcase result to match [1840] missed in that commit.

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

17 years agoFix handling of SVM (AMD Pacifica) instructions that take an implicit
Peter Johnson [Tue, 15 May 2007 06:25:56 +0000 (06:25 -0000)]
Fix handling of SVM (AMD Pacifica) instructions that take an implicit
rax/eax/ax operand.  This operand actually selects the address size, so
make it a memory operand instead of a register operand (GAS follows this
approach as well).  Enable SVM instructions in non-64-bit mode as well.

Now the following opcodes work as intended:
 invlpga [rax/eax/ax], ecx
 skinit [eax]
 vmload/vmrun/vmsave [rax/eax/ax]

Noticed by: arkon@ragestorm.net
MFC after: 2 days

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

17 years agoClean up expect_() in both parsers. In the nasm parser we were passing a
Peter Johnson [Sun, 13 May 2007 19:55:54 +0000 (19:55 -0000)]
Clean up expect_() in both parsers.  In the nasm parser we were passing a
raw string as a printf string which could have resulted in a random memory
access.

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

17 years agoFix #107: Float input "1.000000" hit an edge case in the code that caused
Peter Johnson [Fri, 11 May 2007 02:19:36 +0000 (02:19 -0000)]
Fix #107: Float input "1.000000" hit an edge case in the code that caused
the rounding increment at the end of float conversion to wrap the mantissa
from all 1's to 0, resulting in an incorrect result.

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

17 years agoFix handling of SSE4 crc opcodes with 64-bit register operands.
Peter Johnson [Wed, 9 May 2007 04:31:19 +0000 (04:31 -0000)]
Fix handling of SSE4 crc opcodes with 64-bit register operands.
Noticed by: arkon@ragestorm.net

Fix bug relating to recognizing crc32 rax, bh as an error: the opersize=64
changing into REX prefix was happening too late to be caught as an error.
Move this logic from tobytes()/len() functions into finalize(), with proper
prefix handling.

MFC after: 2 days

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

17 years agoAdd copyright and license text to GAP input file.
Peter Johnson [Mon, 30 Apr 2007 01:08:34 +0000 (01:08 -0000)]
Add copyright and license text to GAP input file.

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

17 years agoAdd SSE4.1 and SSE4.2 instructions.
Peter Johnson [Mon, 30 Apr 2007 00:53:22 +0000 (00:53 -0000)]
Add SSE4.1 and SSE4.2 instructions.

Noticed by: arkon@ragestorm.net

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

17 years agoRename sse4 test to ssse3, to make way for the real SSE4.
Peter Johnson [Mon, 30 Apr 2007 00:25:41 +0000 (00:25 -0000)]
Rename sse4 test to ssse3, to make way for the real SSE4.

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

17 years agoCall yasm_symtab_parser_finalize() from parser so caller doesn't need to
Peter Johnson [Mon, 23 Apr 2007 04:53:01 +0000 (04:53 -0000)]
Call yasm_symtab_parser_finalize() from parser so caller doesn't need to
figure out itself if undef should be changed into extern or not.

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

17 years agoUpdate all copyright dates.
Peter Johnson [Sun, 22 Apr 2007 05:09:49 +0000 (05:09 -0000)]
Update all copyright dates.

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

17 years agoExpand tabs to spaces.
Peter Johnson [Sun, 22 Apr 2007 04:59:36 +0000 (04:59 -0000)]
Expand tabs to spaces.

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

17 years agoBite the bullet and convert tabs to spaces. Previously yasm's source has
Peter Johnson [Sun, 22 Apr 2007 03:32:46 +0000 (03:32 -0000)]
Bite the bullet and convert tabs to spaces.  Previously yasm's source has
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

17 years agoAdd end_prolog macro (maps to [endprolog]) in addition to end_prologue.
Peter Johnson [Sat, 14 Apr 2007 20:01:16 +0000 (20:01 -0000)]
Add end_prolog macro (maps to [endprolog]) in addition to end_prologue.

Suggested by: Brian Gladman

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

17 years agoFix #104 by removing obsolete comment about -m amd64 not setting BITS=64.
Peter Johnson [Sat, 14 Apr 2007 19:55:45 +0000 (19:55 -0000)]
Fix #104 by removing obsolete comment about -m amd64 not setting BITS=64.

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

17 years agoUnbreak Windows build by using yasm__strcasecmp instead of strcasecmp.
Peter Johnson [Fri, 23 Mar 2007 04:55:00 +0000 (04:55 -0000)]
Unbreak Windows build by using yasm__strcasecmp instead of strcasecmp.

Patch by: Chris tophe <cohika@gmail.com>

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

17 years agoFix a couple of doxygen comments.
Peter Johnson [Thu, 22 Mar 2007 05:46:59 +0000 (05:46 -0000)]
Fix a couple of doxygen comments.

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

17 years agoMassive update of directive handling, including handling of extern, global,
Peter Johnson [Wed, 21 Mar 2007 04:23:59 +0000 (04:23 -0000)]
Massive update of directive handling, including handling of extern, global,
and common declare.  The latter no longer passes through objfmt at parse time;
instead the objfmt must handle them at output time (objfmt-specific
extensions are parsed & stored by the parser).  Directives are now handled
using a list (with function pointers) rather than a single function entry
point.

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

17 years agohamt.c: Fix portability nit (uintptr_t & ~1UL) and make some minor cleanups.
Peter Johnson [Thu, 8 Mar 2007 06:05:20 +0000 (06:05 -0000)]
hamt.c: Fix portability nit (uintptr_t & ~1UL) and make some minor cleanups.

Backport in: 3 days

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

17 years agoUpdate doxygen comments.
Peter Johnson [Tue, 6 Mar 2007 06:58:55 +0000 (06:58 -0000)]
Update doxygen comments.

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

17 years agoRestructure yasm_object as the central clearing house for yasm_objfmt,
Peter Johnson [Mon, 5 Mar 2007 08:43:00 +0000 (08:43 -0000)]
Restructure yasm_object as the central clearing house for yasm_objfmt,
yasm_dbgfmt, and yasm_arch.  This eliminates a lot of redundant keeping
track of this information in the individual object and debug formats and
also simplifies a fair amount of code.

I'm still not happy with how arch gets passed around in output code, but
there may not be much of an alternative there.

While I'm here, clean up some unused variables and functions and re-enable
the warning for unused variables in configure.ac.

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

17 years agoMach-O object format: 0-fill unused portion of section and segment names
Peter Johnson [Sun, 4 Mar 2007 09:21:03 +0000 (09:21 -0000)]
Mach-O object format: 0-fill unused portion of section and segment names
in load commands.  This caused test miscompares on other platforms and
could conceivably cause yasm to crash by reading beyond proper boundaries
(but this is unlikely).  Functionally the output is the same.

Reported by: christophe.malvasio1@aliceadsl.fr

Backport in: 1 week

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

17 years agoMake symrec robust against defining a symbol both as a label and an equ,
Peter Johnson [Sun, 4 Mar 2007 02:32:38 +0000 (02:32 -0000)]
Make symrec robust against defining a symbol both as a label and an equ,
or as an equ multiple times.

Found by: zzuf (http://sam.zoy.org/zzuf/)

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

17 years agoGAS parser: fix unterminated string handling to properly handle EOF.
Peter Johnson [Sun, 4 Mar 2007 01:53:50 +0000 (01:53 -0000)]
GAS parser: fix unterminated string handling to properly handle EOF.

Found by: zzuf (http://sam.zoy.org/zzuf/)

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

17 years agoFix a couple of NULL pointer derefs.
Peter Johnson [Sun, 4 Mar 2007 01:00:01 +0000 (01:00 -0000)]
Fix a couple of NULL pointer derefs.

Found by: zzuf (http://sam.zoy.org/zzuf/)

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

17 years agoFollow the lead of GAS and change the prefix order to SEG, ADDR, DATA,
Peter Johnson [Fri, 2 Mar 2007 07:09:28 +0000 (07:09 -0000)]
Follow the lead of GAS and change the prefix order to SEG, ADDR, DATA,
LOCKREP.  According to mailing list traffic, Intel prefers this order
(apparently for SIMD?) and AMD doesn't care.

GAS commit by: H.J. Lu <hongjiu.lu@intel.com>

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

17 years agoAdd option -Wsize-override to turn on warning on multiple operand size
Peter Johnson [Thu, 1 Mar 2007 07:03:16 +0000 (07:03 -0000)]
Add option -Wsize-override to turn on warning on multiple operand size
overrides such as: dword dword [5] or dword word [5].  The warnings for
these are disabled by default, as these combinations are intentially
legal for use with macros.

Suggested by: pingved@gmail.com

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

17 years agoWork around possibly used uninitialized warning, even though it never can be.
Peter Johnson [Thu, 1 Mar 2007 06:48:29 +0000 (06:48 -0000)]
Work around possibly used uninitialized warning, even though it never can be.

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

17 years agoAdd -E and -s command line options. These mimic the NASM behavior of these
Peter Johnson [Thu, 1 Mar 2007 06:03:04 +0000 (06:03 -0000)]
Add -E and -s command line options.  These mimic the NASM behavior of these
options: -E redirects errors to a file, and -s redirects errors to stdout.
The default for errors is still stderr.

Suggested by: pingved@gmail.com

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

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