Commit graph

153 commits

Author SHA1 Message Date
mx237
98a83602f2
Fix EOL handling in genmacro.c (#123) 2020-05-03 23:38:42 -07:00
Scott Graham
ac99773493 Avoid shadowing warning when building with VS2015 2015-02-19 17:05:38 -08:00
Maks Naumov
bd3a470498 missing 'break' in initalen() 2014-04-11 21:05:55 +03:00
Ami Fischman
5f01ee0f94 Drop success-path chatter from genperf. 2012-03-02 14:12:19 -08:00
Peter Johnson
ab19547382 re2c: Work around tmpfile() issue on win32.
tmpfile() defaults to C:\, and on Windows 7 can run into permissions issues.
Add workaround implementation from cairo
(http://cgit.freedesktop.org/cairo/commit/?id=4fa46e3caaffb54f4419887418d8d0ea39816092)

See also: http://msdn.microsoft.com/en-us/library/x8x7sakw(v=VS.80).aspx
(community content section)
2011-10-31 00:29:42 -07:00
Peter Johnson
2bd66514b6 re2c: Use tmpfile instead of fixed temporary filename.
This could cause a race condition when running parallel make.

Tracked down by Volker Braun.

[#238 state:resolved]
[#165 state:resolved]
2011-10-02 23:20:38 -07:00
Peter Johnson
94ab1135a3 Remove $Id$ and RCSID() usage.
These are useless now that we're using git.
2011-08-19 10:43:16 -07:00
Peter Johnson
2f6162a0ae Fix build with recent Cython.
[#216 state:resolved]
2011-06-25 14:58:27 -07:00
Peter Johnson
737c225a50 Update Pyxelator to avoid deprecation warnings on recent Python versions.
svn path=/trunk/yasm/; revision=2264
2010-01-03 03:47:16 +00:00
Peter Johnson
fcb228f18c Use Cython instead of Pyrex.
svn path=/trunk/yasm/; revision=2256
2010-01-01 20:55:07 +00:00
Peter Johnson
f608f67ad2 Some minor Pyrex fixes:
- 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
2010-01-01 20:54:15 +00:00
Peter Johnson
4df9f87323 All Pyrex files: Use __cinit__ instead of __new__ in extension classes.
svn path=/trunk/yasm/; revision=2254
2010-01-01 20:52:25 +00:00
Peter Johnson
65b18427f4 Unbreak python bindings on 64-bit Linux.
svn path=/trunk/yasm/; revision=2252
2009-12-30 06:21:24 +00:00
Peter Johnson
29ad858dad Fix #189: Avoid compiler warning in genperf.
svn path=/trunk/yasm/; revision=2235
2009-11-03 05:15:37 +00:00
Peter Johnson
4e15ef1cc9 Fix #187: Add new variable CFLAGS_FOR_BUILD for CC_FOR_BUILD compiles.
Due to the need to support cross-building, CC_FOR_BUILD is used instead of
CC for tools that will be run as part of the build process.  However, it
is sometimes necessary to add custom CFLAGS for these builds; CFLAGS_FOR_BUILD
supports this cleanly.

svn path=/trunk/yasm/; revision=2234
2009-10-31 21:52:42 +00:00
Peter Johnson
e3b6f5bc9b Add gencheck.py Python script to make it easier to generate expected results
from long .asm files that generate simple binary output (e.g. for opcode
testing).

svn path=/trunk/yasm/; revision=2198
2009-05-10 05:21:26 +00:00
Peter Johnson
eb7b1adb30 Enable DLL/plugin builds with cmake on Windows.
Add proper declspec dllimport/dllexport to all libyasm functions.
Use macros to make these do nothing on non-cmake and Unix builds.

svn path=/trunk/yasm/; revision=2101
2008-05-23 06:46:51 +00:00
Peter Johnson
b7f2fbc64f Add cmake build infrastructure.
Not default nor even distributed in the .tar.gz, the cmake build allows for
loadable yasm plugins by building libyasm as a shared library.
Example plugins are in the plugins/ directory, and may be loaded into a
cmake-built yasm using the -N command line option (non-cmake builds will
not have this option).

Tested only on Linux so far, but should be relatively painless to port to
Windows thanks to the use of cmake rather than libtool to create shared
libraries.

The only modification to the main source tree is some conditional-compiled
additions to yasm.c.

svn path=/trunk/yasm/; revision=2098
2008-05-22 09:08:03 +00:00
Peter Johnson
3d8a8f577c Make ISO C89 compliant (too long constant string, use of // comment).
svn path=/trunk/yasm/; revision=2096
2008-05-15 06:55:57 +00:00
Peter Johnson
deffd98d53 Commit moved, updated genmacro script missed in [2082] commit.
svn path=/trunk/yasm/; revision=2084
2008-05-09 07:08:17 +00:00
Peter Johnson
0423a89a79 Fix some re2c memory/initialization issues.
Found by: valgrind

svn path=/trunk/yasm/; revision=2072
2008-04-25 01:58:59 +00:00
Peter Johnson
e1f577f6d2 tools/xdf: Make 64-bit safe.
svn path=/trunk/yasm/; revision=2027
2008-01-19 08:30:21 +00:00
Peter Johnson
f210b61533 re2c: Fix -b generation in certain cases.
Fix from re2c repo r417 (sourceforge bug 1479044).

svn path=/trunk/yasm/; revision=2025
2007-12-15 00:00:55 +00:00
Peter Johnson
75677dee86 Remove unused variable.
svn path=/trunk/yasm/; revision=1959
2007-09-18 05:38:06 +00:00
Peter Johnson
e774242fd1 Finish cleanup made in [1948].
svn path=/trunk/yasm/; revision=1951
2007-09-14 05:19:10 +00:00
Peter Johnson
121de99320 Now that part of the build uses just Python, break apart the Python
and Pyrex (only required for bindings) checks.

svn path=/trunk/yasm/; revision=1948
2007-09-13 02:53:30 +00:00
Peter Johnson
cfcad025c5 Now that genperf takes an output filename, change informational outputs
to stdout instead of stderr.

svn path=/trunk/yasm/; revision=1942
2007-09-11 02:11:19 +00:00
Peter Johnson
d0033b06c5 Change genperf to take input and output filenames rather than outputting to
standard output.  This makes for better error handling behavior with make
(redirecting the standard output could leave empty files behind on error).

svn path=/trunk/yasm/; revision=1939
2007-09-10 07:15:50 +00:00
Peter Johnson
f150e45913 Change x86 instruction tables to be automatically generated.
This combines the C and perfect hash tables into a single source file,
and allows for easier future changes to the source-level structures.

The Python-built files are included in the distribution so that Python
is not added as a dependency.

The generated code has been verified equal against the old tables,
excepting a number of bugfixes.

Most of the bugs fixed are in the CPU field, plus a few GAS suffix fixes.

svn path=/trunk/yasm/; revision=1937
2007-09-10 06:59:47 +00:00
Peter Johnson
1387e29705 Windows build fixes:
* modules.vcproj: Add x86cpu.c, x86regtmod.c, and lc3b arch files to fix build.
* x85geninsn.c: Clean up a couple of unused variables.
* genperf.c: Use sprintf instead of snprintf; convert filename backslashes to slashes.

svn path=/trunk/yasm/; revision=1932
2007-09-08 02:13:25 +00:00
Peter Johnson
00e958bcf6 Break apart perfect hash lookup generation and x86 arch-specific
instruction handling.

Use the GNU gperf file format, but continue to use our custom minimal
perfect hash generator.

svn path=/trunk/yasm/; revision=1929
2007-09-07 22:05:33 +00:00
Peter Johnson
23c19a1d52 Unbreak distcheck when Python is available by pulling in bitvect.h.
svn path=/trunk/yasm/; revision=1927
2007-09-07 21:49:35 +00:00
Peter Johnson
36cdd57be2 Add support for second parameter (fill value) to .org directive in GAS
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
2007-07-20 03:40:59 +00:00
Peter Johnson
469e54fa4a Update all copyright dates.
svn path=/trunk/yasm/; revision=1827
2007-04-22 05:09:49 +00:00
Peter Johnson
00473ca981 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
2007-04-22 03:32:46 +00:00
Peter Johnson
2f2180767d Massive warnings cleanup and cleanup of size_t vs uintptr_t vs unsigned long.
svn path=/trunk/yasm/; revision=1792
2007-02-24 20:19:27 +00:00
Peter Johnson
5b88576b82 Pyxelator generation should depend on HEADERS rather than SOURCES.
svn path=/trunk/yasm/; revision=1747
2007-01-29 03:56:37 +00:00
Peter Johnson
ee2c1b181a Clean up sed usage a tiny bit (don't use cat).
svn path=/trunk/yasm/; revision=1746
2007-01-29 03:44:23 +00:00
Peter Johnson
0c344700a7 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
2007-01-29 03:32:37 +00:00
Peter Johnson
b31c63e2e0 Make python module DESTDIR-clean to unbreak distcheck when python module is
enabled.

svn path=/trunk/yasm/; revision=1741
2007-01-26 07:39:01 +00:00
Peter Johnson
a1f4c99e94 Remove yasm_immval, moving remaining unique information (sign flag) into
yasm_value.

svn path=/trunk/yasm/; revision=1740
2007-01-21 22:01:34 +00:00
Peter Johnson
9dd8df8fb6 intnum.c: Better internal error checking on intnum creation input strings.
svn path=/trunk/yasm/; revision=1739
2007-01-20 19:37:02 +00:00
Peter Johnson
83b44f17d1 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
2006-12-30 05:44:20 +00:00
Peter Johnson
36a4a6c3a3 Port re2c parser from YACC to recursive descent.
svn path=/trunk/yasm/; revision=1718
2006-12-24 00:13:19 +00:00
Peter Johnson
08310a5886 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
2006-12-12 07:16:45 +00:00
Peter Johnson
c7b267f9fa Bring Pyxelator-r428 into trunk.
svn path=/trunk/yasm/; revision=1710
2006-12-12 07:11:48 +00:00
Peter Johnson
9ab89fdfe6 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
2006-12-10 07:05:06 +00:00
Peter Johnson
6a6c9faa20 expr.pxi: Sync with [1702].
svn path=/trunk/yasm/; revision=1703
2006-11-27 03:38:36 +00:00
Peter Johnson
52055a435d Clean up a few minor nits (warnings).
svn path=/trunk/yasm/; revision=1690
2006-11-19 01:04:29 +00:00
Peter Johnson
827930b5a4 Have incbin search include paths (long-missing feature).
svn path=/trunk/yasm/; revision=1673
2006-10-28 22:06:01 +00:00