You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(208) |
Jun
(43) |
Jul
|
Aug
(2) |
Sep
(17) |
Oct
|
Nov
(4) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
(11) |
Mar
(3) |
Apr
(2) |
May
|
Jun
(3) |
Jul
(29) |
Aug
(29) |
Sep
(48) |
Oct
|
Nov
|
Dec
(5) |
2004 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2005 |
Jan
(12) |
Feb
(1) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(4) |
Oct
(3) |
Nov
(1) |
Dec
(2) |
2006 |
Jan
(1) |
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(21) |
Nov
(25) |
Dec
(16) |
2007 |
Jan
(26) |
Feb
(26) |
Mar
(18) |
Apr
(51) |
May
(45) |
Jun
(26) |
Jul
(6) |
Aug
(85) |
Sep
(161) |
Oct
(111) |
Nov
(83) |
Dec
(18) |
2008 |
Jan
(31) |
Feb
(27) |
Mar
|
Apr
(16) |
May
(142) |
Jun
(136) |
Jul
(51) |
Aug
(21) |
Sep
(47) |
Oct
(428) |
Nov
(19) |
Dec
(6) |
2009 |
Jan
(11) |
Feb
(37) |
Mar
(17) |
Apr
(15) |
May
(13) |
Jun
(61) |
Jul
(127) |
Aug
(15) |
Sep
(22) |
Oct
(28) |
Nov
(37) |
Dec
(10) |
2010 |
Jan
(18) |
Feb
(22) |
Mar
(10) |
Apr
(41) |
May
|
Jun
(48) |
Jul
(61) |
Aug
(54) |
Sep
(34) |
Oct
(15) |
Nov
(49) |
Dec
(11) |
2011 |
Jan
|
Feb
(24) |
Mar
(10) |
Apr
(9) |
May
|
Jun
(33) |
Jul
(41) |
Aug
(20) |
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(86) |
Mar
(12) |
Apr
|
May
(10) |
Jun
|
Jul
(9) |
Aug
(4) |
Sep
(11) |
Oct
(3) |
Nov
(3) |
Dec
(10) |
2013 |
Jan
(1) |
Feb
(23) |
Mar
(15) |
Apr
(7) |
May
(20) |
Jun
(3) |
Jul
(15) |
Aug
|
Sep
(29) |
Oct
(16) |
Nov
(69) |
Dec
(18) |
2014 |
Jan
|
Feb
(8) |
Mar
|
Apr
|
May
(16) |
Jun
(7) |
Jul
|
Aug
(5) |
Sep
(2) |
Oct
(4) |
Nov
(25) |
Dec
(8) |
2015 |
Jan
(6) |
Feb
(6) |
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
|
Sep
(2) |
Oct
(1) |
Nov
(6) |
Dec
|
2016 |
Jan
(12) |
Feb
(97) |
Mar
(57) |
Apr
(52) |
May
(33) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
(3) |
Nov
(3) |
Dec
|
2017 |
Jan
(4) |
Feb
|
Mar
(23) |
Apr
(5) |
May
|
Jun
(2) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
(6) |
Nov
(3) |
Dec
(3) |
2018 |
Jan
(4) |
Feb
(11) |
Mar
|
Apr
(1) |
May
(3) |
Jun
(6) |
Jul
|
Aug
(5) |
Sep
(5) |
Oct
(36) |
Nov
(128) |
Dec
(18) |
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(24) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 07:24:18
|
Commit-ID: 8da30d0266d97020f297789e68c184c90dd9ba4d Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=8da30d0266d97020f297789e68c184c90dd9ba4d Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 23:23:19 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 23:23:19 -0800 Makefiles: run "make alldeps" Automatic update of dependencies. Signed-off-by: H. Peter Anvin <hp...@zy...> --- Makefile.in | 4 ++-- Mkfiles/msvc.mak | 4 ++-- Mkfiles/netware.mak | 6 +++--- Mkfiles/openwcom.mak | 4 ++-- Mkfiles/owlinux.mak | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile.in b/Makefile.in index f0126fd..4a5b3b0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -356,7 +356,7 @@ listing.$(O): listing.c compiler.h config.h directiv.h insnsi.h listing.h \ macros.$(O): macros.c compiler.h config.h directiv.h hashtbl.h insnsi.h \ nasm.h nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h \ tables.h -md5c.$(O): md5c.c md5.h +md5c.$(O): md5c.c compiler.h config.h md5.h nasm.$(O): nasm.c assemble.h compiler.h config.h directiv.h eval.h float.h \ iflag.h iflaggen.h insns.h insnsi.h labels.h listing.h nasm.h nasmlib.h \ opflags.h output/outform.h parser.h pptok.h preproc.h raa.h regs.h saa.h \ @@ -417,7 +417,7 @@ output/outlib.$(O): output/outlib.c compiler.h config.h directiv.h insnsi.h \ tables.h output/outmacho.$(O): output/outmacho.c compiler.h config.h directiv.h \ insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ - pptok.h preproc.h raa.h regs.h saa.h tables.h + pptok.h preproc.h raa.h rbtree.h regs.h saa.h tables.h output/outobj.$(O): output/outobj.c compiler.h config.h directiv.h eval.h \ insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h \ pptok.h preproc.h regs.h stdscan.h tables.h diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak index a208285..a277571 100644 --- a/Mkfiles/msvc.mak +++ b/Mkfiles/msvc.mak @@ -265,7 +265,7 @@ listing.$(O): listing.c compiler.h directiv.h insnsi.h listing.h nasm.h \ nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h macros.$(O): macros.c compiler.h directiv.h hashtbl.h insnsi.h nasm.h \ nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h tables.h -md5c.$(O): md5c.c md5.h +md5c.$(O): md5c.c compiler.h md5.h nasm.$(O): nasm.c assemble.h compiler.h directiv.h eval.h float.h iflag.h \ iflaggen.h insns.h insnsi.h labels.h listing.h nasm.h nasmlib.h opflags.h \ output/outform.h parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h \ @@ -321,7 +321,7 @@ output/outlib.$(O): output/outlib.c compiler.h directiv.h insnsi.h nasm.h \ nasmlib.h opflags.h output/outlib.h pptok.h preproc.h regs.h tables.h output/outmacho.$(O): output/outmacho.c compiler.h directiv.h insnsi.h \ nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ - preproc.h raa.h regs.h saa.h tables.h + preproc.h raa.h rbtree.h regs.h saa.h tables.h output/outobj.$(O): output/outobj.c compiler.h directiv.h eval.h insnsi.h \ nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ preproc.h regs.h stdscan.h tables.h diff --git a/Mkfiles/netware.mak b/Mkfiles/netware.mak index 017f161..c3c8bf6 100644 --- a/Mkfiles/netware.mak +++ b/Mkfiles/netware.mak @@ -173,7 +173,7 @@ listing.o: listing.c compiler.h config.h directiv.h insnsi.h listing.h \ nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h macros.o: macros.c compiler.h config.h directiv.h hashtbl.h insnsi.h nasm.h \ nasmlib.h opflags.h outform.h pptok.h preproc.h regs.h tables.h -md5c.o: md5c.c md5.h +md5c.o: md5c.c compiler.h config.h md5.h nasm.o: nasm.c assemble.h compiler.h config.h directiv.h eval.h float.h \ iflag.h iflaggen.h insns.h insnsi.h labels.h listing.h nasm.h nasmlib.h \ opflags.h outform.h parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h \ @@ -224,8 +224,8 @@ outieee.o: outieee.c compiler.h config.h directiv.h insnsi.h nasm.h \ outlib.o: outlib.c compiler.h config.h directiv.h insnsi.h nasm.h nasmlib.h \ opflags.h outlib.h pptok.h preproc.h regs.h tables.h outmacho.o: outmacho.c compiler.h config.h directiv.h insnsi.h nasm.h \ - nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h raa.h regs.h saa.h \ - tables.h + nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h raa.h rbtree.h \ + regs.h saa.h tables.h outobj.o: outobj.c compiler.h config.h directiv.h eval.h insnsi.h nasm.h \ nasmlib.h opflags.h outform.h outlib.h pptok.h preproc.h regs.h stdscan.h \ tables.h diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak index 2449ae4..7fb9ba5 100644 --- a/Mkfiles/openwcom.mak +++ b/Mkfiles/openwcom.mak @@ -311,7 +311,7 @@ listing.$(O): listing.c compiler.h config.h directiv.h insnsi.h listing.h & macros.$(O): macros.c compiler.h config.h directiv.h hashtbl.h insnsi.h & nasm.h nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h & tables.h -md5c.$(O): md5c.c md5.h +md5c.$(O): md5c.c compiler.h config.h md5.h nasm.$(O): nasm.c assemble.h compiler.h config.h directiv.h eval.h float.h & iflag.h iflaggen.h insns.h insnsi.h labels.h listing.h nasm.h nasmlib.h & opflags.h output/outform.h parser.h pptok.h preproc.h raa.h regs.h saa.h & @@ -372,7 +372,7 @@ output/outlib.$(O): output/outlib.c compiler.h config.h directiv.h insnsi.h & tables.h output/outmacho.$(O): output/outmacho.c compiler.h config.h directiv.h & insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h & - pptok.h preproc.h raa.h regs.h saa.h tables.h + pptok.h preproc.h raa.h rbtree.h regs.h saa.h tables.h output/outobj.$(O): output/outobj.c compiler.h config.h directiv.h eval.h & insnsi.h nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h & pptok.h preproc.h regs.h stdscan.h tables.h diff --git a/Mkfiles/owlinux.mak b/Mkfiles/owlinux.mak index c366634..b6ddad9 100644 --- a/Mkfiles/owlinux.mak +++ b/Mkfiles/owlinux.mak @@ -279,7 +279,7 @@ listing.$(O): listing.c compiler.h directiv.h insnsi.h listing.h nasm.h \ nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h macros.$(O): macros.c compiler.h directiv.h hashtbl.h insnsi.h nasm.h \ nasmlib.h opflags.h output/outform.h pptok.h preproc.h regs.h tables.h -md5c.$(O): md5c.c md5.h +md5c.$(O): md5c.c compiler.h md5.h nasm.$(O): nasm.c assemble.h compiler.h directiv.h eval.h float.h iflag.h \ iflaggen.h insns.h insnsi.h labels.h listing.h nasm.h nasmlib.h opflags.h \ output/outform.h parser.h pptok.h preproc.h raa.h regs.h saa.h stdscan.h \ @@ -335,7 +335,7 @@ output/outlib.$(O): output/outlib.c compiler.h directiv.h insnsi.h nasm.h \ nasmlib.h opflags.h output/outlib.h pptok.h preproc.h regs.h tables.h output/outmacho.$(O): output/outmacho.c compiler.h directiv.h insnsi.h \ nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ - preproc.h raa.h regs.h saa.h tables.h + preproc.h raa.h rbtree.h regs.h saa.h tables.h output/outobj.$(O): output/outobj.c compiler.h directiv.h eval.h insnsi.h \ nasm.h nasmlib.h opflags.h output/outform.h output/outlib.h pptok.h \ preproc.h regs.h stdscan.h tables.h |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 07:21:19
|
Commit-ID: 477ae4419cb9ae9f20a2201e60ec4073a9922359 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=477ae4419cb9ae9f20a2201e60ec4073a9922359 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 22:53:06 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:55:43 -0800 ofmt: get rid of the debuginfo parameter to ofmt->cleanup() Get rid of the completely pointless "debuginfo" parameter to ofmt->cleanup(). Most backends completely ignore it, and the two that care (obj, ieee) can simply test dfmt instead. Also, dfmt is never NULL, so any test for a NULL dfmt is bogus. Signed-off-by: H. Peter Anvin <hp...@zy...> --- nasm.c | 2 +- nasm.h | 2 +- output/outaout.c | 4 +--- output/outas86.c | 4 +--- output/outbin.c | 4 +--- output/outcoff.c | 5 ++--- output/outdbg.c | 3 +-- output/outelf32.c | 18 ++++++------------ output/outelf64.c | 20 +++++++------------- output/outelfx32.c | 20 +++++++------------- output/outieee.c | 10 ++++++---- output/outmacho.c | 4 +--- output/outobj.c | 11 +++++++---- output/outrdf2.c | 4 +--- 14 files changed, 43 insertions(+), 68 deletions(-) diff --git a/nasm.c b/nasm.c index 3c4a1b1..7a699ef 100644 --- a/nasm.c +++ b/nasm.c @@ -466,7 +466,7 @@ int main(int argc, char **argv) assemble_file(inname, depend_ptr); if (!terminate_after_phase) { - ofmt->cleanup(using_debug_info); + ofmt->cleanup(); cleanup_labels(); fflush(ofile); if (ferror(ofile)) diff --git a/nasm.h b/nasm.h index 16d4ae8..9393e51 100644 --- a/nasm.h +++ b/nasm.h @@ -839,7 +839,7 @@ struct ofmt { * One thing the cleanup routine should always do is to close * the output file pointer. */ - void (*cleanup)(int debuginfo); + void (*cleanup)(void); }; /* diff --git a/output/outaout.c b/output/outaout.c index 6604551..b353600 100644 --- a/output/outaout.c +++ b/output/outaout.c @@ -211,12 +211,10 @@ static void aoutb_init(void) #endif -static void aout_cleanup(int debuginfo) +static void aout_cleanup(void) { struct Reloc *r; - (void)debuginfo; - aout_pad_sections(); aout_fixup_relocs(&stext); aout_fixup_relocs(&sdata); diff --git a/output/outas86.c b/output/outas86.c index 84e3035..b69c1d3 100644 --- a/output/outas86.c +++ b/output/outas86.c @@ -138,12 +138,10 @@ static void as86_init(void) as86_add_string(as86_module); } -static void as86_cleanup(int debuginfo) +static void as86_cleanup(void) { struct Piece *p; - (void)debuginfo; - as86_write(); saa_free(stext.data); while (stext.head) { diff --git a/output/outbin.c b/output/outbin.c index 915dc45..ae07de4 100644 --- a/output/outbin.c +++ b/output/outbin.c @@ -220,7 +220,7 @@ static struct Section *create_section(char *name) return last_section; } -static void bin_cleanup(int debuginfo) +static void bin_cleanup(void) { struct Section *g, **gp; struct Section *gs = NULL, **gsp; @@ -232,8 +232,6 @@ static void bin_cleanup(int debuginfo) uint64_t pend; int h; - (void)debuginfo; /* placate optimizers */ - #ifdef DEBUG nasm_error(ERR_DEBUG, "bin_cleanup: Sections were initially referenced in this order:\n"); diff --git a/output/outcoff.c b/output/outcoff.c index 935b654..56d7667 100644 --- a/output/outcoff.c +++ b/output/outcoff.c @@ -223,13 +223,12 @@ static void coff_gen_init(void) def_seg = seg_alloc(); } -static void coff_cleanup(int debuginfo) +static void coff_cleanup(void) { struct coff_Reloc *r; int i; - if (debuginfo && dfmt->cleanup) - dfmt->cleanup(); + dfmt->cleanup(); coff_write(); for (i = 0; i < coff_nsects; i++) { diff --git a/output/outdbg.c b/output/outdbg.c index 83860ab..c68d199 100644 --- a/output/outdbg.c +++ b/output/outdbg.c @@ -63,9 +63,8 @@ static void dbg_init(void) fprintf(ofile, "NASM Output format debug dump\n"); } -static void dbg_cleanup(int debuginfo) +static void dbg_cleanup(void) { - (void)debuginfo; dfmt->cleanup(); while (dbgsect) { struct Section *tmp = dbgsect; diff --git a/output/outelf32.c b/output/outelf32.c index 3ab8590..b1596c9 100644 --- a/output/outelf32.c +++ b/output/outelf32.c @@ -217,13 +217,11 @@ static void elf_init(void) def_seg = seg_alloc(); } -static void elf_cleanup(int debuginfo) +static void elf_cleanup(void) { struct elf_reloc *r; int i; - (void)debuginfo; - elf_write(); for (i = 0; i < nsects; i++) { if (sects[i]->type != SHT_NOBITS) @@ -240,9 +238,7 @@ static void elf_cleanup(int debuginfo) saa_free(syms); raa_free(bsym); saa_free(strs); - if (dfmt) { - dfmt->cleanup(); - } + dfmt->cleanup(); } static void add_sectname(char *firsthalf, char *secondhalf) @@ -691,12 +687,10 @@ static void elf_out(int32_t segto, const void *data, } /* again some stabs debugging stuff */ - if (dfmt) { - sinfo.offset = s->len; - sinfo.section = i; - sinfo.name = s->name; - dfmt->debug_output(TY_STABSSYMLIN, &sinfo); - } + sinfo.offset = s->len; + sinfo.section = i; + sinfo.name = s->name; + dfmt->debug_output(TY_STABSSYMLIN, &sinfo); /* end of debugging stuff */ if (s->type == SHT_NOBITS && type != OUT_RESERVE) { diff --git a/output/outelf64.c b/output/outelf64.c index b6c04d6..878c8e4 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -221,13 +221,11 @@ static void elf_init(void) } -static void elf_cleanup(int debuginfo) +static void elf_cleanup(void) { struct elf_reloc *r; int i; - (void)debuginfo; - elf_write(); for (i = 0; i < nsects; i++) { if (sects[i]->type != SHT_NOBITS) @@ -244,9 +242,7 @@ static void elf_cleanup(int debuginfo) saa_free(syms); raa_free(bsym); saa_free(strs); - if (dfmt) { - dfmt->cleanup(); - } + dfmt->cleanup(); } /* add entry to the elf .shstrtab section */ @@ -707,13 +703,11 @@ static void elf_out(int32_t segto, const void *data, } /* again some stabs debugging stuff */ - if (dfmt) { - sinfo.offset = s->len; - sinfo.section = i; - sinfo.segto = segto; - sinfo.name = s->name; - dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); - } + sinfo.offset = s->len; + sinfo.section = i; + sinfo.segto = segto; + sinfo.name = s->name; + dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); /* end of debugging stuff */ if (s->type == SHT_NOBITS && type != OUT_RESERVE) { diff --git a/output/outelfx32.c b/output/outelfx32.c index 42ab3aa..5af5cfb 100644 --- a/output/outelfx32.c +++ b/output/outelfx32.c @@ -220,13 +220,11 @@ static void elf_init(void) } -static void elf_cleanup(int debuginfo) +static void elf_cleanup(void) { struct elf_reloc *r; int i; - (void)debuginfo; - elf_write(); for (i = 0; i < nsects; i++) { if (sects[i]->type != SHT_NOBITS) @@ -243,9 +241,7 @@ static void elf_cleanup(int debuginfo) saa_free(syms); raa_free(bsym); saa_free(strs); - if (dfmt) { - dfmt->cleanup(); - } + dfmt->cleanup(); } /* add entry to the elf .shstrtab section */ @@ -706,13 +702,11 @@ static void elf_out(int32_t segto, const void *data, } /* again some stabs debugging stuff */ - if (dfmt) { - sinfo.offset = s->len; - sinfo.section = i; - sinfo.segto = segto; - sinfo.name = s->name; - dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); - } + sinfo.offset = s->len; + sinfo.section = i; + sinfo.segto = segto; + sinfo.name = s->name; + dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); /* end of debugging stuff */ if (s->type == SHT_NOBITS && type != OUT_RESERVE) { diff --git a/output/outieee.c b/output/outieee.c index f5f6f5a..eb4bcf4 100644 --- a/output/outieee.c +++ b/output/outieee.c @@ -185,13 +185,14 @@ static int32_t ieee_entry_seg, ieee_entry_ofs; static int checksum; extern struct ofmt of_ieee; +static struct dfmt ladsoft_debug_form; static void ieee_data_new(struct ieeeSection *); static void ieee_write_fixup(int32_t, int32_t, struct ieeeSection *, int, uint64_t, int32_t); static void ieee_install_fixup(struct ieeeSection *, struct ieeeFixupp *); static int32_t ieee_segment(char *, int, int *); -static void ieee_write_file(int debuginfo); +static void ieee_write_file(void); static void ieee_write_byte(struct ieeeSection *, int); static void ieee_write_word(struct ieeeSection *, int); static void ieee_write_dword(struct ieeeSection *, int32_t); @@ -232,9 +233,9 @@ static int ieee_set_info(enum geninfo type, char **val) /* * Rundown */ -static void ieee_cleanup(int debuginfo) +static void ieee_cleanup(void) { - ieee_write_file(debuginfo); + ieee_write_file(); dfmt->cleanup(); while (seghead) { struct ieeeSection *segtmp = seghead; @@ -899,7 +900,7 @@ static void ieee_filename(char *inname, char *outname) standard_extension(inname, outname, ".o"); } -static void ieee_write_file(int debuginfo) +static void ieee_write_file(void) { struct tm *thetime; time_t reltime; @@ -911,6 +912,7 @@ static void ieee_write_file(int debuginfo) struct ieeeFixupp *fix; struct Array *arr; int i; + const bool debuginfo = (dfmt == &ladsoft_debug_form); /* * Write the module header diff --git a/output/outmacho.c b/output/outmacho.c index b67561c..26a62ea 100644 --- a/output/outmacho.c +++ b/output/outmacho.c @@ -1543,14 +1543,12 @@ static void macho_write (void) for the object file, writing, and then freeing all of the data from the file. */ -static void macho_cleanup(int debuginfo) +static void macho_cleanup(void) { struct section *s; struct reloc *r; struct symbol *sym; - (void)debuginfo; - /* Sort all symbols. */ macho_layout_symbols (&nsyms, &strslen); diff --git a/output/outobj.c b/output/outobj.c index fd6c326..c82b5c2 100644 --- a/output/outobj.c +++ b/output/outobj.c @@ -625,12 +625,13 @@ static struct ExpDef { static int32_t obj_entry_seg, obj_entry_ofs; struct ofmt of_obj; +static struct dfmt borland_debug_form; /* The current segment */ static struct Segment *current_seg; static int32_t obj_segment(char *, int, int *); -static void obj_write_file(int debuginfo); +static void obj_write_file(void); static int obj_directive(enum directives, char *, int); static void obj_init(void) @@ -667,9 +668,10 @@ static int obj_set_info(enum geninfo type, char **val) return 0; } -static void obj_cleanup(int debuginfo) + +static void obj_cleanup(void) { - obj_write_file(debuginfo); + obj_write_file(); dfmt->cleanup(); while (seghead) { struct Segment *segtmp = seghead; @@ -1916,7 +1918,7 @@ static void obj_filename(char *inname, char *outname) standard_extension(inname, outname, ".obj"); } -static void obj_write_file(int debuginfo) +static void obj_write_file(void) { struct Segment *seg, *entry_seg_ptr = 0; struct FileName *fn; @@ -1928,6 +1930,7 @@ static void obj_write_file(int debuginfo) struct ExpDef *export; int lname_idx; ObjRecord *orp; + const bool debuginfo = (dfmt == &borland_debug_form); /* * Write the THEADR module header. diff --git a/output/outrdf2.c b/output/outrdf2.c index e6dcda9..960acb4 100644 --- a/output/outrdf2.c +++ b/output/outrdf2.c @@ -657,14 +657,12 @@ static void rdf2_out(int32_t segto, const void *data, } } -static void rdf2_cleanup(int debuginfo) +static void rdf2_cleanup(void) { int32_t l; struct BSSRec bs; int i; - (void)debuginfo; - /* should write imported & exported symbol declarations to header here */ /* generate the output file... */ |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 07:21:18
|
Commit-ID: 283b3fb15a91854dcf2f020dcc4fba586d9e0014 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=283b3fb15a91854dcf2f020dcc4fba586d9e0014 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 23:18:30 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 23:20:00 -0800 Defer debug format search until after command line parsing Avoid funnies with ordering of debug format selection by deferring debug format search until after command line processing. Also permit the -gformat syntax used by many C compilers. Signed-off-by: H. Peter Anvin <hp...@zy...> --- nasm.c | 36 ++++++++++++++++++++++-------------- nasm.txt | 5 ++++- output/outform.c | 2 +- output/outform.h | 2 +- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/nasm.c b/nasm.c index 7a699ef..fc26bba 100644 --- a/nasm.c +++ b/nasm.c @@ -85,7 +85,9 @@ static void nasm_verror_vc(int severity, const char *fmt, va_list args); static void nasm_verror_common(int severity, const char *fmt, va_list args); static void usage(void); -static int using_debug_info, opt_verbose_info; +static bool using_debug_info, opt_verbose_info; +static const char *debug_format; + bool tasm_compatible_mode = false; int pass0, passn; int globalrel = 0; @@ -356,11 +358,21 @@ int main(int argc, char **argv) return 1; } - /* If debugging info is disabled, suppress any debug calls */ - if (!using_debug_info) + if (!using_debug_info) { + /* No debug info, redirect to the null backend (empty stubs) */ dfmt = &null_debug_form; - else if (!dfmt) + } else if (!debug_format) { + /* Default debug format for this backend */ dfmt = ofmt->default_dfmt; + } else { + dfmt = dfmt_find(ofmt, debug_format); + if (!dfmt) { + nasm_fatal(ERR_NOFILE | ERR_USAGE, + "unrecognized debug format `%s' for" + " output format `%s'", + debug_format, ofmt->shortname); + } + } if (ofmt->stdmac) preproc->extra_stdmac(ofmt->stdmac); @@ -666,7 +678,6 @@ static bool process_arg(char *p, char *q) "unrecognised output format `%s' - " "use -hf for a list", param); } - dfmt = NULL; break; case 'O': /* Optimization level */ @@ -744,14 +755,8 @@ static bool process_arg(char *p, char *q) break; case 'F': /* specify debug format */ - dfmt = dfmt_find(ofmt, param); - if (!dfmt) { - nasm_fatal(ERR_NOFILE | ERR_USAGE, - "unrecognized debug format `%s' for" - " output format `%s'", - param, ofmt->shortname); - } using_debug_info = true; + debug_format = param; break; case 'X': /* specify error reporting format */ @@ -767,6 +772,8 @@ static bool process_arg(char *p, char *q) case 'g': using_debug_info = true; + if (p[2]) + debug_format = nasm_skip_spaces(p + 2); break; case 'h': @@ -775,8 +782,7 @@ static bool process_arg(char *p, char *q) "[-l listfile]\n" " [options...] [--] filename\n" " or nasm -v (or --v) for version info\n\n" - " -t assemble in SciTech TASM compatible mode\n" - " -g generate debug information in selected format\n"); + " -t assemble in SciTech TASM compatible mode\n"); printf (" -E (or -e) preprocess only (writes output to stdout by default)\n" " -a don't preprocess (assemble only)\n" @@ -789,7 +795,9 @@ static bool process_arg(char *p, char *q) " -MP emit phony target\n\n" " -Z<file> redirect error messages to file\n" " -s redirect error messages to stdout\n\n" + " -g generate debugging information\n\n" " -F format select a debugging format\n\n" + " -gformat same as -g -F format\n\n" " -o outfile write output to an outfile\n\n" " -f format select an output format\n\n" " -l listfile write listing to a listfile\n\n" diff --git a/nasm.txt b/nasm.txt index 55f9a05..a28202f 100644 --- a/nasm.txt +++ b/nasm.txt @@ -47,7 +47,10 @@ OPTIONS formats, use the *-y* option (for example *-felf -y*). *-g*:: - Causes *nasm* to generate debug information in selected format. + Causes *nasm* to generate debug information. + +*-g*'format':: + Equivalent to **-g -F**__ format__. *-h*:: Causes *nasm* to exit immediately, after giving a summary of its diff --git a/output/outform.c b/output/outform.c index 3d70e2a..17744bb 100644 --- a/output/outform.c +++ b/output/outform.c @@ -72,7 +72,7 @@ struct ofmt *ofmt_find(char *name, struct ofmt_alias **ofmt_alias) return NULL; } -struct dfmt *dfmt_find(struct ofmt *ofmt, char *name) +struct dfmt *dfmt_find(struct ofmt *ofmt, const char *name) { struct dfmt **dfp, *df; diff --git a/output/outform.h b/output/outform.h index f52a112..e34ef75 100644 --- a/output/outform.h +++ b/output/outform.h @@ -371,7 +371,7 @@ static struct ofmt_alias ofmt_aliases[] = { #endif /* BUILD_DRIVERS_ARRAY */ struct ofmt *ofmt_find(char *name, struct ofmt_alias **ofmt_alias); -struct dfmt *dfmt_find(struct ofmt *, char *); +struct dfmt *dfmt_find(struct ofmt *, const char *); void ofmt_list(struct ofmt *, FILE *); void dfmt_list(struct ofmt *ofmt, FILE * fp); extern struct dfmt null_debug_form; |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 06:21:16
|
Commit-ID: 3ab8c5f9c68278fd5a6f75e65dea0a4ba1e850aa Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=3ab8c5f9c68278fd5a6f75e65dea0a4ba1e850aa Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 22:18:29 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:18:29 -0800 NASM 2.12.01rc2 --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index e55755c..53b5e78 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.12.01rc1 +2.12.01rc2 |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 06:21:15
|
Commit-ID: 2a74d84d1cf612ab640c62eb1bcd957df1edb716 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=2a74d84d1cf612ab640c62eb1bcd957df1edb716 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 22:17:10 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:17:10 -0800 doc: document fix to the codeview output format Document the label fix; although a global error, it was user-visible in the Codeview backend so document it as such. Signed-off-by: H. Peter Anvin <hp...@zy...> Cc: Jim Kukunas <jam...@li...> --- doc/changes.src | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/changes.src b/doc/changes.src index 62ece40..26c43b3 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -14,6 +14,9 @@ since 2007. \b Fix error when not specifying a list file. +\b Correct the handling of macro-local labels in the Codeview + debugging format. + \b Add \c{CLZERO}, \c{MONITORX} and \c{MWAITX} instructions. |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 06:15:18
|
Commit-ID: c941a35e5895a5207fb18b07b60a004a217796b6 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=c941a35e5895a5207fb18b07b60a004a217796b6 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 22:12:19 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:12:19 -0800 outelf*: remove null debug functions Instead of duplicating empty functions, use the corresponding null_debug_* functions. Signed-off-by: H. Peter Anvin <hp...@zy...> --- output/outelf32.c | 28 +++++----------------------- output/outelf64.c | 28 +++++----------------------- output/outelfx32.c | 28 +++++----------------------- 3 files changed, 15 insertions(+), 69 deletions(-) diff --git a/output/outelf32.c b/output/outelf32.c index f86106d..3ab8590 100644 --- a/output/outelf32.c +++ b/output/outelf32.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2013 The NASM Authors - All Rights Reserved + * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -159,8 +159,6 @@ static struct elf_symbol *lastsym; /* common debugging routines */ static void debug32_typevalue(int32_t); -static void debug32_deflabel(char *, int32_t, int64_t, int, char *); -static void debug32_directive(const char *, const char *); /* stabs debugging routines */ static void stabs32_linenum(const char *filename, int32_t linenumber, int32_t); @@ -1341,8 +1339,8 @@ static struct dfmt df_dwarf = { "dwarf", dwarf32_init, dwarf32_linenum, - debug32_deflabel, - debug32_directive, + null_debug_deflabel, + null_debug_directive, debug32_typevalue, dwarf32_output, dwarf32_cleanup @@ -1352,8 +1350,8 @@ static struct dfmt df_stabs = { "stabs", null_debug_init, stabs32_linenum, - debug32_deflabel, - debug32_directive, + null_debug_deflabel, + null_debug_directive, debug32_typevalue, stabs32_output, stabs32_cleanup @@ -1409,22 +1407,6 @@ static void stabs32_linenum(const char *filename, int32_t linenumber, currentline = linenumber; } -static void debug32_deflabel(char *name, int32_t segment, int64_t offset, int is_global, - char *special) -{ - (void)name; - (void)segment; - (void)offset; - (void)is_global; - (void)special; -} - -static void debug32_directive(const char *directive, const char *params) -{ - (void)directive; - (void)params; -} - static void debug32_typevalue(int32_t type) { int32_t stype, ssize; diff --git a/output/outelf64.c b/output/outelf64.c index 3aee02c..b6c04d6 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2013 The NASM Authors - All Rights Reserved + * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -161,8 +161,6 @@ static struct elf_symbol *lastsym; /* common debugging routines */ static void debug64_typevalue(int32_t); -static void debug64_deflabel(char *, int32_t, int64_t, int, char *); -static void debug64_directive(const char *, const char *); /* stabs debugging routines */ static void stabs64_linenum(const char *filename, int32_t linenumber, int32_t); @@ -1431,8 +1429,8 @@ static struct dfmt df_dwarf = { "dwarf", dwarf64_init, dwarf64_linenum, - debug64_deflabel, - debug64_directive, + null_debug_deflabel, + null_debug_directive, debug64_typevalue, dwarf64_output, dwarf64_cleanup @@ -1442,8 +1440,8 @@ static struct dfmt df_stabs = { "stabs", null_debug_init, stabs64_linenum, - debug64_deflabel, - debug64_directive, + null_debug_deflabel, + null_debug_directive, debug64_typevalue, stabs64_output, stabs64_cleanup @@ -1472,22 +1470,6 @@ struct ofmt of_elf64 = { }; /* common debugging routines */ -static void debug64_deflabel(char *name, int32_t segment, int64_t offset, - int is_global, char *special) -{ - (void)name; - (void)segment; - (void)offset; - (void)is_global; - (void)special; -} - -static void debug64_directive(const char *directive, const char *params) -{ - (void)directive; - (void)params; -} - static void debug64_typevalue(int32_t type) { int32_t stype, ssize; diff --git a/output/outelfx32.c b/output/outelfx32.c index 170c117..42ab3aa 100644 --- a/output/outelfx32.c +++ b/output/outelfx32.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2013 The NASM Authors - All Rights Reserved + * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -160,8 +160,6 @@ static struct elf_symbol *lastsym; /* common debugging routines */ static void debugx32_typevalue(int32_t); -static void debugx32_deflabel(char *, int32_t, int64_t, int, char *); -static void debugx32_directive(const char *, const char *); /* stabs debugging routines */ static void stabsx32_linenum(const char *filename, int32_t linenumber, int32_t); @@ -1390,8 +1388,8 @@ static struct dfmt df_dwarf = { "dwarf", dwarfx32_init, dwarfx32_linenum, - debugx32_deflabel, - debugx32_directive, + null_debug_deflabel, + null_debug_directive, debugx32_typevalue, dwarfx32_output, dwarfx32_cleanup @@ -1401,8 +1399,8 @@ static struct dfmt df_stabs = { "stabs", null_debug_init, stabsx32_linenum, - debugx32_deflabel, - debugx32_directive, + null_debug_deflabel, + null_debug_directive, debugx32_typevalue, stabsx32_output, stabsx32_cleanup @@ -1431,22 +1429,6 @@ struct ofmt of_elfx32 = { }; /* common debugging routines */ -static void debugx32_deflabel(char *name, int32_t segment, int64_t offset, - int is_global, char *special) -{ - (void)name; - (void)segment; - (void)offset; - (void)is_global; - (void)special; -} - -static void debugx32_directive(const char *directive, const char *params) -{ - (void)directive; - (void)params; -} - static void debugx32_typevalue(int32_t type) { int32_t stype, ssize; |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 06:09:18
|
Commit-ID: fc0ff223b203c5e90cdf59707edb5ad965bc4b18 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=fc0ff223b203c5e90cdf59707edb5ad965bc4b18 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 21:46:04 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:00:01 -0800 labels: emit the same label name to the output and debug backends!! When a local label was seen, the debug backend would not receive the full label name! In order to both simplify the code and avoid this kind of discrepancy again, make both the output and debug format calls from a common static function. However, none of the current debug format backends want to see NASM special symbols (that start with .. but not ..@) so filter those from the debug backend. Finally, fix an incorrect comment in nasm.h: the debug format is called *after* the output format. Signed-off-by: H. Peter Anvin <hp...@zy...> Cc: Jim Kukunas <jam...@li...> --- labels.c | 52 +++++++++++++++++++++++++++++----------------------- nasm.h | 2 +- test/cv8struc.asm | 6 ++++++ 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/labels.c b/labels.c index 94c2ae6..d7cdb8c 100644 --- a/labels.c +++ b/labels.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2014 The NASM Authors - All Rights Reserved + * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -127,6 +127,22 @@ char lprefix[PREFIX_MAX] = { 0 }; char lpostfix[PREFIX_MAX] = { 0 }; /* + * Emit a symdef to the output and the debug format backends. + */ +static void out_symdef(char *name, int32_t segment, int64_t offset, + int is_global, char *special) +{ + ofmt->symdef(name, segment, offset, is_global, special); + + /* + * NASM special symbols are not passed to the debug format; none + * of the current backends want to see them. + */ + if (!(name[0] == '.' && name[1] == '.' && name[2] != '@')) + dfmt->debug_deflabel(name, segment, offset, is_global, special); +} + +/* * Internal routine: finds the `union label' corresponding to the * given label name. Creates a new one, if it isn't found, and if * `create' is true. @@ -260,17 +276,13 @@ void redefine_label(char *label, int32_t segment, int64_t offset, char *special, snprintf(xsymbol, slen, "%s%s%s", lprefix, lptr->defn.label, lpostfix); - ofmt->symdef(xsymbol, segment, offset, exi, - special ? special : lptr->defn.special); - dfmt->debug_deflabel(xsymbol, segment, offset, exi, - special ? special : lptr->defn.special); -/** nasm_free(xsymbol); ! outobj.c stores the pointer; ouch!!! **/ + out_symdef(xsymbol, segment, offset, exi, + special ? special : lptr->defn.special); + /** nasm_free(xsymbol); ! outobj.c stores the pointer; ouch!!! **/ } else { if ((lptr->defn.is_global & (GLOBAL_BIT | EXTERN_BIT)) != EXTERN_BIT) { - ofmt->symdef(lptr->defn.label, segment, offset, exi, - special ? special : lptr->defn.special); - dfmt->debug_deflabel(label, segment, offset, exi, - special ? special : lptr->defn.special); + out_symdef(lptr->defn.label, segment, offset, exi, + special ? special : lptr->defn.special); } } } /* if (pass0 == 1) */ @@ -325,17 +337,13 @@ void define_label(char *label, int32_t segment, int64_t offset, char *special, snprintf(xsymbol, slen, "%s%s%s", lprefix, lptr->defn.label, lpostfix); - ofmt->symdef(xsymbol, segment, offset, exi, - special ? special : lptr->defn.special); - dfmt->debug_deflabel(xsymbol, segment, offset, exi, - special ? special : lptr->defn.special); -/** nasm_free(xsymbol); ! outobj.c stores the pointer; ouch!!! **/ + out_symdef(xsymbol, segment, offset, exi, + special ? special : lptr->defn.special); + /** nasm_free(xsymbol); ! outobj.c stores the pointer; ouch!!! **/ } else { if ((lptr->defn.is_global & (GLOBAL_BIT | EXTERN_BIT)) != EXTERN_BIT) { - ofmt->symdef(lptr->defn.label, segment, offset, exi, - special ? special : lptr->defn.special); - dfmt->debug_deflabel(label, segment, offset, exi, - special ? special : lptr->defn.special); + out_symdef(lptr->defn.label, segment, offset, exi, + special ? special : lptr->defn.special); } } } /* if (pass0 == 1) */ @@ -369,10 +377,8 @@ void define_common(char *label, int32_t segment, int32_t size, char *special) if (pass0 == 0) return; - ofmt->symdef(lptr->defn.label, segment, size, 2, - special ? special : lptr->defn.special); - dfmt->debug_deflabel(lptr->defn.label, segment, size, 2, - special ? special : lptr->defn.special); + out_symdef(lptr->defn.label, segment, size, 2, + special ? special : lptr->defn.special); } void declare_as_global(char *label, char *special) diff --git a/nasm.h b/nasm.h index ea715c5..16d4ae8 100644 --- a/nasm.h +++ b/nasm.h @@ -887,7 +887,7 @@ struct dfmt { /* * debug_deflabel - called whenever a label is defined. Parameters * are the same as to 'symdef()' in the output format. This function - * would be called before the output format version. + * is called after the output format version. */ void (*debug_deflabel)(char *name, int32_t segment, int64_t offset, diff --git a/test/cv8struc.asm b/test/cv8struc.asm index 83fce79..eac6d8b 100644 --- a/test/cv8struc.asm +++ b/test/cv8struc.asm @@ -6,3 +6,9 @@ a_struc: istruc A_STRUC at A_STRUC._a, dw 1 iend + + section .data +foo: + dd 0x11111111 +.bar: + dd 0x22222222 |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 06:09:17
|
Commit-ID: 3def9fcb59fde13cc61184df3eaf49cfed8f6e2c Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=3def9fcb59fde13cc61184df3eaf49cfed8f6e2c Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 22:04:54 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:04:54 -0800 outieee: no need to filter .. symbols in the debug format anymore labels.c now filter ..[^@] special symbols from the debug backend, so we don't have to open-code that everywhere. In the actual output format, don't treat ..@ symbols as special. Signed-off-by: H. Peter Anvin <hp...@zy...> Cc: Jim Kukunas <jam...@li...> --- output/outieee.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/output/outieee.c b/output/outieee.c index 79faa64..f5f6f5a 100644 --- a/output/outieee.c +++ b/output/outieee.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2013 The NASM Authors - All Rights Reserved + * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -305,7 +305,7 @@ static void ieee_deflabel(char *name, int32_t segment, * First check for the double-period, signifying something * unusual. */ - if (name[0] == '.' && name[1] == '.') { + if (name[0] == '.' && name[1] == '.' && name[2] != '@') { if (!strcmp(name, "..start")) { ieee_entry_seg = segment; ieee_entry_ofs = offset; @@ -1398,18 +1398,14 @@ static void dbgls_deflabel(char *name, int32_t segment, (void)special; /* - * If it's a special-retry from pass two, discard it. + * Note: ..[^@] special symbols are filtered in labels.c */ - if (is_global == 3) - return; /* - * First check for the double-period, signifying something - * unusual. + * If it's a special-retry from pass two, discard it. */ - if (name[0] == '.' && name[1] == '.' && name[2] != '@') { + if (is_global == 3) return; - } /* * Case (i): |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 06:09:17
|
Commit-ID: 5686a65fe93bf4946bb76fd37f9543851079bfe5 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=5686a65fe93bf4946bb76fd37f9543851079bfe5 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 22:02:17 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:03:50 -0800 outobj: no need to filter .. symbols in the debug format anymore labels.c now filter ..[^@] special symbols from the debug backend, so we don't have to open-code that everywhere. Signed-off-by: H. Peter Anvin <hp...@zy...> Cc: Jim Kukunas <jam...@li...> --- output/outobj.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/output/outobj.c b/output/outobj.c index 5773812..fd6c326 100644 --- a/output/outobj.c +++ b/output/outobj.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2014 The NASM Authors - All Rights Reserved + * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -2500,18 +2500,14 @@ static void dbgbi_deflabel(char *name, int32_t segment, (void)special; /* - * If it's a special-retry from pass two, discard it. + * Note: ..[^@] special symbols are filtered in labels.c */ - if (is_global == 3) - return; /* - * First check for the double-period, signifying something - * unusual. + * If it's a special-retry from pass two, discard it. */ - if (name[0] == '.' && name[1] == '.' && name[2] != '@') { + if (is_global == 3) return; - } /* * Case (i): |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-08 06:09:17
|
Commit-ID: bc42cbe36348aca4c33210fa8322bd451e36ef6c Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=bc42cbe36348aca4c33210fa8322bd451e36ef6c Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 21:51:57 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 22:06:16 -0800 codeview: remove hack for handling local labels Now when labels are properly concatenated in common code, there is no reason for the debugging backend to need to be aware of local symbols. We don't have to consider ..[^@] special symbols either, as they are now filtered in labels.c. Signed-off-by: H. Peter Anvin <hp...@zy...> Debugged-by: Jim Kukunas <jam...@li...> --- output/codeview.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/output/codeview.c b/output/codeview.c index b5c205c..f9750bf 100644 --- a/output/codeview.c +++ b/output/codeview.c @@ -188,8 +188,6 @@ static void cv8_linenum(const char *filename, int32_t linenumber, static void cv8_deflabel(char *name, int32_t segment, int64_t offset, int is_global, char *special) { - int ret; - size_t len; struct cv8_symbol *sym; struct coff_Section *s; @@ -214,21 +212,8 @@ static void cv8_deflabel(char *name, int32_t segment, int64_t offset, sym->size = 0; sym->typeindex = 0; - /* handle local labels */ - if (name[0] == '.' && cv8_state.last_sym != NULL) { - len = strlen(cv8_state.last_sym->name) + strlen(name); - sym->name = nasm_malloc(len + 1); - ret = snprintf(sym->name, len + 1, "%s%s", - cv8_state.last_sym->name, name); - nasm_assert(ret > 0 && (size_t)ret == len); - } else { - len = strlen(name); - sym->name = nasm_malloc(len + 1); - ret = snprintf(sym->name, len + 1, "%s", name); - nasm_assert(ret > 0 && (size_t)ret == len); - } - - cv8_state.symbol_lengths += len + 1; + sym->name = nasm_strdup(name); + cv8_state.symbol_lengths += strlen(sym->name) + 1; if (cv8_state.last_sym && cv8_state.last_sym->section == segment) cv8_state.last_sym->size = offset - cv8_state.last_sym->secrel; |
From: nasm-bot f. J. K. <jam...@li...> - 2016-03-08 00:39:17
|
Commit-ID: 63c42f08f70450f4e8f6f95603758f6e9b2d84a7 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=63c42f08f70450f4e8f6f95603758f6e9b2d84a7 Author: Jim Kukunas <jam...@li...> AuthorDate: Mon, 7 Mar 2016 18:42:39 -0500 Committer: Jim Kukunas <jam...@li...> CommitDate: Mon, 7 Mar 2016 19:36:41 -0500 codeview: Don't treat labels starting with .. as local labels For local labels, starting with '.', the label name is concatenated with the previous non-local label to produce a label that can be accessed from elsewhere. This is the name we want to generate debug info for. Labels starting with ".." are special and shouldn't be concatenated. Fix Bugzilla #3392342 Signed-off-by: Jim Kukunas <jam...@li...> --- output/codeview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/codeview.c b/output/codeview.c index 7fc5619..8492fdd 100644 --- a/output/codeview.c +++ b/output/codeview.c @@ -215,7 +215,7 @@ static void cv8_deflabel(char *name, int32_t segment, int64_t offset, sym->typeindex = 0; /* handle local labels */ - if (name[0] == '.' && cv8_state.last_sym != NULL) { + if (name[0] == '.' && name[1] != '.' && cv8_state.last_sym != NULL) { len = strlen(cv8_state.last_sym->name) + strlen(name); sym->name = nasm_malloc(len + 1); ret = snprintf(sym->name, len + 1, "%s%s", |
From: nasm-bot f. H. P. A. <hp...@li...> - 2016-03-07 20:12:26
|
Commit-ID: 172b840aa35d7018509036a3a7d3c467b331f73c Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=172b840aa35d7018509036a3a7d3c467b331f73c Author: H. Peter Anvin <hp...@li...> AuthorDate: Thu, 18 Feb 2016 01:16:18 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 12:08:48 -0800 Change nasmlist/ListGen to lfmt/struct lfmt For consistency with ofmt/dfmt, change the listing structure to "struct lfmt" and "lfmt" and move it to listing.h. >From master branch commit 8ac25aa02000889df94c3ea96bdda6375ddfa661 Signed-off-by: H. Peter Anvin <hp...@li...> --- Makefile.in | 10 ++++---- Mkfiles/msvc.mak | 12 +++++----- Mkfiles/netware.mak | 12 +++++----- Mkfiles/openwcom.mak | 10 ++++---- Mkfiles/owlinux.mak | 12 +++++----- assemble.c | 35 ++++++++++++++-------------- listing.c | 4 ++-- listing.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++- nasm.c | 6 ++--- nasm.h | 66 ---------------------------------------------------- preproc-nop.c | 3 ++- preproc.c | 15 ++++++------ 12 files changed, 126 insertions(+), 125 deletions(-) diff --git a/Makefile.in b/Makefile.in index 5884012..f0126fd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -316,8 +316,8 @@ alldeps: perlreq # @path-separator: "/" #-- Everything below is generated by mkdep.pl - do not edit --# assemble.$(O): assemble.c assemble.h compiler.h config.h directiv.h disp8.h \ - iflag.h iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h pptok.h \ - preproc.h regs.h tables.h tokens.h + iflag.h iflaggen.h insns.h insnsi.h listing.h nasm.h nasmlib.h opflags.h \ + pptok.h preproc.h regs.h tables.h tokens.h crc64.$(O): crc64.c compiler.h config.h hashtbl.h nasmlib.h directiv.$(O): directiv.c compiler.h config.h directiv.h hashtbl.h insnsi.h \ nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h @@ -430,10 +430,10 @@ parser.$(O): parser.c compiler.h config.h directiv.h eval.h float.h iflag.h \ pptok.$(O): pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h \ preproc.h preproc-nop.$(O): preproc-nop.c compiler.h config.h directiv.h insnsi.h \ - nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h + listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h preproc.$(O): preproc.c compiler.h config.h directiv.h eval.h hashtbl.h \ - insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h \ - stdscan.h tables.h tokens.h + insnsi.h listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h \ + regs.h stdscan.h tables.h tokens.h quote.$(O): quote.c compiler.h config.h nasmlib.h quote.h raa.$(O): raa.c compiler.h config.h nasmlib.h raa.h rbtree.$(O): rbtree.c compiler.h config.h rbtree.h diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak index a1bfd5e..a208285 100644 --- a/Mkfiles/msvc.mak +++ b/Mkfiles/msvc.mak @@ -226,8 +226,8 @@ everything: all doc rdf # @exclude: "config.h" #-- Everything below is generated by mkdep.pl - do not edit --# assemble.$(O): assemble.c assemble.h compiler.h directiv.h disp8.h iflag.h \ - iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h \ - regs.h tables.h tokens.h + iflaggen.h insns.h insnsi.h listing.h nasm.h nasmlib.h opflags.h pptok.h \ + preproc.h regs.h tables.h tokens.h crc64.$(O): crc64.c compiler.h hashtbl.h nasmlib.h directiv.$(O): directiv.c compiler.h directiv.h hashtbl.h insnsi.h nasm.h \ nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h @@ -332,11 +332,11 @@ parser.$(O): parser.c compiler.h directiv.h eval.h float.h iflag.h \ iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h \ preproc.h regs.h stdscan.h tables.h tokens.h pptok.$(O): pptok.c compiler.h hashtbl.h nasmlib.h pptok.h preproc.h -preproc-nop.$(O): preproc-nop.c compiler.h directiv.h insnsi.h nasm.h \ - nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h +preproc-nop.$(O): preproc-nop.c compiler.h directiv.h insnsi.h listing.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h preproc.$(O): preproc.c compiler.h directiv.h eval.h hashtbl.h insnsi.h \ - nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h \ - tables.h tokens.h + listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h \ + stdscan.h tables.h tokens.h quote.$(O): quote.c compiler.h nasmlib.h quote.h raa.$(O): raa.c compiler.h nasmlib.h raa.h rbtree.$(O): rbtree.c compiler.h rbtree.h diff --git a/Mkfiles/netware.mak b/Mkfiles/netware.mak index d897f44..017f161 100644 --- a/Mkfiles/netware.mak +++ b/Mkfiles/netware.mak @@ -134,8 +134,8 @@ $(OBJDIR)/version.mak: $(PROOT)/version $(PROOT)/version.pl $(OBJDIR) # @continuation: "\" #-- Everything below is generated by mkdep.pl - do not edit --# assemble.o: assemble.c assemble.h compiler.h config.h directiv.h disp8.h \ - iflag.h iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h pptok.h \ - preproc.h regs.h tables.h tokens.h + iflag.h iflaggen.h insns.h insnsi.h listing.h nasm.h nasmlib.h opflags.h \ + pptok.h preproc.h regs.h tables.h tokens.h crc64.o: crc64.c compiler.h config.h hashtbl.h nasmlib.h directiv.o: directiv.c compiler.h config.h directiv.h hashtbl.h insnsi.h \ nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h @@ -236,11 +236,11 @@ parser.o: parser.c compiler.h config.h directiv.h eval.h float.h iflag.h \ iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h \ preproc.h regs.h stdscan.h tables.h tokens.h pptok.o: pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h preproc.h -preproc-nop.o: preproc-nop.c compiler.h config.h directiv.h insnsi.h nasm.h \ - nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h +preproc-nop.o: preproc-nop.c compiler.h config.h directiv.h insnsi.h \ + listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h preproc.o: preproc.c compiler.h config.h directiv.h eval.h hashtbl.h \ - insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h \ - stdscan.h tables.h tokens.h + insnsi.h listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h \ + regs.h stdscan.h tables.h tokens.h quote.o: quote.c compiler.h config.h nasmlib.h quote.h raa.o: raa.c compiler.h config.h nasmlib.h raa.h rbtree.o: rbtree.c compiler.h config.h rbtree.h diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak index 351df72..2449ae4 100644 --- a/Mkfiles/openwcom.mak +++ b/Mkfiles/openwcom.mak @@ -271,8 +271,8 @@ alldeps: perlreq .SYMBOLIC # @continuation: "&" #-- Everything below is generated by mkdep.pl - do not edit --# assemble.$(O): assemble.c assemble.h compiler.h config.h directiv.h disp8.h & - iflag.h iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h pptok.h & - preproc.h regs.h tables.h tokens.h + iflag.h iflaggen.h insns.h insnsi.h listing.h nasm.h nasmlib.h opflags.h & + pptok.h preproc.h regs.h tables.h tokens.h crc64.$(O): crc64.c compiler.h config.h hashtbl.h nasmlib.h directiv.$(O): directiv.c compiler.h config.h directiv.h hashtbl.h insnsi.h & nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h @@ -385,10 +385,10 @@ parser.$(O): parser.c compiler.h config.h directiv.h eval.h float.h iflag.h & pptok.$(O): pptok.c compiler.h config.h hashtbl.h nasmlib.h pptok.h & preproc.h preproc-nop.$(O): preproc-nop.c compiler.h config.h directiv.h insnsi.h & - nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h + listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h preproc.$(O): preproc.c compiler.h config.h directiv.h eval.h hashtbl.h & - insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h & - stdscan.h tables.h tokens.h + insnsi.h listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h & + regs.h stdscan.h tables.h tokens.h quote.$(O): quote.c compiler.h config.h nasmlib.h quote.h raa.$(O): raa.c compiler.h config.h nasmlib.h raa.h rbtree.$(O): rbtree.c compiler.h config.h rbtree.h diff --git a/Mkfiles/owlinux.mak b/Mkfiles/owlinux.mak index 256abba..c366634 100644 --- a/Mkfiles/owlinux.mak +++ b/Mkfiles/owlinux.mak @@ -240,8 +240,8 @@ everything: all doc rdf # @continuation: "\" #-- Everything below is generated by mkdep.pl - do not edit --# assemble.$(O): assemble.c assemble.h compiler.h directiv.h disp8.h iflag.h \ - iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h pptok.h preproc.h \ - regs.h tables.h tokens.h + iflaggen.h insns.h insnsi.h listing.h nasm.h nasmlib.h opflags.h pptok.h \ + preproc.h regs.h tables.h tokens.h crc64.$(O): crc64.c compiler.h hashtbl.h nasmlib.h directiv.$(O): directiv.c compiler.h directiv.h hashtbl.h insnsi.h nasm.h \ nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h @@ -346,11 +346,11 @@ parser.$(O): parser.c compiler.h directiv.h eval.h float.h iflag.h \ iflaggen.h insns.h insnsi.h nasm.h nasmlib.h opflags.h parser.h pptok.h \ preproc.h regs.h stdscan.h tables.h tokens.h pptok.$(O): pptok.c compiler.h hashtbl.h nasmlib.h pptok.h preproc.h -preproc-nop.$(O): preproc-nop.c compiler.h directiv.h insnsi.h nasm.h \ - nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h +preproc-nop.$(O): preproc-nop.c compiler.h directiv.h insnsi.h listing.h \ + nasm.h nasmlib.h opflags.h pptok.h preproc.h regs.h tables.h preproc.$(O): preproc.c compiler.h directiv.h eval.h hashtbl.h insnsi.h \ - nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h stdscan.h \ - tables.h tokens.h + listing.h nasm.h nasmlib.h opflags.h pptok.h preproc.h quote.h regs.h \ + stdscan.h tables.h tokens.h quote.$(O): quote.c compiler.h nasmlib.h quote.h raa.$(O): raa.c compiler.h nasmlib.h raa.h rbtree.$(O): rbtree.c compiler.h rbtree.h diff --git a/assemble.c b/assemble.c index 75ae31d..584bed7 100644 --- a/assemble.c +++ b/assemble.c @@ -188,6 +188,7 @@ #include "insns.h" #include "tables.h" #include "disp8.h" +#include "listing.h" enum match_result { /* @@ -358,7 +359,7 @@ static void out(int64_t offset, int32_t segto, const void *data, asize = 0; /* No longer an address */ } - nasmlist->output(offset, data, type, size); + lfmt->output(offset, data, type, size); /* * this call to src_get determines when we call the @@ -495,15 +496,15 @@ int64_t assemble(int32_t segment, int64_t offset, int bits, iflag_t cp, } if (t > 0 && t == instruction->times - 1) { /* - * Dummy call to nasmlist->output to give the offset to the + * Dummy call to lfmt->output to give the offset to the * listing module. */ - nasmlist->output(offset, NULL, OUT_RAWDATA, 0); - nasmlist->uplevel(LIST_TIMES); + lfmt->output(offset, NULL, OUT_RAWDATA, 0); + lfmt->uplevel(LIST_TIMES); } } if (instruction->times > 1) - nasmlist->downlevel(LIST_TIMES); + lfmt->downlevel(LIST_TIMES); return offset - start; } @@ -534,11 +535,11 @@ int64_t assemble(int32_t segment, int64_t offset, int bits, iflag_t cp, len = (size_t)instruction->eops->next->next->offset; } /* - * Dummy call to nasmlist->output to give the offset to the + * Dummy call to lfmt->output to give the offset to the * listing module. */ - nasmlist->output(offset, NULL, OUT_RAWDATA, 0); - nasmlist->uplevel(LIST_INCBIN); + lfmt->output(offset, NULL, OUT_RAWDATA, 0); + lfmt->uplevel(LIST_INCBIN); while (t--) { size_t l; @@ -564,15 +565,15 @@ int64_t assemble(int32_t segment, int64_t offset, int bits, iflag_t cp, l -= m; } } - nasmlist->downlevel(LIST_INCBIN); + lfmt->downlevel(LIST_INCBIN); if (instruction->times > 1) { /* - * Dummy call to nasmlist->output to give the offset to the + * Dummy call to lfmt->output to give the offset to the * listing module. */ - nasmlist->output(offset, NULL, OUT_RAWDATA, 0); - nasmlist->uplevel(LIST_TIMES); - nasmlist->downlevel(LIST_TIMES); + lfmt->output(offset, NULL, OUT_RAWDATA, 0); + lfmt->uplevel(LIST_TIMES); + lfmt->downlevel(LIST_TIMES); } fclose(fp); return instruction->times * len; @@ -710,15 +711,15 @@ int64_t assemble(int32_t segment, int64_t offset, int bits, iflag_t cp, offset += insn_size; if (itimes > 0 && itimes == instruction->times - 1) { /* - * Dummy call to nasmlist->output to give the offset to the + * Dummy call to lfmt->output to give the offset to the * listing module. */ - nasmlist->output(offset, NULL, OUT_RAWDATA, 0); - nasmlist->uplevel(LIST_TIMES); + lfmt->output(offset, NULL, OUT_RAWDATA, 0); + lfmt->uplevel(LIST_TIMES); } } if (instruction->times > 1) - nasmlist->downlevel(LIST_TIMES); + lfmt->downlevel(LIST_TIMES); return offset - start; } else { /* No match */ diff --git a/listing.c b/listing.c index 46a2cbf..828ecee 100644 --- a/listing.c +++ b/listing.c @@ -326,7 +326,7 @@ static void list_error(int severity, const char *pfx, const char *msg) } -static const ListGen nasm_list = { +static const struct lfmt nasm_list = { list_init, list_cleanup, list_output, @@ -336,4 +336,4 @@ static const ListGen nasm_list = { list_error }; -const ListGen *nasmlist = &nasm_list; +const struct lfmt *lfmt = &nasm_list; diff --git a/listing.h b/listing.h index 8e178b0..58b5eb8 100644 --- a/listing.h +++ b/listing.h @@ -38,7 +38,71 @@ #ifndef NASM_LISTING_H #define NASM_LISTING_H -extern const ListGen *nasmlist; +/* + * List-file generators should look like this: + */ +struct lfmt { + /* + * Called to initialize the listing file generator. Before this + * is called, the other routines will silently do nothing when + * called. The `char *' parameter is the file name to write the + * listing to. + */ + void (*init)(const char *fname); + + /* + * Called to clear stuff up and close the listing file. + */ + void (*cleanup)(void); + + /* + * Called to output binary data. Parameters are: the offset; + * the data; the data type. Data types are similar to the + * output-format interface, only OUT_ADDRESS will _always_ be + * displayed as if it's relocatable, so ensure that any non- + * relocatable address has been converted to OUT_RAWDATA by + * then. Note that OUT_RAWDATA,0 is a valid data type, and is a + * dummy call used to give the listing generator an offset to + * work with when doing things like uplevel(LIST_TIMES) or + * uplevel(LIST_INCBIN). + */ + void (*output)(int32_t offset, const void *data, enum out_type type, uint64_t size); + + /* + * Called to send a text line to the listing generator. The + * `int' parameter is LIST_READ or LIST_MACRO depending on + * whether the line came directly from an input file or is the + * result of a multi-line macro expansion. + */ + void (*line)(int type, char *line); + + /* + * Called to change one of the various levelled mechanisms in + * the listing generator. LIST_INCLUDE and LIST_MACRO can be + * used to increase the nesting level of include files and + * macro expansions; LIST_TIMES and LIST_INCBIN switch on the + * two binary-output-suppression mechanisms for large-scale + * pseudo-instructions. + * + * LIST_MACRO_NOLIST is synonymous with LIST_MACRO except that + * it indicates the beginning of the expansion of a `nolist' + * macro, so anything under that level won't be expanded unless + * it includes another file. + */ + void (*uplevel)(int type); + + /* + * Reverse the effects of uplevel. + */ + void (*downlevel)(int type); + + /* + * Called on a warning or error, with the error message. + */ + void (*error)(int severity, const char *pfx, const char *msg); +}; + +extern const struct lfmt *lfmt; extern bool user_nolist; #endif diff --git a/nasm.c b/nasm.c index 98e3c32..3c4a1b1 100644 --- a/nasm.c +++ b/nasm.c @@ -1220,7 +1220,7 @@ static void assemble_file(char *fname, StrList **depend_ptr) globalbits = sb = cmd_sb; /* set 'bits' to command line default */ cpu = cmd_cpu; if (pass0 == 2) { - nasmlist->init(listname); + lfmt->init(listname); } in_abs_seg = false; global_offset_changed = 0; /* set by redefine_label */ @@ -1800,7 +1800,7 @@ static void assemble_file(char *fname, StrList **depend_ptr) } preproc->cleanup(0); - nasmlist->cleanup(); + lfmt->cleanup(); if (!terminate_after_phase && opt_verbose_info) { /* -On and -Ov switches */ fprintf(stdout, "info: assembly required 1+%d+1 passes\n", passn-3); @@ -2002,7 +2002,7 @@ static void nasm_verror_common(int severity, const char *fmt, va_list args) * preprocessor warnings in the list file */ if ((severity & ERR_MASK) >= ERR_WARNING) - nasmlist->error(severity, pfx, msg); + lfmt->error(severity, pfx, msg); if (severity & ERR_USAGE) want_usage = true; diff --git a/nasm.h b/nasm.h index 9827023..ea715c5 100644 --- a/nasm.h +++ b/nasm.h @@ -127,72 +127,6 @@ void define_label(char *label, int32_t segment, int64_t offset, char *special, bool is_norm, bool isextrn); /* - * List-file generators should look like this: - */ -typedef struct { - /* - * Called to initialize the listing file generator. Before this - * is called, the other routines will silently do nothing when - * called. The `char *' parameter is the file name to write the - * listing to. - */ - void (*init)(const char *fname); - - /* - * Called to clear stuff up and close the listing file. - */ - void (*cleanup)(void); - - /* - * Called to output binary data. Parameters are: the offset; - * the data; the data type. Data types are similar to the - * output-format interface, only OUT_ADDRESS will _always_ be - * displayed as if it's relocatable, so ensure that any non- - * relocatable address has been converted to OUT_RAWDATA by - * then. Note that OUT_RAWDATA,0 is a valid data type, and is a - * dummy call used to give the listing generator an offset to - * work with when doing things like uplevel(LIST_TIMES) or - * uplevel(LIST_INCBIN). - */ - void (*output)(int32_t offset, const void *data, enum out_type type, uint64_t size); - - /* - * Called to send a text line to the listing generator. The - * `int' parameter is LIST_READ or LIST_MACRO depending on - * whether the line came directly from an input file or is the - * result of a multi-line macro expansion. - */ - void (*line)(int type, char *line); - - /* - * Called to change one of the various levelled mechanisms in - * the listing generator. LIST_INCLUDE and LIST_MACRO can be - * used to increase the nesting level of include files and - * macro expansions; LIST_TIMES and LIST_INCBIN switch on the - * two binary-output-suppression mechanisms for large-scale - * pseudo-instructions. - * - * LIST_MACRO_NOLIST is synonymous with LIST_MACRO except that - * it indicates the beginning of the expansion of a `nolist' - * macro, so anything under that level won't be expanded unless - * it includes another file. - */ - void (*uplevel)(int type); - - /* - * Reverse the effects of uplevel. - */ - void (*downlevel)(int type); - - /* - * Called on a warning or error, with the error message. - */ - void (*error)(int severity, const char *pfx, const char *msg); -} ListGen; - -extern const ListGen *nasmlist; - -/* * Token types returned by the scanner, in addition to ordinary * ASCII character values, and zero for end-of-string. */ diff --git a/preproc-nop.c b/preproc-nop.c index 353e269..8024cac 100644 --- a/preproc-nop.c +++ b/preproc-nop.c @@ -51,6 +51,7 @@ #include "nasm.h" #include "nasmlib.h" #include "preproc.h" +#include "listing.h" #define BUF_DELTA 512 @@ -130,7 +131,7 @@ static char *nop_getline(void) break; } - nasmlist->line(LIST_READ, buffer); + lfmt->line(LIST_READ, buffer); return buffer; } diff --git a/preproc.c b/preproc.c index b43cd61..72fcad5 100644 --- a/preproc.c +++ b/preproc.c @@ -80,6 +80,7 @@ #include "eval.h" #include "tokens.h" #include "tables.h" +#include "listing.h" typedef struct SMacro SMacro; typedef struct MMacro MMacro; @@ -878,7 +879,7 @@ static char *read_line(void) */ buffer[strcspn(buffer, "\032")] = '\0'; - nasmlist->line(LIST_READ, buffer); + lfmt->line(LIST_READ, buffer); return buffer; } @@ -2506,7 +2507,7 @@ static int do_directive(Token * tline) inc->expansion = NULL; inc->mstk = NULL; istk = inc; - nasmlist->uplevel(LIST_INCLUDE); + lfmt->uplevel(LIST_INCLUDE); } free_tlist(origline); return DIRECTIVE_FOUND; @@ -2962,7 +2963,7 @@ issue_error: istk->mstk = defining; - nasmlist->uplevel(defining->nolist ? LIST_MACRO_NOLIST : LIST_MACRO); + lfmt->uplevel(defining->nolist ? LIST_MACRO_NOLIST : LIST_MACRO); tmp_defining = defining; defining = defining->rep_nest; free_tlist(origline); @@ -4769,7 +4770,7 @@ static int expand_mmacro(Token * tline) } } - nasmlist->uplevel(m->nolist ? LIST_MACRO_NOLIST : LIST_MACRO); + lfmt->uplevel(m->nolist ? LIST_MACRO_NOLIST : LIST_MACRO); return 1; } @@ -4971,7 +4972,7 @@ static char *pp_getline(void) } istk->expansion = l->next; nasm_free(l); - nasmlist->downlevel(LIST_MACRO); + lfmt->downlevel(LIST_MACRO); } } while (1) { /* until we get a line we can use */ @@ -4985,7 +4986,7 @@ static char *pp_getline(void) istk->expansion = l->next; nasm_free(l); p = detoken(tline, false); - nasmlist->line(LIST_MACRO, p); + lfmt->line(LIST_MACRO, p); nasm_free(p); break; } @@ -5013,7 +5014,7 @@ static char *pp_getline(void) nasm_free(src_set_fname(nasm_strdup(i->fname))); } istk = i->next; - nasmlist->downlevel(LIST_INCLUDE); + lfmt->downlevel(LIST_INCLUDE); nasm_free(i); if (!istk) { line = NULL; |
From: nasm-bot f. H. P. A. <hp...@li...> - 2016-03-07 20:12:19
|
Commit-ID: 335c4857ce753881f5136ed41d3a827575ac48d3 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=335c4857ce753881f5136ed41d3a827575ac48d3 Author: H. Peter Anvin <hp...@li...> AuthorDate: Wed, 17 Feb 2016 20:55:08 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 12:07:50 -0800 Remove ofmt->current_dfmt indirection Move ofmt->current_dfmt into a separate global variable. This should allow us to make ofmt readonly and removes some additional gratuitious differences between backends. >From master branch checkin a7bc15dd0aa963ab56a98ee04bc08ce6d9e3baea Signed-off-by: H. Peter Anvin <hp...@li...> --- assemble.c | 2 +- labels.c | 10 +++++----- nasm.c | 10 ++++++---- nasm.h | 8 ++------ output/outcoff.c | 8 ++++---- output/outdbg.c | 2 +- output/outelf32.c | 22 +++++++++++----------- output/outelf64.c | 22 +++++++++++----------- output/outelfx32.c | 22 +++++++++++----------- output/outform.c | 2 +- output/outieee.c | 2 +- output/outobj.c | 2 +- 12 files changed, 55 insertions(+), 57 deletions(-) diff --git a/assemble.c b/assemble.c index f051b26..75ae31d 100644 --- a/assemble.c +++ b/assemble.c @@ -370,7 +370,7 @@ static void out(int64_t offset, int32_t segto, const void *data, */ if (src_get(&lineno, &lnfname)) - ofmt->current_dfmt->linenum(lnfname, lineno, segto); + dfmt->linenum(lnfname, lineno, segto); if (asize && asize > amax) { if (type != OUT_ADDRESS || (int)size < 0) { diff --git a/labels.c b/labels.c index 9f2b76e..94c2ae6 100644 --- a/labels.c +++ b/labels.c @@ -262,14 +262,14 @@ void redefine_label(char *label, int32_t segment, int64_t offset, char *special, ofmt->symdef(xsymbol, segment, offset, exi, special ? special : lptr->defn.special); - ofmt->current_dfmt->debug_deflabel(xsymbol, segment, offset, exi, + dfmt->debug_deflabel(xsymbol, segment, offset, exi, special ? special : lptr->defn.special); /** nasm_free(xsymbol); ! outobj.c stores the pointer; ouch!!! **/ } else { if ((lptr->defn.is_global & (GLOBAL_BIT | EXTERN_BIT)) != EXTERN_BIT) { ofmt->symdef(lptr->defn.label, segment, offset, exi, special ? special : lptr->defn.special); - ofmt->current_dfmt->debug_deflabel(label, segment, offset, exi, + dfmt->debug_deflabel(label, segment, offset, exi, special ? special : lptr->defn.special); } } @@ -327,14 +327,14 @@ void define_label(char *label, int32_t segment, int64_t offset, char *special, ofmt->symdef(xsymbol, segment, offset, exi, special ? special : lptr->defn.special); - ofmt->current_dfmt->debug_deflabel(xsymbol, segment, offset, exi, + dfmt->debug_deflabel(xsymbol, segment, offset, exi, special ? special : lptr->defn.special); /** nasm_free(xsymbol); ! outobj.c stores the pointer; ouch!!! **/ } else { if ((lptr->defn.is_global & (GLOBAL_BIT | EXTERN_BIT)) != EXTERN_BIT) { ofmt->symdef(lptr->defn.label, segment, offset, exi, special ? special : lptr->defn.special); - ofmt->current_dfmt->debug_deflabel(label, segment, offset, exi, + dfmt->debug_deflabel(label, segment, offset, exi, special ? special : lptr->defn.special); } } @@ -371,7 +371,7 @@ void define_common(char *label, int32_t segment, int32_t size, char *special) ofmt->symdef(lptr->defn.label, segment, size, 2, special ? special : lptr->defn.special); - ofmt->current_dfmt->debug_deflabel(lptr->defn.label, segment, size, 2, + dfmt->debug_deflabel(lptr->defn.label, segment, size, 2, special ? special : lptr->defn.special); } diff --git a/nasm.c b/nasm.c index 0520500..98e3c32 100644 --- a/nasm.c +++ b/nasm.c @@ -358,7 +358,9 @@ int main(int argc, char **argv) /* If debugging info is disabled, suppress any debug calls */ if (!using_debug_info) - ofmt->current_dfmt = &null_debug_form; + dfmt = &null_debug_form; + else if (!dfmt) + dfmt = ofmt->default_dfmt; if (ofmt->stdmac) preproc->extra_stdmac(ofmt->stdmac); @@ -459,7 +461,6 @@ int main(int argc, char **argv) init_labels(); ofmt->init(); - dfmt = ofmt->current_dfmt; dfmt->init(); assemble_file(inname, depend_ptr); @@ -665,6 +666,7 @@ static bool process_arg(char *p, char *q) "unrecognised output format `%s' - " "use -hf for a list", param); } + dfmt = NULL; break; case 'O': /* Optimization level */ @@ -742,8 +744,8 @@ static bool process_arg(char *p, char *q) break; case 'F': /* specify debug format */ - ofmt->current_dfmt = dfmt_find(ofmt, param); - if (!ofmt->current_dfmt) { + dfmt = dfmt_find(ofmt, param); + if (!dfmt) { nasm_fatal(ERR_NOFILE | ERR_USAGE, "unrecognized debug format `%s' for" " output format `%s'", diff --git a/nasm.h b/nasm.h index ff2acfe..9827023 100644 --- a/nasm.h +++ b/nasm.h @@ -751,13 +751,9 @@ struct ofmt { struct dfmt **debug_formats; /* - * and a pointer to the element that is being used - * note: this is set to the default at compile time and changed if the - * -F option is selected. If developing a set of new debug formats for - * an output format, be sure to set this to whatever default you want - * + * the default debugging format if -F is not specified */ - const struct dfmt *current_dfmt; + const struct dfmt *default_dfmt; /* * This, if non-NULL, is a NULL-terminated list of `char *'s diff --git a/output/outcoff.c b/output/outcoff.c index 9587f35..935b654 100644 --- a/output/outcoff.c +++ b/output/outcoff.c @@ -228,8 +228,8 @@ static void coff_cleanup(int debuginfo) struct coff_Reloc *r; int i; - if (debuginfo && ofmt->current_dfmt->cleanup) - ofmt->current_dfmt->cleanup(); + if (debuginfo && dfmt->cleanup) + dfmt->cleanup(); coff_write(); for (i = 0; i < coff_nsects; i++) { @@ -603,7 +603,7 @@ static void coff_out(int32_t segto, const void *data, memset(mydata, 0, sizeof(mydata)); - if (ofmt->current_dfmt && ofmt->current_dfmt->debug_output) { + if (dfmt && dfmt->debug_output) { struct coff_DebugInfo dinfo; dinfo.segto = segto; dinfo.seg = segment; @@ -614,7 +614,7 @@ static void coff_out(int32_t segto, const void *data, else dinfo.size = realsize(type, size); - ofmt->current_dfmt->debug_output(type, &dinfo); + dfmt->debug_output(type, &dinfo); } if (type == OUT_RESERVE) { diff --git a/output/outdbg.c b/output/outdbg.c index 034a615..83860ab 100644 --- a/output/outdbg.c +++ b/output/outdbg.c @@ -66,7 +66,7 @@ static void dbg_init(void) static void dbg_cleanup(int debuginfo) { (void)debuginfo; - of_dbg.current_dfmt->cleanup(); + dfmt->cleanup(); while (dbgsect) { struct Section *tmp = dbgsect; dbgsect = dbgsect->next; diff --git a/output/outelf32.c b/output/outelf32.c index 0af2420..f86106d 100644 --- a/output/outelf32.c +++ b/output/outelf32.c @@ -242,8 +242,8 @@ static void elf_cleanup(int debuginfo) saa_free(syms); raa_free(bsym); saa_free(strs); - if (of_elf32.current_dfmt) { - of_elf32.current_dfmt->cleanup(); + if (dfmt) { + dfmt->cleanup(); } } @@ -693,11 +693,11 @@ static void elf_out(int32_t segto, const void *data, } /* again some stabs debugging stuff */ - if (of_elf32.current_dfmt) { + if (dfmt) { sinfo.offset = s->len; sinfo.section = i; sinfo.name = s->name; - of_elf32.current_dfmt->debug_output(TY_STABSSYMLIN, &sinfo); + dfmt->debug_output(TY_STABSSYMLIN, &sinfo); } /* end of debugging stuff */ @@ -896,9 +896,9 @@ static void elf_write(void) * relocation sections for the user sections. */ nsections = sec_numspecial + 1; - if (of_elf32.current_dfmt == &df_stabs) + if (dfmt == &df_stabs) nsections += 3; - else if (of_elf32.current_dfmt == &df_dwarf) + else if (dfmt == &df_dwarf) nsections += 10; add_sectname("", ".shstrtab"); @@ -912,12 +912,12 @@ static void elf_write(void) } } - if (of_elf32.current_dfmt == &df_stabs) { + if (dfmt == &df_stabs) { /* in case the debug information is wanted, just add these three sections... */ add_sectname("", ".stab"); add_sectname("", ".stabstr"); add_sectname(".rel", ".stab"); - } else if (of_elf32.current_dfmt == &df_dwarf) { + } else if (dfmt == &df_dwarf) { /* the dwarf debug standard specifies the following ten sections, not all of which are currently implemented, although all of them are defined. */ @@ -1014,7 +1014,7 @@ static void elf_write(void) p += strlen(p) + 1; } - if (of_elf32.current_dfmt == &df_stabs) { + if (dfmt == &df_stabs) { /* for debugging information, create the last three sections which are the .stab , .stabstr and .rel.stab sections respectively */ @@ -1035,7 +1035,7 @@ static void elf_write(void) stabrellen, sec_symtab, sec_stab, 4, 8); p += strlen(p) + 1; } - } else if (of_elf32.current_dfmt == &df_dwarf) { + } else if (dfmt == &df_dwarf) { /* for dwarf debugging information, create the ten dwarf sections */ /* this function call creates the dwarf sections in memory */ @@ -1162,7 +1162,7 @@ static struct SAA *elf_build_symtab(int32_t *len, int32_t *local) * which are relocation targets. */ /*** fix for 32 bit ***/ - if (of_elf32.current_dfmt == &df_dwarf) { + if (dfmt == &df_dwarf) { dwarf_infosym = *local; p = entry; WRITELONG(p, 0); /* no symbol name */ diff --git a/output/outelf64.c b/output/outelf64.c index 5b4eee8..3aee02c 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -246,8 +246,8 @@ static void elf_cleanup(int debuginfo) saa_free(syms); raa_free(bsym); saa_free(strs); - if (of_elf64.current_dfmt) { - of_elf64.current_dfmt->cleanup(); + if (dfmt) { + dfmt->cleanup(); } } @@ -709,12 +709,12 @@ static void elf_out(int32_t segto, const void *data, } /* again some stabs debugging stuff */ - if (of_elf64.current_dfmt) { + if (dfmt) { sinfo.offset = s->len; sinfo.section = i; sinfo.segto = segto; sinfo.name = s->name; - of_elf64.current_dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); + dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); } /* end of debugging stuff */ @@ -977,9 +977,9 @@ static void elf_write(void) * relocation sections for the user sections. */ nsections = sec_numspecial + 1; - if (of_elf64.current_dfmt == &df_stabs) + if (dfmt == &df_stabs) nsections += 3; - else if (of_elf64.current_dfmt == &df_dwarf) + else if (dfmt == &df_dwarf) nsections += 10; add_sectname("", ".shstrtab"); @@ -993,14 +993,14 @@ static void elf_write(void) } } - if (of_elf64.current_dfmt == &df_stabs) { + if (dfmt == &df_stabs) { /* in case the debug information is wanted, just add these three sections... */ add_sectname("", ".stab"); add_sectname("", ".stabstr"); add_sectname(".rel", ".stab"); } - else if (of_elf64.current_dfmt == &df_dwarf) { + else if (dfmt == &df_dwarf) { /* the dwarf debug standard specifies the following ten sections, not all of which are currently implemented, although all of them are defined. */ @@ -1098,7 +1098,7 @@ static void elf_write(void) p += strlen(p) + 1; } - if (of_elf64.current_dfmt == &df_stabs) { + if (dfmt == &df_stabs) { /* for debugging information, create the last three sections which are the .stab , .stabstr and .rel.stab sections respectively */ @@ -1119,7 +1119,7 @@ static void elf_write(void) stabrellen, symtabsection, sec_stab, 4, 16); p += strlen(p) + 1; } - } else if (of_elf64.current_dfmt == &df_dwarf) { + } else if (dfmt == &df_dwarf) { /* for dwarf debugging information, create the ten dwarf sections */ /* this function call creates the dwarf sections in memory */ @@ -1245,7 +1245,7 @@ static struct SAA *elf_build_symtab(int32_t *len, int32_t *local) * dwarf needs symbols for debug sections * which are relocation targets. */ - if (of_elf64.current_dfmt == &df_dwarf) { + if (dfmt == &df_dwarf) { dwarf_infosym = *local; p = entry; WRITELONG(p, 0); /* no symbol name */ diff --git a/output/outelfx32.c b/output/outelfx32.c index 49ed945..170c117 100644 --- a/output/outelfx32.c +++ b/output/outelfx32.c @@ -245,8 +245,8 @@ static void elf_cleanup(int debuginfo) saa_free(syms); raa_free(bsym); saa_free(strs); - if (of_elfx32.current_dfmt) { - of_elfx32.current_dfmt->cleanup(); + if (dfmt) { + dfmt->cleanup(); } } @@ -708,12 +708,12 @@ static void elf_out(int32_t segto, const void *data, } /* again some stabs debugging stuff */ - if (of_elfx32.current_dfmt) { + if (dfmt) { sinfo.offset = s->len; sinfo.section = i; sinfo.segto = segto; sinfo.name = s->name; - of_elfx32.current_dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); + dfmt->debug_output(TY_DEBUGSYMLIN, &sinfo); } /* end of debugging stuff */ @@ -939,9 +939,9 @@ static void elf_write(void) * relocation sections for the user sections. */ nsections = sec_numspecial + 1; - if (of_elfx32.current_dfmt == &df_stabs) + if (dfmt == &df_stabs) nsections += 3; - else if (of_elfx32.current_dfmt == &df_dwarf) + else if (dfmt == &df_dwarf) nsections += 10; add_sectname("", ".shstrtab"); @@ -955,14 +955,14 @@ static void elf_write(void) } } - if (of_elfx32.current_dfmt == &df_stabs) { + if (dfmt == &df_stabs) { /* in case the debug information is wanted, just add these three sections... */ add_sectname("", ".stab"); add_sectname("", ".stabstr"); add_sectname(".rel", ".stab"); } - else if (of_elfx32.current_dfmt == &df_dwarf) { + else if (dfmt == &df_dwarf) { /* the dwarf debug standard specifies the following ten sections, not all of which are currently implemented, although all of them are defined. */ @@ -1059,7 +1059,7 @@ static void elf_write(void) p += strlen(p) + 1; } - if (of_elfx32.current_dfmt == &df_stabs) { + if (dfmt == &df_stabs) { /* for debugging information, create the last three sections which are the .stab , .stabstr and .rel.stab sections respectively */ @@ -1080,7 +1080,7 @@ static void elf_write(void) stabrellen, sec_symtab, sec_stab, 4, 8); p += strlen(p) + 1; } - } else if (of_elfx32.current_dfmt == &df_dwarf) { + } else if (dfmt == &df_dwarf) { /* for dwarf debugging information, create the ten dwarf sections */ /* this function call creates the dwarf sections in memory */ @@ -1206,7 +1206,7 @@ static struct SAA *elf_build_symtab(int32_t *len, int32_t *local) * dwarf needs symbols for debug sections * which are relocation targets. */ - if (of_elfx32.current_dfmt == &df_dwarf) { + if (dfmt == &df_dwarf) { dwarf_infosym = *local; p = entry; WRITELONG(p, 0); /* no symbol name */ diff --git a/output/outform.c b/output/outform.c index 0c8ae53..3d70e2a 100644 --- a/output/outform.c +++ b/output/outform.c @@ -111,7 +111,7 @@ void dfmt_list(struct ofmt *ofmt, FILE *fp) for (dfp = ofmt->debug_formats; (df = *dfp); dfp++) { fprintf(fp, " %c %-10s%s\n", - df == ofmt->current_dfmt ? '*' : ' ', + df == dfmt ? '*' : ' ', df->shortname, df->fullname); } } diff --git a/output/outieee.c b/output/outieee.c index 2415bc7..79faa64 100644 --- a/output/outieee.c +++ b/output/outieee.c @@ -235,7 +235,7 @@ static int ieee_set_info(enum geninfo type, char **val) static void ieee_cleanup(int debuginfo) { ieee_write_file(debuginfo); - of_ieee.current_dfmt->cleanup(); + dfmt->cleanup(); while (seghead) { struct ieeeSection *segtmp = seghead; seghead = seghead->next; diff --git a/output/outobj.c b/output/outobj.c index 74f43ce..5773812 100644 --- a/output/outobj.c +++ b/output/outobj.c @@ -670,7 +670,7 @@ static int obj_set_info(enum geninfo type, char **val) static void obj_cleanup(int debuginfo) { obj_write_file(debuginfo); - of_obj.current_dfmt->cleanup(); + dfmt->cleanup(); while (seghead) { struct Segment *segtmp = seghead; seghead = seghead->next; |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-07 19:51:17
|
Commit-ID: cfd56ebb81fee0d310b2bc673625fca53536a4e0 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=cfd56ebb81fee0d310b2bc673625fca53536a4e0 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Sun, 6 Mar 2016 21:44:14 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Sun, 6 Mar 2016 21:44:14 -0800 configure.in: disable -Wwrite-strings for now At the moment, NASM is not clean with -Wwrite-strings due to passing string constants to functions that under some conditions modify their arguments. This is problematic if nothing else for guaranteeing correctness, but will take some work to remedy. In the meantime, disable -Wwrite-strings. Signed-off-by: H. Peter Anvin <hp...@zy...> --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 82602c7..b7057c9 100644 --- a/configure.in +++ b/configure.in @@ -193,7 +193,7 @@ dnl Suppress format warning on Windows targets due to their <inttypes.h> PA_ADD_CFLAGS([-Wpedantic-ms-format],[-Wno-pedantic-ms-format]) PA_ADD_CFLAGS([-Wc90-c99-compat]) PA_ADD_CFLAGS([-Wlong-long],[-Wno-long-long]) -PA_ADD_CFLAGS([-Wwrite-strings]) +dnl PA_ADD_CFLAGS([-Wwrite-strings]) AC_ARG_ENABLE([werror], [AC_HELP_STRING([--enable-werror], [compile with -Werror to error out on any warning])], |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-07 19:39:17
|
Commit-ID: 3c6300738c19132a84f4fc3fac1876ea34595e25 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=3c6300738c19132a84f4fc3fac1876ea34595e25 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Mon, 7 Mar 2016 11:36:46 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Mon, 7 Mar 2016 11:36:46 -0800 NASM 2.12.01rc1 --- version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version b/version index 3e162f0..e55755c 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.12 +2.12.01rc1 |
From: nasm-bot f. C. G. <gor...@gm...> - 2016-03-07 19:39:16
|
Commit-ID: 6832acb6e34cf98ad343493ca1569c61178a37f9 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=6832acb6e34cf98ad343493ca1569c61178a37f9 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Mon, 7 Mar 2016 22:36:18 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Mon, 7 Mar 2016 22:36:18 +0300 doc: changes -- Don't forget to mention MONITORX and MWAITX Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- doc/changes.src | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes.src b/doc/changes.src index 3bca35a..62ece40 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -14,7 +14,7 @@ since 2007. \b Fix error when not specifying a list file. -\b Add the \c{CLZERO} instruction. +\b Add \c{CLZERO}, \c{MONITORX} and \c{MWAITX} instructions. \S{cl-2.12} Version 2.12 |
From: nasm-bot f. C. G. <gor...@gm...> - 2016-03-07 19:36:19
|
Commit-ID: f34cf394594ff1b40ec14196e3ae86d1fa21775d Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=f34cf394594ff1b40ec14196e3ae86d1fa21775d Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Mon, 7 Mar 2016 22:32:31 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Mon, 7 Mar 2016 22:32:31 +0300 doc: changes -- Add CLZERO into the list Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- doc/changes.src | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changes.src b/doc/changes.src index 4f7020e..3bca35a 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -14,6 +14,8 @@ since 2007. \b Fix error when not specifying a list file. +\b Add the \c{CLZERO} instruction. + \S{cl-2.12} Version 2.12 |
From: nasm-bot f. C. G. <gor...@gm...> - 2016-03-05 09:42:18
|
Commit-ID: b854be2772f2f4bcafe93558f50ee5b9b222ab10 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=b854be2772f2f4bcafe93558f50ee5b9b222ab10 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 5 Mar 2016 12:39:06 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 5 Mar 2016 12:39:06 +0300 insns.dat: Add CLZERO AMD instruction https://sourceware.org/ml/binutils/2015-03/msg00078.html http://bugzilla.nasm.us/show_bug.cgi?id=3392337 Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- insns.dat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/insns.dat b/insns.dat index ef797d2..293f941 100644 --- a/insns.dat +++ b/insns.dat @@ -5115,6 +5115,9 @@ WRPKRU void [ 0f 01 ef] X64,FUTURE ; New memory instructions CLFLUSHOPT mem [m: 66 0f ae /7] FUTURE +; AMD Zen v1 +CLZERO void [ 0f 01 fc] X64,FUTURE,AMD + ;# Systematic names for the hinting nop instructions ; These should be last in the file HINT_NOP0 rm16 [m: o16 0f 18 /0] P6,UNDOC |
From: nasm-bot f. C. G. <gor...@gm...> - 2016-03-05 09:27:18
|
Commit-ID: f8b33e9191e42dbb70c58e9ba9bf86f5591def1a Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=f8b33e9191e42dbb70c58e9ba9bf86f5591def1a Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 5 Mar 2016 11:59:03 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 5 Mar 2016 11:59:03 +0300 nsis: Update icons To match the main logo. Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- nsis/nasm-un.ico | Bin 2238 -> 5494 bytes nsis/nasm.ico | Bin 2238 -> 2238 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/nsis/nasm-un.ico b/nsis/nasm-un.ico index 90d338c..18c92d0 100644 Binary files a/nsis/nasm-un.ico and b/nsis/nasm-un.ico differ diff --git a/nsis/nasm.ico b/nsis/nasm.ico index b1a9d63..37e1c3d 100644 Binary files a/nsis/nasm.ico and b/nsis/nasm.ico differ |
From: nasm-bot f. C. G. <gor...@gm...> - 2016-03-05 09:27:18
|
Commit-ID: a19c22ec904effa9e78e729e70faf58d2e7187fd Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=a19c22ec904effa9e78e729e70faf58d2e7187fd Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 5 Mar 2016 01:36:49 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 5 Mar 2016 01:36:49 +0300 insns.dat: Add MONITORX/MWAITX AMD instructions http://bugzilla.nasm.us/show_bug.cgi?id=3392336 Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- insns.dat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/insns.dat b/insns.dat index c3bf293..ef797d2 100644 --- a/insns.dat +++ b/insns.dat @@ -799,6 +799,8 @@ MFENCE void [ np 0f ae f0] X64,AMD MONITOR void [ 0f 01 c8] PRESCOTT MONITOR reg_eax,reg_ecx,reg_edx [---: 0f 01 c8] PRESCOTT,NOLONG,ND MONITOR reg_rax,reg_ecx,reg_edx [---: 0f 01 c8] X64,ND +MONITORX void [ 0f 01 fa] X64,AMD +MONITORX reg_rax,reg_ecx,reg_edx [---: 0f 01 fa] X64,AMD,ND MOV mem,reg_sreg [mr: 8c /r] 8086,SW MOV reg16,reg_sreg [mr: o16 8c /r] 8086 MOV reg32,reg_sreg [mr: o32 8c /r] 386 @@ -891,6 +893,8 @@ MUL rm32 [m: o32 f7 /4] 386 MUL rm64 [m: o64 f7 /4] X64 MWAIT void [ 0f 01 c9] PRESCOTT MWAIT reg_eax,reg_ecx [--: 0f 01 c9] PRESCOTT,ND +MWAITX void [ 0f 01 fb] X64,AMD +MWAITX reg_eax,reg_ecx [--: 0f 01 fb] X64,AMD,ND NEG rm8 [m: hle f6 /3] 8086,LOCK NEG rm16 [m: hle o16 f7 /3] 8086,LOCK NEG rm32 [m: hle o32 f7 /3] 386,LOCK |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-04 19:18:17
|
Commit-ID: 52e8646d17b47c65b2c08010df22342efd07305b Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=52e8646d17b47c65b2c08010df22342efd07305b Author: H. Peter Anvin <hp...@zy...> AuthorDate: Tue, 1 Mar 2016 22:20:10 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Fri, 4 Mar 2016 11:14:35 -0800 configure: enable additional code cleanliness warnings We are supposed to handle compiling on a "C90 plus long long" compiler, so make gcc (our most common development platform compiler) complain when we don't. However, suppress the complaints about the Microsoft definitions of the <inttypes.h> strings. >From master branch checkin 25da6eaf434705a6ad01f252132dc7f109493c67, except that -Wwrite-strings is omitted; making the code base -Wwrite-strings clean is going to take additional work. Signed-off-by: H. Peter Anvin <hp...@zy...> --- aclocal.m4 | 3 ++- configure.in | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aclocal.m4 b/aclocal.m4 index 8951278..50c1af8 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -9,7 +9,8 @@ AC_DEFUN(PA_ADD_CFLAGS, CFLAGS="$CFLAGS $1" AC_TRY_LINK([#include <stdio.h>], [printf("Hello, World!\n");], - AC_MSG_RESULT([yes]), + AC_MSG_RESULT([yes]) + CFLAGS="$pa_add_cflags__old_cflags ifelse([$2],[],[$1],[$2])", AC_MSG_RESULT([no]) CFLAGS="$pa_add_cflags__old_cflags")]) diff --git a/configure.in b/configure.in index b7f7110..cbaebc4 100644 --- a/configure.in +++ b/configure.in @@ -183,6 +183,10 @@ AC_ARG_ENABLE([ccache], []) PA_ADD_CFLAGS([-pedantic]) +dnl Suppress format warning on Windows targets due to their <inttypes.h> +PA_ADD_CFLAGS([-Wpedantic-ms-format],[-Wno-pedantic-ms-format]) +PA_ADD_CFLAGS([-Wc90-c99-compat]) +PA_ADD_CFLAGS([-Wlong-long],[-Wno-long-long]) AC_ARG_ENABLE([werror], [AC_HELP_STRING([--enable-werror], [compile with -Werror to error out on any warning])], |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-04 19:18:16
|
Commit-ID: 409e2df1f26bbbe299c8cd5111fd17f03595be17 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=409e2df1f26bbbe299c8cd5111fd17f03595be17 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Tue, 1 Mar 2016 21:53:09 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Fri, 4 Mar 2016 11:11:37 -0800 configure.in: if byte order is unknown or ill defined, don't define any We can always operate correctly if neither WORDS_BIGENDIAN nor WORDS_LITTLEENDIAN are defined, so if the word order is either indeterminable or universal (the compiler generates both bigendian and litteendian output from the same sources) then define neither. >From master branch checkin ef63588eb483f96550d5a6d097363ff6e7a733f4 Resolved Conflicts: configure.in Signed-off-by: H. Peter Anvin <hp...@zy...> --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 86d2af9..b7f7110 100644 --- a/configure.in +++ b/configure.in @@ -67,7 +67,7 @@ AC_C_INLINE AC_C_RESTRICT AC_TYPE_SIZE_T PA_WORKING_BOOL -AC_C_BIGENDIAN(AC_DEFINE(WORDS_BIGENDIAN),AC_DEFINE(WORDS_LITTLEENDIAN)) +AC_C_BIGENDIAN(AC_DEFINE(WORDS_BIGENDIAN),AC_DEFINE(WORDS_LITTLEENDIAN),,) AH_TEMPLATE(WORDS_BIGENDIAN, [Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX).]) |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-04 19:00:18
|
Commit-ID: aa8f49438d962e0d421be88491469c83d483f63a Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=aa8f49438d962e0d421be88491469c83d483f63a Author: H. Peter Anvin <hp...@zy...> AuthorDate: Fri, 4 Mar 2016 10:57:01 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Fri, 4 Mar 2016 10:57:01 -0800 changes.src: document fix for the no list file error Signed-off-by: H. Peter Anvin <hp...@zy...> --- doc/changes.src | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changes.src b/doc/changes.src index 9f1c563..4f7020e 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -12,6 +12,8 @@ since 2007. \b Portability fixes for some platforms. +\b Fix error when not specifying a list file. + \S{cl-2.12} Version 2.12 |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-04 19:00:17
|
Commit-ID: d414e5f4cdbc9235771d27c942aea3c428221fca Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=d414e5f4cdbc9235771d27c942aea3c428221fca Author: H. Peter Anvin <hp...@zy...> AuthorDate: Fri, 4 Mar 2016 10:59:13 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Fri, 4 Mar 2016 10:59:13 -0800 test/cv8struc.asm: fix missing comma in test case Fix a missing comma in the test case which make the test case bogus. Signed-off-by: H. Peter Anvin <hp...@zy...> --- test/cv8struc.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cv8struc.asm b/test/cv8struc.asm index 8d52cc3..83fce79 100644 --- a/test/cv8struc.asm +++ b/test/cv8struc.asm @@ -4,5 +4,5 @@ endstruc a_struc: istruc A_STRUC - at A_STRUC._a dw 1 + at A_STRUC._a, dw 1 iend |
From: nasm-bot f. H. P. A. <hp...@zy...> - 2016-03-04 19:00:17
|
Commit-ID: c073fc095f08b75908353f7d66426b1df0a92407 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=c073fc095f08b75908353f7d66426b1df0a92407 Author: H. Peter Anvin <hp...@zy...> AuthorDate: Fri, 4 Mar 2016 10:57:01 -0800 Committer: H. Peter Anvin <hp...@zy...> CommitDate: Fri, 4 Mar 2016 10:58:03 -0800 changes.src: document fix for the no list file error Signed-off-by: H. Peter Anvin <hp...@zy...> --- doc/changes.src | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/changes.src b/doc/changes.src index 9f1c563..4f7020e 100644 --- a/doc/changes.src +++ b/doc/changes.src @@ -12,6 +12,8 @@ since 2007. \b Portability fixes for some platforms. +\b Fix error when not specifying a list file. + \S{cl-2.12} Version 2.12 |