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
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
instead of re2c-generated code. This gives identifier recognition a
significant speedup and also drastically shortens compilation time of yasm
itself. This rewrite encouraged combining instruction and prefix
recognition into one function and register and target modifier
recognition into a second function (rather than having 5 or so separate
functions).
Also created a state in the NASM parser (as was done in the GAS parser),
so instructions/prefixes are only looked for until an instruction is
recognized. This avoids search time in the instructions hash for operands.
The tool used to generate the new identifier recognition is called GAP.
Someday we might extend this to generate more code than just the perfect
hash lookup.
* tools/gap: New tool to Generate Architecture Parser (aka perfect hashes).
* phash.c, phash.h: Helper functions used by GAP-generated code.
* x86id.re: Delete. Split into..
* x86parse.gap: Contains all identifier recognition portions.
* x86id.c: Contains instruction operand tables and code and higher-level
entry points into x86parse.gap perfect hash recognizers. Chose to flow
history of x86id.re into this file.
* arch.h: Combine instruction/prefix entry points and register/target
modifier entry points.
* lc3barch.c, lc3bid.re, lc3barch.h: Update to match.
* x86arch.c, x86arch.h: Update to match.
* Makefile.am, various Makefile.inc: Update.
* POTFILES.in: Update due to numerous file changes (not just this commit).
* Mkfiles: Update. VC build files untested at the moment.
svn path=/trunk/yasm/; revision=1395