yasm/frontends
Peter Johnson b3d84a8148 Implement some linemap changes required for the GAS preprocessor.
Contributed by: Alexei Svitkine <alexei.svitkine@gmail.com>

- yasm_linemap_set() now takes virtual_line as a parameter, instead of
always using linemap->current. If 0 is passed for the virtual_line,
then linemap->current is used, as before.

This is because linemap->current was only incremented by the parser
(and never decremented), so the preprocessor was not able to set
mappings during the preprocessing phase (whereas with these changes,
it now does).

Additionally, setting a mapping for a line number will now delete any
existing mappings for line numbers equal or greater to that line
number. This allows the code to correctly handle the case when the
preprocessor first sets mappings from pre-pp lines to post-pp lines,
and later those mappings getting superseded by .line directives in the
original source.

This change also required making a change to yasm_linemap_lookup() to
set *file_line to 0 when line is 0 (i.e. preventing line 0 - which
means "don't display line number in output" - from getting mapped).

svn path=/trunk/yasm/; revision=2259
2010-01-03 01:58:23 +00:00
..
tasm Implement some linemap changes required for the GAS preprocessor. 2010-01-03 01:58:23 +00:00
yasm Implement some linemap changes required for the GAS preprocessor. 2010-01-03 01:58:23 +00:00
CMakeLists.txt Add core TASM syntax support. 2008-10-07 05:38:11 +00:00
Makefile.inc Add core TASM syntax support. 2008-10-07 05:38:11 +00:00