]> granicus.if.org Git - yasm/commitdiff
This commit was manufactured by cvs2svn to create branch 'YASM_0_2'.
authorPeter Johnson <peter@tortall.net>
Thu, 27 Mar 2003 05:06:10 +0000 (05:06 -0000)
committerPeter Johnson <peter@tortall.net>
Thu, 27 Mar 2003 05:06:10 +0000 (05:06 -0000)
svn path=/branches/YASM_0_2/; revision=892

533 files changed:
Mkfiles/Makefile.dj [deleted file]
Mkfiles/Makefile.flat [deleted file]
Mkfiles/Makefile.vc [deleted file]
tools/re2c/cleanup.pl [deleted file]
yasm/.cvsignore [moved from .cvsignore with 100% similarity]
yasm/.indent.pro [moved from .indent.pro with 100% similarity]
yasm/ABOUT-NLS [moved from ABOUT-NLS with 100% similarity]
yasm/AUTHORS [moved from AUTHORS with 100% similarity]
yasm/COPYING [moved from COPYING with 100% similarity]
yasm/COPYING.LIB-2.0 [moved from COPYING.LIB-2.0 with 100% similarity]
yasm/ChangeLog [moved from ChangeLog with 100% similarity]
yasm/HACKING [moved from HACKING with 100% similarity]
yasm/INSTALL [moved from INSTALL with 100% similarity]
yasm/Makefile.am [moved from Makefile.am with 68% similarity]
yasm/Mkfiles/Makefile.dj [new file with mode: 0644]
yasm/Mkfiles/Makefile.flat [new file with mode: 0644]
yasm/Mkfiles/dj/config.h [moved from Mkfiles/dj/config.h with 90% similarity]
yasm/Mkfiles/dj/libyasm/config.h [new file with mode: 0644]
yasm/Mkfiles/nightly-build.pl [moved from Mkfiles/nightly-build.pl with 100% similarity]
yasm/Mkfiles/vc/.cvsignore [moved from Mkfiles/vc/.cvsignore with 100% similarity]
yasm/Mkfiles/vc/config.h [moved from Mkfiles/vc/config.h with 100% similarity]
yasm/Mkfiles/vc/libyasm/.cvsignore [moved from Mkfiles/vc/libyasm/.cvsignore with 100% similarity]
yasm/Mkfiles/vc/libyasm/config.h [moved from Mkfiles/vc/libyasm/config.h with 100% similarity]
yasm/Mkfiles/vc/libyasm/libyasm.dep [moved from Mkfiles/vc/libyasm/libyasm.dep with 100% similarity]
yasm/Mkfiles/vc/libyasm/libyasm.dsp [moved from Mkfiles/vc/libyasm/libyasm.dsp with 100% similarity]
yasm/Mkfiles/vc/libyasm/libyasm.mak [moved from Mkfiles/vc/libyasm/libyasm.mak with 100% similarity]
yasm/Mkfiles/vc/modules/.cvsignore [moved from Mkfiles/vc/modules/.cvsignore with 100% similarity]
yasm/Mkfiles/vc/modules/modules.dep [moved from Mkfiles/vc/modules/modules.dep with 100% similarity]
yasm/Mkfiles/vc/modules/modules.dsp [moved from Mkfiles/vc/modules/modules.dsp with 100% similarity]
yasm/Mkfiles/vc/modules/modules.mak [moved from Mkfiles/vc/modules/modules.mak with 100% similarity]
yasm/Mkfiles/vc/yasm-module.c [moved from Mkfiles/vc/yasm-module.c with 97% similarity]
yasm/Mkfiles/vc/yasm.dep [moved from Mkfiles/vc/yasm.dep with 100% similarity]
yasm/Mkfiles/vc/yasm.dsp [moved from Mkfiles/vc/yasm.dsp with 100% similarity]
yasm/Mkfiles/vc/yasm.dsw [moved from Mkfiles/vc/yasm.dsw with 100% similarity]
yasm/Mkfiles/vc/yasm.mak [moved from Mkfiles/vc/yasm.mak with 100% similarity]
yasm/NEWS [moved from NEWS with 100% similarity]
yasm/README [moved from README with 100% similarity]
yasm/autogen.sh [moved from autogen.sh with 100% similarity]
yasm/check/Makefile.inc [moved from check/Makefile.inc with 100% similarity]
yasm/check/NEWS [moved from check/NEWS with 100% similarity]
yasm/check/README [moved from check/README with 100% similarity]
yasm/check/check.c [moved from check/check.c with 100% similarity]
yasm/check/check.h [moved from check/check.h with 100% similarity]
yasm/check/check_impl.h [moved from check/check_impl.h with 100% similarity]
yasm/check/check_log.c [moved from check/check_log.c with 100% similarity]
yasm/check/check_log.h [moved from check/check_log.h with 100% similarity]
yasm/check/check_msg.c [moved from check/check_msg.c with 100% similarity]
yasm/check/check_msg.h [moved from check/check_msg.h with 100% similarity]
yasm/check/check_print.c [moved from check/check_print.c with 100% similarity]
yasm/check/check_print.h [moved from check/check_print.h with 100% similarity]
yasm/check/check_run.c [moved from check/check_run.c with 100% similarity]
yasm/check/error.c [moved from check/error.c with 100% similarity]
yasm/check/error.h [moved from check/error.h with 100% similarity]
yasm/check/list.c [moved from check/list.c with 100% similarity]
yasm/check/list.h [moved from check/list.h with 100% similarity]
yasm/config/config.guess [moved from config/config.guess with 100% similarity]
yasm/config/config.rpath [moved from config/config.rpath with 100% similarity]
yasm/config/config.sub [moved from config/config.sub with 100% similarity]
yasm/config/ltmain.sh [moved from config/ltmain.sh with 100% similarity]
yasm/config/ylwrap [moved from config/ylwrap with 100% similarity]
yasm/configure.ac [moved from configure.ac with 95% similarity]
yasm/doc/programmer/bitvect/.cvsignore [moved from doc/programmer/bitvect/.cvsignore with 100% similarity]
yasm/doc/programmer/queue/.cvsignore [moved from doc/programmer/queue/.cvsignore with 100% similarity]
yasm/float/gdtoa/Makefile [moved from float/gdtoa/Makefile with 100% similarity]
yasm/float/gdtoa/README [moved from float/gdtoa/README with 100% similarity]
yasm/float/gdtoa/arithchk.c [moved from float/gdtoa/arithchk.c with 100% similarity]
yasm/float/gdtoa/dmisc.c [moved from float/gdtoa/dmisc.c with 100% similarity]
yasm/float/gdtoa/dtoa.c [moved from float/gdtoa/dtoa.c with 100% similarity]
yasm/float/gdtoa/g_Qfmt.c [moved from float/gdtoa/g_Qfmt.c with 100% similarity]
yasm/float/gdtoa/g__fmt.c [moved from float/gdtoa/g__fmt.c with 100% similarity]
yasm/float/gdtoa/g_ddfmt.c [moved from float/gdtoa/g_ddfmt.c with 100% similarity]
yasm/float/gdtoa/g_dfmt.c [moved from float/gdtoa/g_dfmt.c with 100% similarity]
yasm/float/gdtoa/g_ffmt.c [moved from float/gdtoa/g_ffmt.c with 100% similarity]
yasm/float/gdtoa/g_xLfmt.c [moved from float/gdtoa/g_xLfmt.c with 100% similarity]
yasm/float/gdtoa/g_xfmt.c [moved from float/gdtoa/g_xfmt.c with 100% similarity]
yasm/float/gdtoa/gdtoa.c [moved from float/gdtoa/gdtoa.c with 100% similarity]
yasm/float/gdtoa/gdtoa.h [moved from float/gdtoa/gdtoa.h with 100% similarity]
yasm/float/gdtoa/gdtoaimp.h [moved from float/gdtoa/gdtoaimp.h with 100% similarity]
yasm/float/gdtoa/gethex.c [moved from float/gdtoa/gethex.c with 100% similarity]
yasm/float/gdtoa/gmisc.c [moved from float/gdtoa/gmisc.c with 100% similarity]
yasm/float/gdtoa/hd_init.c [moved from float/gdtoa/hd_init.c with 100% similarity]
yasm/float/gdtoa/hexnan.c [moved from float/gdtoa/hexnan.c with 100% similarity]
yasm/float/gdtoa/misc.c [moved from float/gdtoa/misc.c with 100% similarity]
yasm/float/gdtoa/smisc.c [moved from float/gdtoa/smisc.c with 100% similarity]
yasm/float/gdtoa/strtoIQ.c [moved from float/gdtoa/strtoIQ.c with 100% similarity]
yasm/float/gdtoa/strtoId.c [moved from float/gdtoa/strtoId.c with 100% similarity]
yasm/float/gdtoa/strtoIdd.c [moved from float/gdtoa/strtoIdd.c with 100% similarity]
yasm/float/gdtoa/strtoIf.c [moved from float/gdtoa/strtoIf.c with 100% similarity]
yasm/float/gdtoa/strtoIg.c [moved from float/gdtoa/strtoIg.c with 100% similarity]
yasm/float/gdtoa/strtoIx.c [moved from float/gdtoa/strtoIx.c with 100% similarity]
yasm/float/gdtoa/strtoIxL.c [moved from float/gdtoa/strtoIxL.c with 100% similarity]
yasm/float/gdtoa/strtod.c [moved from float/gdtoa/strtod.c with 100% similarity]
yasm/float/gdtoa/strtodI.c [moved from float/gdtoa/strtodI.c with 100% similarity]
yasm/float/gdtoa/strtodg.c [moved from float/gdtoa/strtodg.c with 100% similarity]
yasm/float/gdtoa/strtof.c [moved from float/gdtoa/strtof.c with 100% similarity]
yasm/float/gdtoa/strtopQ.c [moved from float/gdtoa/strtopQ.c with 100% similarity]
yasm/float/gdtoa/strtopd.c [moved from float/gdtoa/strtopd.c with 100% similarity]
yasm/float/gdtoa/strtopdd.c [moved from float/gdtoa/strtopdd.c with 100% similarity]
yasm/float/gdtoa/strtopf.c [moved from float/gdtoa/strtopf.c with 100% similarity]
yasm/float/gdtoa/strtopx.c [moved from float/gdtoa/strtopx.c with 100% similarity]
yasm/float/gdtoa/strtopxL.c [moved from float/gdtoa/strtopxL.c with 100% similarity]
yasm/float/gdtoa/strtorQ.c [moved from float/gdtoa/strtorQ.c with 100% similarity]
yasm/float/gdtoa/strtord.c [moved from float/gdtoa/strtord.c with 100% similarity]
yasm/float/gdtoa/strtordd.c [moved from float/gdtoa/strtordd.c with 100% similarity]
yasm/float/gdtoa/strtorf.c [moved from float/gdtoa/strtorf.c with 100% similarity]
yasm/float/gdtoa/strtorx.c [moved from float/gdtoa/strtorx.c with 100% similarity]
yasm/float/gdtoa/strtorxL.c [moved from float/gdtoa/strtorxL.c with 100% similarity]
yasm/float/gdtoa/sum.c [moved from float/gdtoa/sum.c with 100% similarity]
yasm/float/gdtoa/test/Makefile [moved from float/gdtoa/test/Makefile with 100% similarity]
yasm/float/gdtoa/test/Q.ou0 [moved from float/gdtoa/test/Q.ou0 with 100% similarity]
yasm/float/gdtoa/test/Q.ou1 [moved from float/gdtoa/test/Q.ou1 with 100% similarity]
yasm/float/gdtoa/test/Qtest.c [moved from float/gdtoa/test/Qtest.c with 100% similarity]
yasm/float/gdtoa/test/README [moved from float/gdtoa/test/README with 100% similarity]
yasm/float/gdtoa/test/d.out [moved from float/gdtoa/test/d.out with 100% similarity]
yasm/float/gdtoa/test/dI.out [moved from float/gdtoa/test/dI.out with 100% similarity]
yasm/float/gdtoa/test/dIsi.out [moved from float/gdtoa/test/dIsi.out with 100% similarity]
yasm/float/gdtoa/test/dItest.c [moved from float/gdtoa/test/dItest.c with 100% similarity]
yasm/float/gdtoa/test/dd.out [moved from float/gdtoa/test/dd.out with 100% similarity]
yasm/float/gdtoa/test/ddsi.out [moved from float/gdtoa/test/ddsi.out with 100% similarity]
yasm/float/gdtoa/test/ddtest.c [moved from float/gdtoa/test/ddtest.c with 100% similarity]
yasm/float/gdtoa/test/dt.c [moved from float/gdtoa/test/dt.c with 100% similarity]
yasm/float/gdtoa/test/dtest.c [moved from float/gdtoa/test/dtest.c with 100% similarity]
yasm/float/gdtoa/test/dtst.out [moved from float/gdtoa/test/dtst.out with 100% similarity]
yasm/float/gdtoa/test/f.out [moved from float/gdtoa/test/f.out with 100% similarity]
yasm/float/gdtoa/test/ftest.c [moved from float/gdtoa/test/ftest.c with 100% similarity]
yasm/float/gdtoa/test/getround.c [moved from float/gdtoa/test/getround.c with 100% similarity]
yasm/float/gdtoa/test/rtestnos [moved from float/gdtoa/test/rtestnos with 100% similarity]
yasm/float/gdtoa/test/strtoIdSI.c [moved from float/gdtoa/test/strtoIdSI.c with 100% similarity]
yasm/float/gdtoa/test/strtoIddSI.c [moved from float/gdtoa/test/strtoIddSI.c with 100% similarity]
yasm/float/gdtoa/test/strtodISI.c [moved from float/gdtoa/test/strtodISI.c with 100% similarity]
yasm/float/gdtoa/test/strtodt.c [moved from float/gdtoa/test/strtodt.c with 100% similarity]
yasm/float/gdtoa/test/strtopddSI.c [moved from float/gdtoa/test/strtopddSI.c with 100% similarity]
yasm/float/gdtoa/test/strtorddSI.c [moved from float/gdtoa/test/strtorddSI.c with 100% similarity]
yasm/float/gdtoa/test/testnos [moved from float/gdtoa/test/testnos with 100% similarity]
yasm/float/gdtoa/test/testnos1 [moved from float/gdtoa/test/testnos1 with 100% similarity]
yasm/float/gdtoa/test/testnos3 [moved from float/gdtoa/test/testnos3 with 100% similarity]
yasm/float/gdtoa/test/x.ou0 [moved from float/gdtoa/test/x.ou0 with 100% similarity]
yasm/float/gdtoa/test/x.ou1 [moved from float/gdtoa/test/x.ou1 with 100% similarity]
yasm/float/gdtoa/test/xL.ou0 [moved from float/gdtoa/test/xL.ou0 with 100% similarity]
yasm/float/gdtoa/test/xL.ou1 [moved from float/gdtoa/test/xL.ou1 with 100% similarity]
yasm/float/gdtoa/test/xLtest.c [moved from float/gdtoa/test/xLtest.c with 100% similarity]
yasm/float/gdtoa/test/xQtest.c [moved from float/gdtoa/test/xQtest.c with 100% similarity]
yasm/float/gdtoa/test/xsum0.out [moved from float/gdtoa/test/xsum0.out with 100% similarity]
yasm/float/gdtoa/test/xtest.c [moved from float/gdtoa/test/xtest.c with 100% similarity]
yasm/float/gdtoa/ulp.c [moved from float/gdtoa/ulp.c with 100% similarity]
yasm/float/gdtoa/xsum0.out [moved from float/gdtoa/xsum0.out with 100% similarity]
yasm/float/softfloat/processors/386-GCC.h [moved from float/softfloat/processors/386-GCC.h with 100% similarity]
yasm/float/softfloat/processors/SPARC-GCC.h [moved from float/softfloat/processors/SPARC-GCC.h with 100% similarity]
yasm/float/softfloat/softfloat/README.txt [moved from float/softfloat/softfloat/README.txt with 100% similarity]
yasm/float/softfloat/softfloat/SoftFloat-history.txt [moved from float/softfloat/softfloat/SoftFloat-history.txt with 100% similarity]
yasm/float/softfloat/softfloat/SoftFloat-source.txt [moved from float/softfloat/softfloat/SoftFloat-source.txt with 100% similarity]
yasm/float/softfloat/softfloat/SoftFloat.txt [moved from float/softfloat/softfloat/SoftFloat.txt with 100% similarity]
yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/milieu.h [moved from float/softfloat/softfloat/bits32/386-Win32-GCC/milieu.h with 100% similarity]
yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat-specialize [moved from float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat-specialize with 100% similarity]
yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat.h [moved from float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat.h with 100% similarity]
yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/milieu.h [moved from float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/milieu.h with 100% similarity]
yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat-specialize [moved from float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat-specialize with 100% similarity]
yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat.h [moved from float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat.h with 100% similarity]
yasm/float/softfloat/softfloat/bits32/softfloat-macros [moved from float/softfloat/softfloat/bits32/softfloat-macros with 100% similarity]
yasm/float/softfloat/softfloat/bits32/softfloat.c [moved from float/softfloat/softfloat/bits32/softfloat.c with 100% similarity]
yasm/float/softfloat/softfloat/bits32/templates/milieu.h [moved from float/softfloat/softfloat/bits32/templates/milieu.h with 100% similarity]
yasm/float/softfloat/softfloat/bits32/templates/softfloat-specialize [moved from float/softfloat/softfloat/bits32/templates/softfloat-specialize with 100% similarity]
yasm/float/softfloat/softfloat/bits32/templates/softfloat.h [moved from float/softfloat/softfloat/bits32/templates/softfloat.h with 100% similarity]
yasm/float/softfloat/softfloat/bits32/timesoftfloat.c [moved from float/softfloat/softfloat/bits32/timesoftfloat.c with 100% similarity]
yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/milieu.h [moved from float/softfloat/softfloat/bits64/386-Win32-GCC/milieu.h with 100% similarity]
yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat-specialize [moved from float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat-specialize with 100% similarity]
yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat.h [moved from float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat.h with 100% similarity]
yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/milieu.h [moved from float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/milieu.h with 100% similarity]
yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat-specialize [moved from float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat-specialize with 100% similarity]
yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat.h [moved from float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat.h with 100% similarity]
yasm/float/softfloat/softfloat/bits64/softfloat-macros [moved from float/softfloat/softfloat/bits64/softfloat-macros with 100% similarity]
yasm/float/softfloat/softfloat/bits64/softfloat.c [moved from float/softfloat/softfloat/bits64/softfloat.c with 100% similarity]
yasm/float/softfloat/softfloat/bits64/templates/milieu.h [moved from float/softfloat/softfloat/bits64/templates/milieu.h with 100% similarity]
yasm/float/softfloat/softfloat/bits64/templates/softfloat-specialize [moved from float/softfloat/softfloat/bits64/templates/softfloat-specialize with 100% similarity]
yasm/float/softfloat/softfloat/bits64/templates/softfloat.h [moved from float/softfloat/softfloat/bits64/templates/softfloat.h with 100% similarity]
yasm/float/softfloat/softfloat/bits64/timesoftfloat.c [moved from float/softfloat/softfloat/bits64/timesoftfloat.c with 100% similarity]
yasm/float/softfloat/softfloat/timesoftfloat.txt [moved from float/softfloat/softfloat/timesoftfloat.txt with 100% similarity]
yasm/frontends/Makefile.inc [moved from frontends/Makefile.inc with 100% similarity]
yasm/frontends/yasm/Makefile.inc [moved from frontends/yasm/Makefile.inc with 100% similarity]
yasm/frontends/yasm/yasm-module.c [moved from frontends/yasm/yasm-module.c with 99% similarity]
yasm/frontends/yasm/yasm-module.h [moved from frontends/yasm/yasm-module.h with 100% similarity]
yasm/frontends/yasm/yasm-options.c [moved from frontends/yasm/yasm-options.c with 99% similarity]
yasm/frontends/yasm/yasm-options.h [moved from frontends/yasm/yasm-options.h with 100% similarity]
yasm/frontends/yasm/yasm.c [moved from frontends/yasm/yasm.c with 98% similarity]
yasm/libltdl/.cvsignore [moved from libltdl/.cvsignore with 100% similarity]
yasm/libltdl/COPYING.LIB [moved from libltdl/COPYING.LIB with 100% similarity]
yasm/libltdl/Makefile.am [moved from libltdl/Makefile.am with 100% similarity]
yasm/libltdl/README [moved from libltdl/README with 100% similarity]
yasm/libltdl/ltdl.c [moved from libltdl/ltdl.c with 100% similarity]
yasm/libltdl/ltdl.h [moved from libltdl/ltdl.h with 100% similarity]
yasm/libyasm.h [moved from libyasm.h with 81% similarity]
yasm/libyasm/.cvsignore [moved from libyasm/.cvsignore with 100% similarity]
yasm/libyasm/Makefile.inc [moved from libyasm/Makefile.inc with 100% similarity]
yasm/libyasm/arch.c [moved from libyasm/arch.c with 100% similarity]
yasm/libyasm/arch.h [moved from libyasm/arch.h with 100% similarity]
yasm/libyasm/bc-int.h [moved from libyasm/bc-int.h with 100% similarity]
yasm/libyasm/bitvect.c [moved from libyasm/bitvect.c with 100% similarity]
yasm/libyasm/bitvect.h [moved from libyasm/bitvect.h with 100% similarity]
yasm/libyasm/bytecode.c [moved from libyasm/bytecode.c with 96% similarity]
yasm/libyasm/bytecode.h [moved from libyasm/bytecode.h with 97% similarity]
yasm/libyasm/compat-queue.h [moved from libyasm/compat-queue.h with 100% similarity]
yasm/libyasm/coretype.h [moved from libyasm/coretype.h with 98% similarity]
yasm/libyasm/dbgfmt.h [moved from libyasm/dbgfmt.h with 93% similarity]
yasm/libyasm/errwarn.c [moved from libyasm/errwarn.c with 99% similarity]
yasm/libyasm/errwarn.h [moved from libyasm/errwarn.h with 99% similarity]
yasm/libyasm/expr-int.h [moved from libyasm/expr-int.h with 100% similarity]
yasm/libyasm/expr.c [moved from libyasm/expr.c with 100% similarity]
yasm/libyasm/expr.h [moved from libyasm/expr.h with 100% similarity]
yasm/libyasm/file.c [moved from libyasm/file.c with 100% similarity]
yasm/libyasm/file.h [moved from libyasm/file.h with 100% similarity]
yasm/libyasm/floatnum.c [moved from libyasm/floatnum.c with 100% similarity]
yasm/libyasm/floatnum.h [moved from libyasm/floatnum.h with 100% similarity]
yasm/libyasm/hamt.c [moved from libyasm/hamt.c with 100% similarity]
yasm/libyasm/hamt.h [moved from libyasm/hamt.h with 100% similarity]
yasm/libyasm/intnum.c [moved from libyasm/intnum.c with 99% similarity]
yasm/libyasm/intnum.h [moved from libyasm/intnum.h with 100% similarity]
yasm/libyasm/linemgr.c [moved from libyasm/linemgr.c with 99% similarity]
yasm/libyasm/linemgr.h [moved from libyasm/linemgr.h with 100% similarity]
yasm/libyasm/mergesort.c [moved from libyasm/mergesort.c with 100% similarity]
yasm/libyasm/objfmt.h [moved from libyasm/objfmt.h with 98% similarity]
yasm/libyasm/optimizer.h [moved from libyasm/optimizer.h with 100% similarity]
yasm/libyasm/parser.h [moved from libyasm/parser.h with 100% similarity]
yasm/libyasm/preproc.h [moved from libyasm/preproc.h with 100% similarity]
yasm/libyasm/section.c [moved from libyasm/section.c with 100% similarity]
yasm/libyasm/section.h [moved from libyasm/section.h with 100% similarity]
yasm/libyasm/strcasecmp.c [moved from libyasm/strcasecmp.c with 100% similarity]
yasm/libyasm/strsep.c [moved from libyasm/strsep.c with 100% similarity]
yasm/libyasm/symrec.c [moved from libyasm/symrec.c with 100% similarity]
yasm/libyasm/symrec.h [moved from libyasm/symrec.h with 100% similarity]
yasm/libyasm/tests/Makefile.inc [moved from libyasm/tests/Makefile.inc with 100% similarity]
yasm/libyasm/tests/bitvect_test.c [moved from libyasm/tests/bitvect_test.c with 100% similarity]
yasm/libyasm/tests/bytecode_test.c [moved from libyasm/tests/bytecode_test.c with 100% similarity]
yasm/libyasm/tests/floatnum_test.c [moved from libyasm/tests/floatnum_test.c with 100% similarity]
yasm/libyasm/tests/memexpr_test.c [moved from libyasm/tests/memexpr_test.c with 100% similarity]
yasm/libyasm/util.h [moved from util.h with 97% similarity]
yasm/libyasm/valparam.c [moved from libyasm/valparam.c with 98% similarity]
yasm/libyasm/valparam.h [moved from libyasm/valparam.h with 97% similarity]
yasm/libyasm/xmalloc.c [moved from libyasm/xmalloc.c with 100% similarity]
yasm/libyasm/xstrdup.c [moved from libyasm/xstrdup.c with 100% similarity]
yasm/m4/Makefile.am [moved from m4/Makefile.am with 100% similarity]
yasm/m4/codeset.m4 [moved from m4/codeset.m4 with 100% similarity]
yasm/m4/gettext.m4 [moved from m4/gettext.m4 with 100% similarity]
yasm/m4/glibc21.m4 [moved from m4/glibc21.m4 with 100% similarity]
yasm/m4/iconv.m4 [moved from m4/iconv.m4 with 100% similarity]
yasm/m4/intdiv0.m4 [moved from m4/intdiv0.m4 with 100% similarity]
yasm/m4/inttypes-pri.m4 [moved from m4/inttypes-pri.m4 with 100% similarity]
yasm/m4/inttypes.m4 [moved from m4/inttypes.m4 with 100% similarity]
yasm/m4/inttypes_h.m4 [moved from m4/inttypes_h.m4 with 100% similarity]
yasm/m4/isc-posix.m4 [moved from m4/isc-posix.m4 with 100% similarity]
yasm/m4/lcmessage.m4 [moved from m4/lcmessage.m4 with 100% similarity]
yasm/m4/lib-ld.m4 [moved from m4/lib-ld.m4 with 100% similarity]
yasm/m4/lib-link.m4 [moved from m4/lib-link.m4 with 100% similarity]
yasm/m4/lib-prefix.m4 [moved from m4/lib-prefix.m4 with 100% similarity]
yasm/m4/libtool.m4 [moved from m4/libtool.m4 with 99% similarity]
yasm/m4/longlong.m4 [moved from m4/longlong.m4 with 100% similarity]
yasm/m4/ltdl.m4 [moved from m4/ltdl.m4 with 100% similarity]
yasm/m4/progtest.m4 [moved from m4/progtest.m4 with 100% similarity]
yasm/m4/stdint_h.m4 [moved from m4/stdint_h.m4 with 100% similarity]
yasm/m4/uintmax_t.m4 [moved from m4/uintmax_t.m4 with 100% similarity]
yasm/modules/Makefile.inc [moved from modules/Makefile.inc with 100% similarity]
yasm/modules/arch/Makefile.inc [moved from modules/arch/Makefile.inc with 100% similarity]
yasm/modules/arch/x86/Makefile.inc [moved from modules/arch/x86/Makefile.inc with 91% similarity]
yasm/modules/arch/x86/README [moved from modules/arch/x86/README with 100% similarity]
yasm/modules/arch/x86/tests/Makefile.inc [moved from modules/arch/x86/tests/Makefile.inc with 100% similarity]
yasm/modules/arch/x86/tests/addbyte.asm [moved from modules/arch/x86/tests/addbyte.asm with 100% similarity]
yasm/modules/arch/x86/tests/addbyte.errwarn [moved from modules/arch/x86/tests/addbyte.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/addbyte.hex [moved from modules/arch/x86/tests/addbyte.hex with 100% similarity]
yasm/modules/arch/x86/tests/addrop-err.asm [moved from modules/arch/x86/tests/addrop-err.asm with 100% similarity]
yasm/modules/arch/x86/tests/addrop-err.errwarn [moved from modules/arch/x86/tests/addrop-err.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/addrop.asm [moved from modules/arch/x86/tests/addrop.asm with 100% similarity]
yasm/modules/arch/x86/tests/addrop.errwarn [moved from modules/arch/x86/tests/addrop.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/addrop.hex [moved from modules/arch/x86/tests/addrop.hex with 100% similarity]
yasm/modules/arch/x86/tests/cpubasic-err.asm [moved from modules/arch/x86/tests/cpubasic-err.asm with 100% similarity]
yasm/modules/arch/x86/tests/cpubasic-err.errwarn [moved from modules/arch/x86/tests/cpubasic-err.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/div-err.asm [moved from modules/arch/x86/tests/div-err.asm with 100% similarity]
yasm/modules/arch/x86/tests/div-err.errwarn [moved from modules/arch/x86/tests/div-err.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/effaddr.asm [moved from modules/arch/x86/tests/effaddr.asm with 100% similarity]
yasm/modules/arch/x86/tests/effaddr.errwarn [moved from modules/arch/x86/tests/effaddr.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/effaddr.hex [moved from modules/arch/x86/tests/effaddr.hex with 100% similarity]
yasm/modules/arch/x86/tests/genopcode.asm [moved from modules/arch/x86/tests/genopcode.asm with 100% similarity]
yasm/modules/arch/x86/tests/genopcode.errwarn [moved from modules/arch/x86/tests/genopcode.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/genopcode.hex [moved from modules/arch/x86/tests/genopcode.hex with 100% similarity]
yasm/modules/arch/x86/tests/lds-err.asm [moved from modules/arch/x86/tests/lds-err.asm with 100% similarity]
yasm/modules/arch/x86/tests/lds-err.errwarn [moved from modules/arch/x86/tests/lds-err.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/loopadsz.asm [moved from modules/arch/x86/tests/loopadsz.asm with 100% similarity]
yasm/modules/arch/x86/tests/loopadsz.errwarn [moved from modules/arch/x86/tests/loopadsz.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/loopadsz.hex [moved from modules/arch/x86/tests/loopadsz.hex with 100% similarity]
yasm/modules/arch/x86/tests/mem64-err.asm [moved from modules/arch/x86/tests/mem64-err.asm with 100% similarity]
yasm/modules/arch/x86/tests/mem64-err.errwarn [moved from modules/arch/x86/tests/mem64-err.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/mem64.asm [moved from modules/arch/x86/tests/mem64.asm with 100% similarity]
yasm/modules/arch/x86/tests/mem64.errwarn [moved from modules/arch/x86/tests/mem64.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/mem64.hex [moved from modules/arch/x86/tests/mem64.hex with 100% similarity]
yasm/modules/arch/x86/tests/negequ.asm [moved from modules/arch/x86/tests/negequ.asm with 100% similarity]
yasm/modules/arch/x86/tests/negequ.errwarn [moved from modules/arch/x86/tests/negequ.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/negequ.hex [moved from modules/arch/x86/tests/negequ.hex with 100% similarity]
yasm/modules/arch/x86/tests/nomem64-err.asm [moved from modules/arch/x86/tests/nomem64-err.asm with 100% similarity]
yasm/modules/arch/x86/tests/nomem64-err.errwarn [moved from modules/arch/x86/tests/nomem64-err.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/nomem64.asm [moved from modules/arch/x86/tests/nomem64.asm with 100% similarity]
yasm/modules/arch/x86/tests/nomem64.errwarn [moved from modules/arch/x86/tests/nomem64.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/nomem64.hex [moved from modules/arch/x86/tests/nomem64.hex with 100% similarity]
yasm/modules/arch/x86/tests/opersize.asm [moved from modules/arch/x86/tests/opersize.asm with 100% similarity]
yasm/modules/arch/x86/tests/opersize.errwarn [moved from modules/arch/x86/tests/opersize.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/opersize.hex [moved from modules/arch/x86/tests/opersize.hex with 100% similarity]
yasm/modules/arch/x86/tests/opsize-err.asm [moved from modules/arch/x86/tests/opsize-err.asm with 100% similarity]
yasm/modules/arch/x86/tests/opsize-err.errwarn [moved from modules/arch/x86/tests/opsize-err.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/ret.asm [moved from modules/arch/x86/tests/ret.asm with 100% similarity]
yasm/modules/arch/x86/tests/ret.errwarn [moved from modules/arch/x86/tests/ret.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/ret.hex [moved from modules/arch/x86/tests/ret.hex with 100% similarity]
yasm/modules/arch/x86/tests/segmov.asm [moved from modules/arch/x86/tests/segmov.asm with 100% similarity]
yasm/modules/arch/x86/tests/segmov.errwarn [moved from modules/arch/x86/tests/segmov.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/segmov.hex [moved from modules/arch/x86/tests/segmov.hex with 100% similarity]
yasm/modules/arch/x86/tests/shift.asm [moved from modules/arch/x86/tests/shift.asm with 100% similarity]
yasm/modules/arch/x86/tests/shift.errwarn [moved from modules/arch/x86/tests/shift.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/shift.hex [moved from modules/arch/x86/tests/shift.hex with 100% similarity]
yasm/modules/arch/x86/tests/x86_test.sh [moved from modules/arch/x86/tests/x86_test.sh with 100% similarity]
yasm/modules/arch/x86/tests/x86label.asm [moved from modules/arch/x86/tests/x86label.asm with 100% similarity]
yasm/modules/arch/x86/tests/x86label.errwarn [moved from modules/arch/x86/tests/x86label.errwarn with 100% similarity]
yasm/modules/arch/x86/tests/x86label.hex [moved from modules/arch/x86/tests/x86label.hex with 100% similarity]
yasm/modules/arch/x86/x86arch.c [moved from modules/arch/x86/x86arch.c with 94% similarity]
yasm/modules/arch/x86/x86arch.h [moved from modules/arch/x86/x86arch.h with 94% similarity]
yasm/modules/arch/x86/x86bc.c [moved from modules/arch/x86/x86bc.c with 96% similarity]
yasm/modules/arch/x86/x86expr.c [moved from modules/arch/x86/x86expr.c with 97% similarity]
yasm/modules/arch/x86/x86id.re [moved from modules/arch/x86/x86id.re with 99% similarity]
yasm/modules/dbgfmts/Makefile.inc [moved from modules/dbgfmts/Makefile.inc with 100% similarity]
yasm/modules/dbgfmts/null/Makefile.inc [moved from modules/dbgfmts/null/Makefile.inc with 100% similarity]
yasm/modules/dbgfmts/null/null-dbgfmt.c [moved from modules/dbgfmts/null/null-dbgfmt.c with 91% similarity]
yasm/modules/objfmts/Makefile.inc [moved from modules/objfmts/Makefile.inc with 65% similarity]
yasm/modules/objfmts/bin/Makefile.inc [moved from modules/objfmts/bin/Makefile.inc with 100% similarity]
yasm/modules/objfmts/bin/bin-objfmt.c [moved from modules/objfmts/bin/bin-objfmt.c with 99% similarity]
yasm/modules/objfmts/bin/tests/Makefile.inc [moved from modules/objfmts/bin/tests/Makefile.inc with 100% similarity]
yasm/modules/objfmts/bin/tests/abs.asm [moved from modules/objfmts/bin/tests/abs.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/abs.errwarn [moved from modules/objfmts/bin/tests/abs.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/abs.hex [moved from modules/objfmts/bin/tests/abs.hex with 100% similarity]
yasm/modules/objfmts/bin/tests/bin_test.sh [moved from modules/objfmts/bin/tests/bin_test.sh with 100% similarity]
yasm/modules/objfmts/bin/tests/bintest.asm [moved from modules/objfmts/bin/tests/bintest.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/bintest.errwarn [moved from modules/objfmts/bin/tests/bintest.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/bintest.hex [moved from modules/objfmts/bin/tests/bintest.hex with 100% similarity]
yasm/modules/objfmts/bin/tests/float-err.asm [moved from modules/objfmts/bin/tests/float-err.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/float-err.errwarn [moved from modules/objfmts/bin/tests/float-err.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/float.asm [moved from modules/objfmts/bin/tests/float.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/float.errwarn [moved from modules/objfmts/bin/tests/float.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/float.hex [moved from modules/objfmts/bin/tests/float.hex with 100% similarity]
yasm/modules/objfmts/bin/tests/integer-warn.asm [moved from modules/objfmts/bin/tests/integer-warn.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/integer-warn.errwarn [moved from modules/objfmts/bin/tests/integer-warn.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/integer-warn.hex [moved from modules/objfmts/bin/tests/integer-warn.hex with 100% similarity]
yasm/modules/objfmts/bin/tests/integer.asm [moved from modules/objfmts/bin/tests/integer.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/integer.errwarn [moved from modules/objfmts/bin/tests/integer.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/integer.hex [moved from modules/objfmts/bin/tests/integer.hex with 100% similarity]
yasm/modules/objfmts/bin/tests/reserve-err.asm [moved from modules/objfmts/bin/tests/reserve-err.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/reserve-err.errwarn [moved from modules/objfmts/bin/tests/reserve-err.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/reserve.asm [moved from modules/objfmts/bin/tests/reserve.asm with 100% similarity]
yasm/modules/objfmts/bin/tests/reserve.errwarn [moved from modules/objfmts/bin/tests/reserve.errwarn with 100% similarity]
yasm/modules/objfmts/bin/tests/reserve.hex [moved from modules/objfmts/bin/tests/reserve.hex with 100% similarity]
yasm/modules/objfmts/coff/Makefile.inc [moved from modules/objfmts/coff/Makefile.inc with 100% similarity]
yasm/modules/objfmts/coff/coff-objfmt.c [moved from modules/objfmts/coff/coff-objfmt.c with 74% similarity]
yasm/modules/objfmts/coff/tests/Makefile.inc [moved from modules/objfmts/coff/tests/Makefile.inc with 100% similarity]
yasm/modules/objfmts/coff/tests/coff_test.sh [moved from modules/objfmts/coff/tests/coff_test.sh with 100% similarity]
yasm/modules/objfmts/coff/tests/cofftest.asm [moved from modules/objfmts/coff/tests/cofftest.asm with 100% similarity]
yasm/modules/objfmts/coff/tests/cofftest.c [moved from modules/objfmts/coff/tests/cofftest.c with 100% similarity]
yasm/modules/objfmts/coff/tests/cofftest.errwarn [moved from modules/objfmts/coff/tests/cofftest.errwarn with 100% similarity]
yasm/modules/objfmts/coff/tests/cofftest.hex [moved from modules/objfmts/coff/tests/cofftest.hex with 100% similarity]
yasm/modules/objfmts/dbg/Makefile.inc [moved from modules/objfmts/dbg/Makefile.inc with 100% similarity]
yasm/modules/objfmts/dbg/dbg-objfmt.c [moved from modules/objfmts/dbg/dbg-objfmt.c with 98% similarity]
yasm/modules/objfmts/elf/elf32.c [new file with mode: 0644]
yasm/modules/objfmts/elf/elf32.h [moved from modules/objfmts/elf/elf32.h with 94% similarity]
yasm/modules/objfmts/elf/elf_common.h [moved from modules/objfmts/elf/elf_common.h with 100% similarity]
yasm/modules/objfmts/win32/Makefile.inc [new file with mode: 0644]
yasm/modules/objfmts/win32/tests/Makefile.inc [new file with mode: 0644]
yasm/modules/objfmts/win32/tests/win32_test.sh [new file with mode: 0755]
yasm/modules/objfmts/win32/tests/win32test.asm [new file with mode: 0644]
yasm/modules/objfmts/win32/tests/win32test.c [new file with mode: 0644]
yasm/modules/objfmts/win32/tests/win32test.errwarn [moved from modules/parsers/nasm/tests/equlocal.errwarn with 100% similarity]
yasm/modules/objfmts/win32/tests/win32test.hex [new file with mode: 0644]
yasm/modules/optimizers/Makefile.inc [moved from modules/optimizers/Makefile.inc with 100% similarity]
yasm/modules/optimizers/basic/Makefile.inc [moved from modules/optimizers/basic/Makefile.inc with 100% similarity]
yasm/modules/optimizers/basic/basic-optimizer.c [moved from modules/optimizers/basic/basic-optimizer.c with 99% similarity]
yasm/modules/parsers/Makefile.inc [moved from modules/parsers/Makefile.inc with 100% similarity]
yasm/modules/parsers/nasm/Makefile.inc [moved from modules/parsers/nasm/Makefile.inc with 100% similarity]
yasm/modules/parsers/nasm/nasm-bison.y [moved from modules/parsers/nasm/nasm-bison.y with 99% similarity]
yasm/modules/parsers/nasm/nasm-defs.h [moved from modules/parsers/nasm/nasm-defs.h with 100% similarity]
yasm/modules/parsers/nasm/nasm-parser.c [moved from modules/parsers/nasm/nasm-parser.c with 98% similarity]
yasm/modules/parsers/nasm/nasm-parser.h [moved from modules/parsers/nasm/nasm-parser.h with 100% similarity]
yasm/modules/parsers/nasm/nasm-token.re [moved from modules/parsers/nasm/nasm-token.re with 98% similarity]
yasm/modules/parsers/nasm/tests/Makefile.inc [moved from modules/parsers/nasm/tests/Makefile.inc with 100% similarity]
yasm/modules/parsers/nasm/tests/equlocal.asm [moved from modules/parsers/nasm/tests/equlocal.asm with 100% similarity]
yasm/modules/parsers/nasm/tests/equlocal.errwarn [moved from modules/parsers/nasm/tests/newsect.errwarn with 100% similarity]
yasm/modules/parsers/nasm/tests/equlocal.hex [moved from modules/parsers/nasm/tests/equlocal.hex with 100% similarity]
yasm/modules/parsers/nasm/tests/nasm_test.sh [moved from modules/parsers/nasm/tests/nasm_test.sh with 100% similarity]
yasm/modules/parsers/nasm/tests/newsect.asm [moved from modules/parsers/nasm/tests/newsect.asm with 100% similarity]
yasm/modules/parsers/nasm/tests/newsect.errwarn [moved from po/ChangeLog with 100% similarity]
yasm/modules/parsers/nasm/tests/newsect.hex [moved from modules/parsers/nasm/tests/newsect.hex with 100% similarity]
yasm/modules/preprocs/Makefile.inc [moved from modules/preprocs/Makefile.inc with 100% similarity]
yasm/modules/preprocs/nasm/Makefile.inc [moved from modules/preprocs/nasm/Makefile.inc with 100% similarity]
yasm/modules/preprocs/nasm/macros.pl [moved from modules/preprocs/nasm/macros.pl with 100% similarity]
yasm/modules/preprocs/nasm/nasm-eval.c [moved from modules/preprocs/nasm/nasm-eval.c with 98% similarity]
yasm/modules/preprocs/nasm/nasm-eval.h [moved from modules/preprocs/nasm/nasm-eval.h with 100% similarity]
yasm/modules/preprocs/nasm/nasm-pp.c [moved from modules/preprocs/nasm/nasm-pp.c with 99% similarity]
yasm/modules/preprocs/nasm/nasm-pp.h [moved from modules/preprocs/nasm/nasm-pp.h with 100% similarity]
yasm/modules/preprocs/nasm/nasm-preproc.c [moved from modules/preprocs/nasm/nasm-preproc.c with 100% similarity]
yasm/modules/preprocs/nasm/nasm.h [moved from modules/preprocs/nasm/nasm.h with 100% similarity]
yasm/modules/preprocs/nasm/nasmlib.c [moved from modules/preprocs/nasm/nasmlib.c with 99% similarity]
yasm/modules/preprocs/nasm/nasmlib.h [moved from modules/preprocs/nasm/nasmlib.h with 100% similarity]
yasm/modules/preprocs/nasm/standard.mac [moved from modules/preprocs/nasm/standard.mac with 100% similarity]
yasm/modules/preprocs/raw/Makefile.inc [moved from modules/preprocs/raw/Makefile.inc with 100% similarity]
yasm/modules/preprocs/raw/raw-preproc.c [moved from modules/preprocs/raw/raw-preproc.c with 100% similarity]
yasm/modules/preprocs/yapp/Makefile.inc [moved from modules/preprocs/yapp/Makefile.inc with 100% similarity]
yasm/modules/preprocs/yapp/tests/Makefile.inc [moved from modules/preprocs/yapp/tests/Makefile.inc with 100% similarity]
yasm/modules/preprocs/yapp/tests/comment.asm [moved from modules/preprocs/yapp/tests/comment.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/comment.pre [moved from modules/preprocs/yapp/tests/comment.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/ddefine.asm [moved from modules/preprocs/yapp/tests/ddefine.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/ddefine.pre [moved from modules/preprocs/yapp/tests/ddefine.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/define.asm [moved from modules/preprocs/yapp/tests/define.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/define.pre [moved from modules/preprocs/yapp/tests/define.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/ifdef.asm [moved from modules/preprocs/yapp/tests/ifdef.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/ifdef.pre [moved from modules/preprocs/yapp/tests/ifdef.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/include.asm [moved from modules/preprocs/yapp/tests/include.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/include.pre [moved from modules/preprocs/yapp/tests/include.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/params.asm [moved from modules/preprocs/yapp/tests/params.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/params.pre [moved from modules/preprocs/yapp/tests/params.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/pdefine.asm [moved from modules/preprocs/yapp/tests/pdefine.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/pdefine.pre [moved from modules/preprocs/yapp/tests/pdefine.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/raw.asm [moved from modules/preprocs/yapp/tests/raw.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/raw.pre [moved from modules/preprocs/yapp/tests/raw.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/rdefine.asm [moved from modules/preprocs/yapp/tests/rdefine.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/rdefine.pre [moved from modules/preprocs/yapp/tests/rdefine.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/rinclude.asm [moved from modules/preprocs/yapp/tests/rinclude.asm with 100% similarity]
yasm/modules/preprocs/yapp/tests/rinclude.pre [moved from modules/preprocs/yapp/tests/rinclude.pre with 100% similarity]
yasm/modules/preprocs/yapp/tests/yapp_test.sh [moved from modules/preprocs/yapp/tests/yapp_test.sh with 100% similarity]
yasm/modules/preprocs/yapp/yapp-preproc.c [moved from modules/preprocs/yapp/yapp-preproc.c with 99% similarity]
yasm/modules/preprocs/yapp/yapp-preproc.h [moved from modules/preprocs/yapp/yapp-preproc.h with 100% similarity]
yasm/modules/preprocs/yapp/yapp-token.h [moved from modules/preprocs/yapp/yapp-token.h with 100% similarity]
yasm/modules/preprocs/yapp/yapp-token.l [moved from modules/preprocs/yapp/yapp-token.l with 99% similarity]
yasm/out_test.sh [moved from out_test.sh with 100% similarity]
yasm/po/.cvsignore [moved from po/.cvsignore with 100% similarity]
yasm/po/ChangeLog [new file with mode: 0644]
yasm/po/Makefile.in.in [moved from po/Makefile.in.in with 100% similarity]
yasm/po/Makevars [moved from po/Makevars with 100% similarity]
yasm/po/Makevars.template [moved from po/Makevars.template with 100% similarity]
yasm/po/POTFILES.in [moved from po/POTFILES.in with 100% similarity]
yasm/po/Rules-quot [moved from po/Rules-quot with 100% similarity]
yasm/po/boldquot.sed [moved from po/boldquot.sed with 100% similarity]
yasm/po/en@boldquot.header [moved from po/en@boldquot.header with 100% similarity]
yasm/po/en@quot.header [moved from po/en@quot.header with 100% similarity]
yasm/po/insert-header.sin [moved from po/insert-header.sin with 100% similarity]
yasm/po/quot.sed [moved from po/quot.sed with 100% similarity]
yasm/po/remove-potcdate.sin [moved from po/remove-potcdate.sin with 100% similarity]
yasm/splint.sh [moved from splint.sh with 100% similarity]
yasm/test_hd.pl [moved from test_hd.pl with 100% similarity]
yasm/tests/nasm/binfmt.asm [moved from tests/nasm/binfmt.asm with 100% similarity]
yasm/tests/nasm/binfmt2.asm [moved from tests/nasm/binfmt2.asm with 100% similarity]
yasm/tests/nasm/bits.asm [moved from tests/nasm/bits.asm with 100% similarity]
yasm/tests/nasm/circular1.asm [moved from tests/nasm/circular1.asm with 100% similarity]
yasm/tests/nasm/circular2.asm [moved from tests/nasm/circular2.asm with 100% similarity]
yasm/tests/nasm/circular3.asm [moved from tests/nasm/circular3.asm with 100% similarity]
yasm/tests/nasm/circular4.asm [moved from tests/nasm/circular4.asm with 100% similarity]
yasm/tests/nasm/data.asm [moved from tests/nasm/data.asm with 100% similarity]
yasm/tests/nasm/dir.asm [moved from tests/nasm/dir.asm with 100% similarity]
yasm/tests/nasm/enter.asm [moved from tests/nasm/enter.asm with 100% similarity]
yasm/tests/nasm/equ.asm [moved from tests/nasm/equ.asm with 100% similarity]
yasm/tests/nasm/error1.asm [moved from tests/nasm/error1.asm with 100% similarity]
yasm/tests/nasm/errors.asm [moved from tests/nasm/errors.asm with 100% similarity]
yasm/tests/nasm/first.asm [moved from tests/nasm/first.asm with 100% similarity]
yasm/tests/nasm/fp.asm [moved from tests/nasm/fp.asm with 100% similarity]
yasm/tests/nasm/fp2.asm [moved from tests/nasm/fp2.asm with 100% similarity]
yasm/tests/nasm/global.asm [moved from tests/nasm/global.asm with 100% similarity]
yasm/tests/nasm/jumps.asm [moved from tests/nasm/jumps.asm with 100% similarity]
yasm/tests/nasm/labels.asm [moved from tests/nasm/labels.asm with 100% similarity]
yasm/tests/nasm/labels2.asm [moved from tests/nasm/labels2.asm with 100% similarity]
yasm/tests/nasm/labels3.asm [moved from tests/nasm/labels3.asm with 100% similarity]
yasm/tests/nasm/mem.asm [moved from tests/nasm/mem.asm with 100% similarity]
yasm/tests/nasm/mem2.asm [moved from tests/nasm/mem2.asm with 100% similarity]
yasm/tests/nasm/multiequ.asm [moved from tests/nasm/multiequ.asm with 100% similarity]
yasm/tests/nasm/multiext.asm [moved from tests/nasm/multiext.asm with 100% similarity]
yasm/tests/nasm/multisect.asm [moved from tests/nasm/multisect.asm with 100% similarity]
yasm/tests/nasm/multisect2.asm [moved from tests/nasm/multisect2.asm with 100% similarity]
yasm/tests/nasm/multisect3.asm [moved from tests/nasm/multisect3.asm with 100% similarity]
yasm/tests/nasm/multisect4.asm [moved from tests/nasm/multisect4.asm with 100% similarity]
yasm/tests/nasm/numconst.asm [moved from tests/nasm/numconst.asm with 100% similarity]
yasm/tests/nasm/org.asm [moved from tests/nasm/org.asm with 100% similarity]
yasm/tests/nasm/org2.asm [moved from tests/nasm/org2.asm with 100% similarity]
yasm/tests/nasm/reloc.asm [moved from tests/nasm/reloc.asm with 100% similarity]
yasm/tests/nasm/reloc2.asm [moved from tests/nasm/reloc2.asm with 100% similarity]
yasm/tests/nasm/second.asm [moved from tests/nasm/second.asm with 100% similarity]
yasm/tests/nasm/signed.asm [moved from tests/nasm/signed.asm with 100% similarity]
yasm/tests/nasm/sizes.asm [moved from tests/nasm/sizes.asm with 100% similarity]
yasm/tests/nasm/sizes2.asm [moved from tests/nasm/sizes2.asm with 100% similarity]
yasm/tests/nasm/socket.asm [moved from tests/nasm/socket.asm with 100% similarity]
yasm/tests/nasm/store.asm [moved from tests/nasm/store.asm with 100% similarity]
yasm/tests/nasm/string.asm [moved from tests/nasm/string.asm with 100% similarity]
yasm/tests/nasm/test1.asm [moved from tests/nasm/test1.asm with 100% similarity]
yasm/tests/nasm/times.asm [moved from tests/nasm/times.asm with 100% similarity]
yasm/tests/nasm/vbeaf.asm [moved from tests/nasm/vbeaf.asm with 100% similarity]
yasm/tools/Makefile.inc [moved from tools/Makefile.inc with 100% similarity]
yasm/tools/re2c/CHANGELOG [moved from tools/re2c/CHANGELOG with 100% similarity]
yasm/tools/re2c/Makefile.inc [moved from tools/re2c/Makefile.inc with 100% similarity]
yasm/tools/re2c/NO_WARRANTY [moved from tools/re2c/NO_WARRANTY with 100% similarity]
yasm/tools/re2c/README [moved from tools/re2c/README with 100% similarity]
yasm/tools/re2c/actions.c [moved from tools/re2c/actions.c with 100% similarity]
yasm/tools/re2c/basics.h [moved from tools/re2c/basics.h with 100% similarity]
yasm/tools/re2c/bootstrap/re2c.man [moved from tools/re2c/bootstrap/re2c.man with 100% similarity]
yasm/tools/re2c/bootstrap/scanner.c [moved from tools/re2c/bootstrap/scanner.c with 100% similarity]
yasm/tools/re2c/cleanup.pl [new file with mode: 0755]
yasm/tools/re2c/code.c [moved from tools/re2c/code.c with 100% similarity]
yasm/tools/re2c/dfa.c [moved from tools/re2c/dfa.c with 100% similarity]
yasm/tools/re2c/dfa.h [moved from tools/re2c/dfa.h with 100% similarity]
yasm/tools/re2c/doc/loplas.ps.gz [moved from tools/re2c/doc/loplas.ps.gz with 100% similarity]
yasm/tools/re2c/doc/sample.bib [moved from tools/re2c/doc/sample.bib with 100% similarity]
yasm/tools/re2c/examples/basemmap.c [moved from tools/re2c/examples/basemmap.c with 100% similarity]
yasm/tools/re2c/examples/c.re [moved from tools/re2c/examples/c.re with 100% similarity]
yasm/tools/re2c/examples/cmmap.re [moved from tools/re2c/examples/cmmap.re with 100% similarity]
yasm/tools/re2c/examples/cnokw.re [moved from tools/re2c/examples/cnokw.re with 100% similarity]
yasm/tools/re2c/examples/cunroll.re [moved from tools/re2c/examples/cunroll.re with 100% similarity]
yasm/tools/re2c/examples/modula.re [moved from tools/re2c/examples/modula.re with 100% similarity]
yasm/tools/re2c/examples/rexx/README [moved from tools/re2c/examples/rexx/README with 100% similarity]
yasm/tools/re2c/examples/rexx/rexx.l [moved from tools/re2c/examples/rexx/rexx.l with 100% similarity]
yasm/tools/re2c/examples/rexx/scanio.c [moved from tools/re2c/examples/rexx/scanio.c with 100% similarity]
yasm/tools/re2c/examples/sample.re [moved from tools/re2c/examples/sample.re with 100% similarity]
yasm/tools/re2c/examples/simple.re [moved from tools/re2c/examples/simple.re with 100% similarity]
yasm/tools/re2c/globals.h [moved from tools/re2c/globals.h with 100% similarity]
yasm/tools/re2c/ins.h [moved from tools/re2c/ins.h with 100% similarity]
yasm/tools/re2c/main.c [moved from tools/re2c/main.c with 100% similarity]
yasm/tools/re2c/parse.h [moved from tools/re2c/parse.h with 100% similarity]
yasm/tools/re2c/re.h [moved from tools/re2c/re.h with 100% similarity]
yasm/tools/re2c/re2c-parser.y [moved from tools/re2c/re2c-parser.y with 100% similarity]
yasm/tools/re2c/re2c.1 [moved from tools/re2c/re2c.1 with 100% similarity]
yasm/tools/re2c/scanner.c [moved from tools/re2c/scanner.c with 100% similarity]
yasm/tools/re2c/scanner.h [moved from tools/re2c/scanner.h with 100% similarity]
yasm/tools/re2c/scanner.re [moved from tools/re2c/scanner.re with 100% similarity]
yasm/tools/re2c/substr.c [moved from tools/re2c/substr.c with 100% similarity]
yasm/tools/re2c/substr.h [moved from tools/re2c/substr.h with 100% similarity]
yasm/tools/re2c/token.h [moved from tools/re2c/token.h with 100% similarity]
yasm/tools/re2c/translate.c [moved from tools/re2c/translate.c with 100% similarity]
yasm/util.h [moved from libyasm/util.h with 97% similarity]

diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj
deleted file mode 100644 (file)
index ac01cbc..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-# $IdPath$
-#
-# Ultra-flat Makefile for DJGPP.
-# Does NOT depend on or use configure.
-#
-# Works for simple build but *not* for development (no clean, dist, etc).
-# Also, WARNING, no header dependencies are included!
-#
-# How to compile:
-#  make -fMkfiles/Makefile.dj
-
-CFLAGS=-DHAVE_CONFIG_H -IMkfiles/dj -I. -Isrc -Isrc/arch/x86
-CC=gcc
-
-all: yasm
-
-YASM_BASE_OBJS= \
- src/bytecode.o \
- src/expr.o \
- src/symrec.o \
- src/globals.o \
- src/file.o \
- src/section.o \
- src/arch.o \
- src/objfmt.o \
- src/preproc.o \
- src/parser.o \
- src/intnum.o \
- src/floatnum.o \
- src/hamt.o \
- src/bitvect.o \
- src/valparam.o \
- src/xmalloc.o \
- src/xstrdup.o \
- src/strcasecmp.o
-
-YASM_ARCH_OBJS= \
- src/arch/x86/x86arch.o \
- src/arch/x86/x86bc.o \
- src/arch/x86/x86expr.o
-
-YASM_PARSER_OBJS= \
- src/parsers/nasm/nasm-parser.o \
- nasm-bison.o \
- nasm-token.o
-
-YASM_PREPROC_OBJS= \
- src/preprocs/raw/raw-preproc.o \
- src/preprocs/yapp/yapp-preproc.o \
- yapp-token.o
-
-YASM_OPTIMIZER_OBJS= \
- src/optimizers/basic/basic-optimizer.o
-
-YASM_OBJFMT_OBJS= \
- src/objfmts/dbg/dbg-objfmt.o \
- src/objfmts/bin/bin-objfmt.o
-
-YASM_OBJS= \
- src/main.o \
- src/errwarn.o \
- src/options.o \
- $(YASM_BASE_OBJS) \
- $(YASM_ARCH_OBJS) \
- $(YASM_PARSER_OBJS) \
- $(YASM_PREPROC_OBJS) \
- $(YASM_OPTIMIZER_OBJS) \
- $(YASM_OBJFMT_OBJS) \
- mergesort.o
-
-yasm: $(YASM_OBJS)
-       $(CC) -o yasm $(YASM_OBJS)
-
-.c.o:
-       $(CC) -c $(CFLAGS) -o $@ $<
-
diff --git a/Mkfiles/Makefile.flat b/Mkfiles/Makefile.flat
deleted file mode 100644 (file)
index 8765c9e..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-# $IdPath$
-#
-# Ultra-flat Makefile "prototype" for non-Unix platforms.
-# Does NOT depend on or use configure.
-#
-# Works for simple build but *not* for development (no clean, dist, etc).
-# Also, WARNING, no header dependencies are included!
-#
-# Problem to fix: to simplify this file, we probably want subdir Makefiles
-#  included into this one?  But include directives vary between Make versions.
-# Should bison/flex/perl rules even be included in this if it's not for
-#  development use?
-#
-# NOTE: Needs a valid config.h for the platform being compiled on.
-#
-# This file should be customized to particular platforms by changing CC and
-#  CFLAGS appropriately, along with writing a config.h for the platform.
-
-CFLAGS=-DHAVE_CONFIG_H -IMkfiles -I. -Isrc -Isrc/arch/x86
-CC=gcc
-BISON=bison
-FLEX=flex
-PERL=perl
-
-all: src/yasm
-
-YASM_BASE_OBJS= \
- src/bytecode.o \
- src/expr.o \
- src/symrec.o \
- src/globals.o \
- src/file.o \
- src/section.o \
- src/arch.o \
- src/objfmt.o \
- src/preproc.o \
- src/parser.o \
- src/intnum.o \
- src/floatnum.o \
- src/hamt.o \
- src/bitvect.o \
- src/valparam.o \
- src/xmalloc.o \
- src/xstrdup.o \
- src/strcasecmp.o
-
-YASM_ARCH_OBJS= \
- src/arch/x86/x86arch.o \
- src/arch/x86/x86bc.o \
- src/arch/x86/x86expr.o
-
-YASM_PARSER_OBJS= \
- src/parsers/nasm/nasm-parser.o \
- nasm-bison.o \
- nasm-token.o
-
-YASM_PREPROC_OBJS= \
- src/preprocs/raw/raw-preproc.o \
- src/preprocs/yapp/yapp-preproc.o \
- yapp-token.o
-
-YASM_OPTIMIZER_OBJS= \
- src/optimizers/basic/basic-optimizer.o
-
-YASM_OBJFMT_OBJS= \
- src/objfmts/dbg/dbg-objfmt.o \
- src/objfmts/bin/bin-objfmt.o
-
-YASM_OBJS= \
- src/main.o \
- src/errwarn.o \
- src/options.o \
- $(YASM_BASE_OBJS) \
- $(YASM_ARCH_OBJS) \
- $(YASM_PARSER_OBJS) \
- $(YASM_PREPROC_OBJS) \
- $(YASM_OPTIMIZER_OBJS) \
- $(YASM_OBJFMT_OBJS) \
- mergesort.o
-
-src/yasm: $(YASM_OBJS)
-       $(CC) -o src/yasm $(YASM_OBJS)
-
-# This is broken: it produces an invalid bison.h
-nasm-bison.c: nasm-bison.y
-       $(BISON) -d --name-prefix=nasm_parser_ -o $@ $<
-
-nasm-token.c: nasm-token.l
-       $(FLEX) -Pnasm_parser_ -o$@ $<
-
-nasm-bison.y nasm-token.l: src/arch/x86/instrs.dat src/parsers/nasm/bison.y.in src/parsers/nasm/token.l.in src/parsers/nasm/gen_instr.pl
-       $(PERL) src/parsers/nasm/gen_instr.pl -i src/arch/x86/instrs.dat -t nasm-token.l -g nasm-bison.y
-
-yapp-token.c: src/preprocs/yapp/yapp-token.l
-       $(FLEX) -Pyapp_parser_ -o$@ $<
-
-.c.o:
-       $(CC) -c $(CFLAGS) -o $@ $<
-
diff --git a/Mkfiles/Makefile.vc b/Mkfiles/Makefile.vc
deleted file mode 100644 (file)
index c8bcf58..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-# $IdPath$\r
-#\r
-# Ultra-flat Makefile for Visual C++.\r
-# Does NOT depend on or use configure.\r
-#\r
-# Works for simple build but *not* for development (no clean, dist, etc).\r
-# Also, WARNING, no header dependencies are included!\r
-#\r
-# How to compile:\r
-#  nmake -fMkfiles/Makefile.vc\r
-\r
-CFLAGS=/DHAVE_CONFIG_H /IMkfiles/vc /I. /Isrc /Isrc/arch/x86\r
-CC=cl\r
-\r
-all: yasm.exe\r
-\r
-YASM_BASE_OBJS= \\r
- src/bytecode.obj \\r
- src/expr.obj \\r
- src/symrec.obj \\r
- src/globals.obj \\r
- src/file.obj \\r
- src/section.obj \\r
- src/arch.obj \\r
- src/objfmt.obj \\r
- src/preproc.obj \\r
- src/parser.obj \\r
- src/intnum.obj \\r
- src/floatnum.obj \\r
- src/hamt.obj \\r
- src/bitvect.obj \\r
- src/valparam.obj \\r
- src/xmalloc.obj \\r
- src/xstrdup.obj \\r
- src/strcasecmp.obj\r
-\r
-YASM_ARCH_OBJS= \\r
- src/arch/x86/x86arch.obj \\r
- src/arch/x86/x86bc.obj \\r
- src/arch/x86/x86expr.obj\r
-\r
-YASM_PARSER_OBJS= \\r
- src/parsers/nasm/nasm-parser.obj \\r
- nasm-bison.obj \\r
- nasm-token.obj\r
-\r
-YASM_PREPROC_OBJS= \\r
- src/preprocs/raw/raw-preproc.obj \\r
- src/preprocs/yapp/yapp-preproc.obj \\r
- yapp-token.obj\r
-\r
-YASM_OPTIMIZER_OBJS= \\r
- src/optimizers/basic/basic-optimizer.obj\r
-\r
-YASM_OBJFMT_OBJS= \\r
- src/objfmts/dbg/dbg-objfmt.obj \\r
- src/objfmts/bin/bin-objfmt.obj\r
-\r
-YASM_OBJS= \\r
- src/main.obj \\r
- src/errwarn.obj \\r
- src/options.obj \\r
- $(YASM_BASE_OBJS) \\r
- $(YASM_ARCH_OBJS) \\r
- $(YASM_PARSER_OBJS) \\r
- $(YASM_PREPROC_OBJS) \\r
- $(YASM_OPTIMIZER_OBJS) \\r
- $(YASM_OBJFMT_OBJS) \\r
- mergesort.obj\r
-\r
-yasm.exe: $(YASM_OBJS)\r
-       $(CC) /Feyasm.exe $(YASM_OBJS)\r
-\r
-.c.obj:\r
-       $(CC) /c $(CFLAGS) /Fo$@ $<\r
-\r
diff --git a/tools/re2c/cleanup.pl b/tools/re2c/cleanup.pl
deleted file mode 100755 (executable)
index 7034a46..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/perl
-my @sourcelines = <>;
-my %usedlabel;
-for (@sourcelines) {
-    $usedlabel{"$1:"} = "$1:" if m/goto\s+(yy[0-9]*)\s*;/
-}
-for (@sourcelines) {
-    s/^(yy[0-9]*:)/$usedlabel{$1}/;
-    print;
-}
similarity index 100%
rename from .cvsignore
rename to yasm/.cvsignore
similarity index 100%
rename from .indent.pro
rename to yasm/.indent.pro
similarity index 100%
rename from ABOUT-NLS
rename to yasm/ABOUT-NLS
similarity index 100%
rename from AUTHORS
rename to yasm/AUTHORS
similarity index 100%
rename from COPYING
rename to yasm/COPYING
similarity index 100%
rename from COPYING.LIB-2.0
rename to yasm/COPYING.LIB-2.0
similarity index 100%
rename from ChangeLog
rename to yasm/ChangeLog
similarity index 100%
rename from HACKING
rename to yasm/HACKING
similarity index 100%
rename from INSTALL
rename to yasm/INSTALL
similarity index 68%
rename from Makefile.am
rename to yasm/Makefile.am
index a9381313896e916ae5e4c869d62f34ebe3718b3b..c9d1f21356a6d0afebb6d71b5d883165c826b020 100644 (file)
@@ -40,8 +40,19 @@ EXTRA_DIST += \
        COPYING.LIB-2.0 \
        splint.sh \
        Mkfiles/Makefile.flat \
-       Mkfiles/Makefile.dj Mkfiles/dj/config.h \
-       Mkfiles/Makefile.vc Mkfiles/vc/config.h
+       Mkfiles/Makefile.dj Mkfiles/dj/libyasm/config.h \
+       Mkfiles/vc/yasm-module.c \
+       Mkfiles/vc/yasm.dep \
+       Mkfiles/vc/yasm.dsp \
+       Mkfiles/vc/yasm.dsw \
+       Mkfiles/vc/yasm.mak \
+       Mkfiles/vc/libyasm/config.h \
+       Mkfiles/vc/libyasm/libyasm.dep \
+       Mkfiles/vc/libyasm/libyasm.dsp \
+       Mkfiles/vc/libyasm/libyasm.mak \
+       Mkfiles/vc/modules/modules.dep \
+       Mkfiles/vc/modules/modules.dsp \
+       Mkfiles/vc/modules/modules.mak
 
 # Until this gets fixed in automake
 DISTCLEANFILES = libyasm/stamp-h libyasm/stamp-h[0-9]*
diff --git a/yasm/Mkfiles/Makefile.dj b/yasm/Mkfiles/Makefile.dj
new file mode 100644 (file)
index 0000000..87b6405
--- /dev/null
@@ -0,0 +1,98 @@
+# $IdPath$
+#
+# Ultra-flat Makefile for DJGPP (also works for Cygwin).
+# Does NOT depend on or use configure.
+#
+# Works for simple build but *not* for development (no clean, dist, etc).
+# Also, WARNING, no header dependencies are included!
+#
+# How to compile:
+#  make -fMkfiles/Makefile.dj
+
+CFLAGS=-DHAVE_CONFIG_H -DWIN32 -IMkfiles/dj -I. -Ifrontends/yasm
+CC=gcc
+
+all: yasm
+
+LIBYASM_OBJS= \
+ libyasm/arch.o \
+ libyasm/bitvect.o \
+ libyasm/bytecode.o \
+ libyasm/errwarn.o \
+ libyasm/expr.o \
+ libyasm/file.o \
+ libyasm/floatnum.o \
+ libyasm/hamt.o \
+ libyasm/intnum.o \
+ libyasm/linemgr.o \
+ libyasm/mergesort.o \
+ libyasm/section.o \
+ libyasm/strcasecmp.o \
+ libyasm/strsep.o \
+ libyasm/symrec.o \
+ libyasm/valparam.o \
+ libyasm/xmalloc.o \
+ libyasm/xstrdup.o
+
+MODULES_ARCH_OBJS= \
+ modules/arch/x86/x86arch.o \
+ modules/arch/x86/x86bc.o \
+ modules/arch/x86/x86expr.o \
+ x86id.o
+
+MODULES_DBGFMTS_OBJS= \
+ modules/dbgfmts/null/null-dbgfmt.o
+
+MODULES_OBJFMTS_OBJS= \
+ modules/objfmts/dbg/dbg-objfmt.o \
+ modules/objfmts/bin/bin-objfmt.o \
+ modules/objfmts/coff/coff-objfmt.o
+
+MODULES_OPTIMIZERS_OBJS= \
+ modules/optimizers/basic/basic-optimizer.o
+
+MODULES_PARSERS_OBJS= \
+ modules/parsers/nasm/nasm-parser.o \
+ nasm-bison.o \
+ nasm-token.o
+
+MODULES_PREPROCS_NASM_OBJS= \
+ modules/preprocs/nasm/nasm-eval.o \
+ modules/preprocs/nasm/nasm-pp.o \
+ modules/preprocs/nasm/nasm-preproc.o \
+ modules/preprocs/nasm/nasmlib.o \
+ nasm-macros.o
+
+MODULES_PREPROCS_YAPP_OBJS = \
+ modules/preprocs/yapp/yapp-preproc.o \
+ yapp-token.o
+
+MODULES_PREPROCS_RAW_OBJS = \
+ modules/preprocs/raw/raw-preproc.o \
+
+MODULES_PREPROCS_OBJS = \
+ $(MODULES_PREPROCS_NASM_OBJS) \
+ $(MODULES_PREPROCS_YAPP_OBJS) \
+ $(MODULES_PREPROCS_RAW_OBJS)
+
+MODULES_OBJS = \
+ $(MODULES_ARCH_OBJS) \
+ $(MODULES_DBGFMTS_OBJS) \
+ $(MODULES_OBJFMTS_OBJS) \
+ $(MODULES_OPTIMIZERS_OBJS) \
+ $(MODULES_PARSERS_OBJS) \
+ $(MODULES_PREPROCS_OBJS)
+
+YASM_OBJS= \
+ frontends/yasm/yasm.o \
+ Mkfiles/vc/yasm-module.o \
+ frontends/yasm/yasm-options.o \
+ $(LIBYASM_OBJS) \
+ $(MODULES_OBJS)
+
+yasm: $(YASM_OBJS)
+       $(CC) -o yasm $(YASM_OBJS)
+
+.c.o:
+       $(CC) -c $(CFLAGS) -o $@ $<
+
diff --git a/yasm/Mkfiles/Makefile.flat b/yasm/Mkfiles/Makefile.flat
new file mode 100644 (file)
index 0000000..7ce9c72
--- /dev/null
@@ -0,0 +1,101 @@
+# $IdPath$
+#
+# Ultra-flat Makefile "prototype" for non-Unix platforms.
+# Does NOT depend on or use configure.
+#
+# Works for simple build but *not* for development (no clean, dist, etc).
+# Also, WARNING, no header dependencies are included!
+#
+# NOTE: Needs a valid config.h for the platform being compiled on.
+#
+# This file should be customized to particular platforms by changing CC and
+#  CFLAGS appropriately, along with writing a config.h for the platform and
+#  placing it in a libyasm subdirectory.
+
+CFLAGS=-DHAVE_CONFIG_H -DWIN32 -IMkfiles -I. -Ifrontends/yasm
+CC=gcc
+
+all: yasm
+
+LIBYASM_OBJS= \
+ libyasm/arch.o \
+ libyasm/bitvect.o \
+ libyasm/bytecode.o \
+ libyasm/errwarn.o \
+ libyasm/expr.o \
+ libyasm/file.o \
+ libyasm/floatnum.o \
+ libyasm/hamt.o \
+ libyasm/intnum.o \
+ libyasm/linemgr.o \
+ libyasm/mergesort.o \
+ libyasm/section.o \
+ libyasm/strcasecmp.o \
+ libyasm/strsep.o \
+ libyasm/symrec.o \
+ libyasm/valparam.o \
+ libyasm/xmalloc.o \
+ libyasm/xstrdup.o
+
+MODULES_ARCH_OBJS= \
+ modules/arch/x86/x86arch.o \
+ modules/arch/x86/x86bc.o \
+ modules/arch/x86/x86expr.o \
+ x86id.o
+
+MODULES_DBGFMTS_OBJS= \
+ modules/dbgfmts/null/null-dbgfmt.o
+
+MODULES_OBJFMTS_OBJS= \
+ modules/objfmts/dbg/dbg-objfmt.o \
+ modules/objfmts/bin/bin-objfmt.o \
+ modules/objfmts/coff/coff-objfmt.o
+
+MODULES_OPTIMIZERS_OBJS= \
+ modules/optimizers/basic/basic-optimizer.o
+
+MODULES_PARSERS_OBJS= \
+ modules/parsers/nasm/nasm-parser.o \
+ nasm-bison.o \
+ nasm-token.o
+
+MODULES_PREPROCS_NASM_OBJS= \
+ modules/preprocs/nasm/nasm-eval.o \
+ modules/preprocs/nasm/nasm-pp.o \
+ modules/preprocs/nasm/nasm-preproc.o \
+ modules/preprocs/nasm/nasmlib.o \
+ nasm-macros.o
+
+MODULES_PREPROCS_YAPP_OBJS = \
+ modules/preprocs/yapp/yapp-preproc.o \
+ yapp-token.o
+
+MODULES_PREPROCS_RAW_OBJS = \
+ modules/preprocs/raw/raw-preproc.o \
+
+MODULES_PREPROCS_OBJS = \
+ $(MODULES_PREPROCS_NASM_OBJS) \
+ $(MODULES_PREPROCS_YAPP_OBJS) \
+ $(MODULES_PREPROCS_RAW_OBJS)
+
+MODULES_OBJS = \
+ $(MODULES_ARCH_OBJS) \
+ $(MODULES_DBGFMTS_OBJS) \
+ $(MODULES_OBJFMTS_OBJS) \
+ $(MODULES_OPTIMIZERS_OBJS) \
+ $(MODULES_PARSERS_OBJS) \
+ $(MODULES_PREPROCS_OBJS)
+
+YASM_OBJS= \
+ frontends/yasm/yasm.o \
+ Mkfiles/vc/yasm-module.o \
+ frontends/yasm/yasm-options.o \
+ $(LIBYASM_OBJS) \
+ $(MODULES_OBJS)
+
+yasm: $(YASM_OBJS)
+       $(CC) -o yasm $(YASM_OBJS)
+
+.c.o:
+       $(CC) -c $(CFLAGS) -o $@ $<
+
similarity index 90%
rename from Mkfiles/dj/config.h
rename to yasm/Mkfiles/dj/config.h
index 5a29c4b64f5f781802d731e192dffcd5b8915adf..8ac0485f22a2ce05fbc48fe258f053bc56543e0b 100644 (file)
 /* Define to 1 if you have the <assert.h> header file. */\r
 /* #undef HAVE_ASSERT_H */\r
 \r
-/* Define to 1 if you have the `basename' function. */\r
-#define HAVE_BASENAME 1\r
-\r
 /* Define to 1 if you have the `bcopy' function. */\r
 /* #undef HAVE_BCOPY */\r
 \r
 /* */\r
 /* #undef HAVE_CATGETS */\r
 \r
-/* Define to 1 if you have the `closedir' function. */\r
-/* #undef HAVE_CLOSEDIR */\r
-\r
 /* Define to 1 if you have the <ctype.h> header file. */\r
 #define HAVE_CTYPE_H 1\r
 \r
 /* Define if you have the <limits.h> header file. */\r
 #define HAVE_LIMITS_H 1\r
 \r
-/* Define to 1 if your system has a GNU libc compatible `malloc' function, and\r
-   to 0 otherwise. */\r
+/* Define if your system has a working `malloc' function. */\r
 #define HAVE_MALLOC 1\r
 \r
 /* Define if you have the <malloc.h> header file. */\r
 /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */\r
 /* #undef HAVE_NDIR_H */\r
 \r
-/* Define to 1 if you have the `opendir' function. */\r
-/* #undef HAVE_OPENDIR */\r
-\r
 /* Define if libtool can extract symbol lists from object files. */\r
 /* #undef HAVE_PRELOADED_SYMBOLS */\r
 \r
-/* Define to 1 if you have the `readdir' function. */\r
-/* #undefine HAVE_READDIR */\r
-\r
 /* Define to 1 if you have the `rindex' function. */\r
 /* #undef HAVE_RINDEX */\r
 \r
 #define PACKAGE_NAME "yasm"\r
 \r
 /* Define to the full name and version of this package. */\r
-#define PACKAGE_STRING "yasm CVS"\r
+#define PACKAGE_STRING "yasm `date "+%Y%m%d"`"\r
 \r
 /* Define to the one symbol short name of this package. */\r
 #define PACKAGE_TARNAME "yasm"\r
 \r
 /* Define to the version of this package. */\r
-#define PACKAGE_VERSION "CVS"\r
+#define PACKAGE_VERSION "`date "+%Y%m%d"`"\r
 \r
 /* Define if the C compiler supports function prototypes. */\r
 #define PROTOTYPES 1\r
 /* #undef USE_FORKWAITMSG */\r
 \r
 /* Version number of package */\r
-#define VERSION "CVS"\r
+#define VERSION "0.1.0"\r
 \r
 /* Define if using the dmalloc debugging malloc package */\r
 /* #undef WITH_DMALLOC */\r
 \r
+/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'.\r
+   */\r
+#define YYTEXT_POINTER 1\r
+\r
 /* Make sure we see all GNU extensions. */\r
 /* #undef _GNU_SOURCE */\r
 \r
    if it is not supported. */\r
 /* #undef inline */\r
 \r
-/* Define to rpl_malloc if the replacement function should be used. */\r
-/* #undef malloc */\r
-\r
 /* Define to `int' if <sys/types.h> doesn't define. */\r
 /* #undef pid_t */\r
 \r
diff --git a/yasm/Mkfiles/dj/libyasm/config.h b/yasm/Mkfiles/dj/libyasm/config.h
new file mode 100644 (file)
index 0000000..8ac0485
--- /dev/null
@@ -0,0 +1,336 @@
+/* $IdPath$ */\r
+\r
+/* */\r
+/* #undef ENABLE_NLS */\r
+\r
+/* Define if you have the `abort' function. */\r
+#define HAVE_ABORT 1\r
+\r
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */\r
+/* #undef HAVE_ALLOCA_H */\r
+\r
+/* Define to 1 if you have the `argz_append' function. */\r
+/* #undef HAVE_ARGZ_APPEND */\r
+\r
+/* Define to 1 if you have the `argz_create_sep' function. */\r
+/* #undef HAVE_ARGZ_CREATE_SEP */\r
+\r
+/* Define if you have the <argz.h> header file. */\r
+/* #undef HAVE_ARGZ_H */\r
+\r
+/* Define to 1 if you have the `argz_insert' function. */\r
+/* #undef HAVE_ARGZ_INSERT */\r
+\r
+/* Define to 1 if you have the `argz_next' function. */\r
+/* #undef HAVE_ARGZ_NEXT */\r
+\r
+/* Define to 1 if you have the `argz_stringify' function. */\r
+/* #undef HAVE_ARGZ_STRINGIFY */\r
+\r
+/* Define to 1 if you have the <assert.h> header file. */\r
+/* #undef HAVE_ASSERT_H */\r
+\r
+/* Define to 1 if you have the `bcopy' function. */\r
+/* #undef HAVE_BCOPY */\r
+\r
+/* */\r
+/* #undef HAVE_CATGETS */\r
+\r
+/* Define to 1 if you have the <ctype.h> header file. */\r
+#define HAVE_CTYPE_H 1\r
+\r
+/* Define if the GNU dcgettext() function is already present or preinstalled.\r
+   */\r
+/* #undef HAVE_DCGETTEXT */\r
+\r
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.\r
+   */\r
+/* #undef HAVE_DIRENT_H */\r
+\r
+/* Define if you have the GNU dld library. */\r
+/* #undef HAVE_DLD */\r
+\r
+/* Define to 1 if you have the <dld.h> header file. */\r
+/* #undef HAVE_DLD_H */\r
+\r
+/* Define to 1 if you have the `dlerror' function. */\r
+/* #undef HAVE_DLERROR */\r
+\r
+/* Define to 1 if you have the <dlfcn.h> header file. */\r
+/* #undef HAVE_DLFCN_H */\r
+\r
+/* Define to 1 if you have the <dl.h> header file. */\r
+/* #undef HAVE_DL_H */\r
+\r
+/* Define if you don't have `vprintf' but do have `_doprnt'. */\r
+/* #undef HAVE_DOPRNT */\r
+\r
+/* Define to 1 if you have the <errno.h> header file. */\r
+#define HAVE_ERRNO_H 1\r
+\r
+/* Define to 1 if the system has the type `error_t'. */\r
+/* #undef HAVE_ERROR_T */\r
+\r
+/* Define if you have the `fork' function. */\r
+/* #undef HAVE_FORK */\r
+\r
+/* */\r
+/* #undef HAVE_GETTEXT */\r
+\r
+/* Define if you have the GNU C Library */\r
+/* #undef HAVE_GNU_C_LIBRARY */\r
+\r
+/* Define if you have the iconv() function. */\r
+/* #undef HAVE_ICONV */\r
+\r
+/* Define to 1 if you have the `index' function. */\r
+/* #undef HAVE_INDEX */\r
+\r
+/* Define if you have the <inttypes.h> header file. */\r
+/* #undef HAVE_INTTYPES_H */\r
+\r
+/* */\r
+/* #undef HAVE_LC_MESSAGES */\r
+\r
+/* Define if you have the libdl library or equivalent. */\r
+/* #undef HAVE_LIBDL */\r
+\r
+/* Define if you have the <limits.h> header file. */\r
+#define HAVE_LIMITS_H 1\r
+\r
+/* Define if your system has a working `malloc' function. */\r
+#define HAVE_MALLOC 1\r
+\r
+/* Define if you have the <malloc.h> header file. */\r
+#define HAVE_MALLOC_H 1\r
+\r
+/* Define if you have the `memcpy' function. */\r
+#define HAVE_MEMCPY 1\r
+\r
+/* Define if you have the `memmove' function. */\r
+#define HAVE_MEMMOVE 1\r
+\r
+/* Define if you have the <memory.h> header file. */\r
+#define HAVE_MEMORY_H 1\r
+\r
+/* Define if you have the `mergesort function. */\r
+/* #undef HAVE_MERGESORT */\r
+\r
+/* Define if you have the `msgctl' function. */\r
+/* #undef HAVE_MSGCTL */\r
+\r
+/* Define if you have the `msgget' function. */\r
+/* #undef HAVE_MSGGET */\r
+\r
+/* Define if you have the `msgrcv' function. */\r
+/* #undef HAVE_MSGRCV */\r
+\r
+/* Define if you have the `msgsnd' function. */\r
+/* #undef HAVE_MSGSND */\r
+\r
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */\r
+/* #undef HAVE_NDIR_H */\r
+\r
+/* Define if libtool can extract symbol lists from object files. */\r
+/* #undef HAVE_PRELOADED_SYMBOLS */\r
+\r
+/* Define to 1 if you have the `rindex' function. */\r
+/* #undef HAVE_RINDEX */\r
+\r
+/* Define if you have the shl_load function. */\r
+/* #undef HAVE_SHL_LOAD */\r
+\r
+/* Define if you have the `snprintf' function. */\r
+/* #undef HAVE_SNPRINTF */\r
+\r
+/* Define if you have the <stdint.h> header file. */\r
+#define HAVE_STDINT_H 1\r
+\r
+/* Define to 1 if you have the <stdio.h> header file. */\r
+#define HAVE_STDIO_H 1\r
+\r
+/* Define if you have the <stdlib.h> header file. */\r
+#define HAVE_STDLIB_H 1\r
+\r
+/* */\r
+#define HAVE_STPCPY 1\r
+\r
+/* Define if you have the `strcasecmp' function. */\r
+#define HAVE_STRCASECMP 1\r
+\r
+/* Define if you have the `strchr' function. */\r
+#define HAVE_STRCHR 1\r
+\r
+/* Define to 1 if you have the `strcmp' function. */\r
+#define HAVE_STRCMP 1\r
+\r
+/* Define if you have the `strcmpi' function. */\r
+/* #undef HAVE_STRCMPI */\r
+\r
+/* Define if you have the `strerror' function. */\r
+#define HAVE_STRERROR 1\r
+\r
+/* Define if you have the `stricmp' function. */\r
+/* #undef HAVE_STRICMP */\r
+\r
+/* Define if you have the <strings.h> header file. */\r
+#define HAVE_STRINGS_H 1\r
+\r
+/* Define if you have the <string.h> header file. */\r
+#define HAVE_STRING_H 1\r
+\r
+/* Define if you have the `strncasecmp' function. */\r
+#define HAVE_STRNCASECMP 1\r
+\r
+/* Define if you have the `strrchr' function. */\r
+#define HAVE_STRRCHR 1\r
+\r
+/* Define if you have the `strsep' function. */\r
+#define HAVE_STRSEP 1\r
+\r
+/* Define if you have the <sys/cdefs.h> header file. */\r
+#define HAVE_SYS_CDEFS_H 1\r
+\r
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.\r
+   */\r
+/* #undef HAVE_SYS_DIR_H */\r
+\r
+/* Define to 1 if you have the <sys/dl.h> header file. */\r
+/* #undef HAVE_SYS_DL_H */\r
+\r
+/* Define if you have the <sys/ipc.h> header file. */\r
+/* #undef HAVE_SYS_IPC_H */\r
+\r
+/* Define if you have the <sys/msg.h> header file. */\r
+/* #undef HAVE_SYS_MSG_H */\r
+\r
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.\r
+   */\r
+/* #undef HAVE_SYS_NDIR_H */\r
+\r
+/* Define if you have the <sys/param.h> header file. */\r
+#define HAVE_SYS_PARAM_H 1\r
+\r
+/* Define if you have the <sys/queue.h> header file. */\r
+/* #undef HAVE_SYS_QUEUE_H */\r
+\r
+/* Define if you have the <sys/stat.h> header file. */\r
+#define HAVE_SYS_STAT_H 1\r
+\r
+/* Define if you have the <sys/types.h> header file. */\r
+#define HAVE_SYS_TYPES_H 1\r
+\r
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */\r
+#define HAVE_SYS_WAIT_H 1\r
+\r
+/* Define if you have the `toascii' function. */\r
+#define HAVE_TOASCII 1\r
+\r
+/* Define if you have the <unistd.h> header file. */\r
+#define HAVE_UNISTD_H 1\r
+\r
+/* Define if you have the `vfork' function. */\r
+/* #undef HAVE_VFORK */\r
+\r
+/* Define if you have the <vfork.h> header file. */\r
+/* #undef HAVE_VFORK_H */\r
+\r
+/* Define if you have the vprintf function. */\r
+#define HAVE_VPRINTF 1\r
+\r
+/* Define to 1 if you have the `vsnprintf' function. */\r
+/* #undef HAVE_VSNPRINTF */\r
+\r
+/* Define if you have the `wait' function. */\r
+#define HAVE_WAIT 1\r
+\r
+/* Define if `fork' works. */\r
+/* #undef HAVE_WORKING_FORK */\r
+\r
+/* Define if `vfork' works. */\r
+/* #undef HAVE_WORKING_VFORK */\r
+\r
+/* Define if the OS needs help to load dependent libraries for dlopen(). */\r
+#define LTDL_DLOPEN_DEPLIBS 1\r
+\r
+/* Define to the sub-directory in which libtool stores uninstalled libraries.\r
+   */\r
+#define LTDL_OBJDIR ".libs/"\r
+\r
+/* Define to the name of the environment variable that determines the dynamic\r
+   library search path. */\r
+#define LTDL_SHLIBPATH_VAR "PATH"\r
+\r
+/* Define to the extension used for shared libraries, say, ".so". */\r
+#define LTDL_SHLIB_EXT ".dll"\r
+\r
+/* Define to the system default library search path. */\r
+#define LTDL_SYSSEARCHPATH "/lib:/usr/lib"\r
+\r
+/* Define if dlsym() requires a leading underscode in symbol names. */\r
+/* #undef NEED_USCORE */\r
+\r
+/* Name of package */\r
+#define PACKAGE "yasm"\r
+\r
+/* Define to the address where bug reports for this package should be sent. */\r
+#define PACKAGE_BUGREPORT "bug-yasm@tortall.net"\r
+\r
+/* Define to the full name of this package. */\r
+#define PACKAGE_NAME "yasm"\r
+\r
+/* Define to the full name and version of this package. */\r
+#define PACKAGE_STRING "yasm `date "+%Y%m%d"`"\r
+\r
+/* Define to the one symbol short name of this package. */\r
+#define PACKAGE_TARNAME "yasm"\r
+\r
+/* Define to the version of this package. */\r
+#define PACKAGE_VERSION "`date "+%Y%m%d"`"\r
+\r
+/* Define if the C compiler supports function prototypes. */\r
+#define PROTOTYPES 1\r
+\r
+/* Define if you have the ANSI C header files. */\r
+#define STDC_HEADERS 1\r
+\r
+/* Combined test for fork/wait/msg* */\r
+/* #undef USE_FORKWAITMSG */\r
+\r
+/* Version number of package */\r
+#define VERSION "0.1.0"\r
+\r
+/* Define if using the dmalloc debugging malloc package */\r
+/* #undef WITH_DMALLOC */\r
+\r
+/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'.\r
+   */\r
+#define YYTEXT_POINTER 1\r
+\r
+/* Make sure we see all GNU extensions. */\r
+/* #undef _GNU_SOURCE */\r
+\r
+/* Make sure we see all SVID extensions. */\r
+/* #undef _SVID_SOURCE */\r
+\r
+/* Define like PROTOTYPES; this can be used by system headers. */\r
+#define __PROTOTYPES 1\r
+\r
+/* Define to empty if `const' does not conform to ANSI C. */\r
+/* #undef const */\r
+\r
+/* Define to a type to use for `error_t' if it is not otherwise available. */\r
+#define error_t int\r
+\r
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing\r
+   if it is not supported. */\r
+/* #undef inline */\r
+\r
+/* Define to `int' if <sys/types.h> doesn't define. */\r
+/* #undef pid_t */\r
+\r
+/* Define to `unsigned' if <sys/types.h> doesn't define. */\r
+/* #undef size_t */\r
+\r
+/* Define as `fork' if `vfork' does not work. */\r
+/* #undef vfork */\r
similarity index 100%
rename from Mkfiles/vc/config.h
rename to yasm/Mkfiles/vc/config.h
similarity index 97%
rename from Mkfiles/vc/yasm-module.c
rename to yasm/Mkfiles/vc/yasm-module.c
index b1a3da725a7b2e3636d873f079f1c59c15a8b2ac..319acd7b13a87c02f1970729f1d9efe25a24f627 100644 (file)
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #include "yasm-module.h"
@@ -42,6 +42,7 @@ extern int yasm_x86_LTX_mode_bits;
 extern yasm_dbgfmt yasm_null_LTX_dbgfmt;
 extern yasm_objfmt yasm_bin_LTX_objfmt;
 extern yasm_objfmt yasm_coff_LTX_objfmt;
+extern yasm_objfmt yasm_win32_LTX_objfmt;
 extern yasm_objfmt yasm_dbg_LTX_objfmt;
 extern yasm_optimizer yasm_basic_LTX_optimizer;
 extern yasm_parser yasm_nasm_LTX_parser;
@@ -55,6 +56,7 @@ static module modules[] = {
     {"null", "dbgfmt", &yasm_null_LTX_dbgfmt},
     {"bin",  "objfmt", &yasm_bin_LTX_objfmt},
     {"coff", "objfmt", &yasm_coff_LTX_objfmt},
+    {"win32", "objfmt", &yasm_win32_LTX_objfmt},
     {"dbg", "objfmt", &yasm_dbg_LTX_objfmt},
     {"basic", "optimizer", &yasm_basic_LTX_optimizer},
     {"nasm", "parser", &yasm_nasm_LTX_parser},
similarity index 100%
rename from Mkfiles/vc/yasm.dep
rename to yasm/Mkfiles/vc/yasm.dep
similarity index 100%
rename from Mkfiles/vc/yasm.dsp
rename to yasm/Mkfiles/vc/yasm.dsp
similarity index 100%
rename from Mkfiles/vc/yasm.dsw
rename to yasm/Mkfiles/vc/yasm.dsw
similarity index 100%
rename from Mkfiles/vc/yasm.mak
rename to yasm/Mkfiles/vc/yasm.mak
diff --git a/NEWS b/yasm/NEWS
similarity index 100%
rename from NEWS
rename to yasm/NEWS
similarity index 100%
rename from README
rename to yasm/README
similarity index 100%
rename from autogen.sh
rename to yasm/autogen.sh
similarity index 100%
rename from check/Makefile.inc
rename to yasm/check/Makefile.inc
similarity index 100%
rename from check/NEWS
rename to yasm/check/NEWS
similarity index 100%
rename from check/README
rename to yasm/check/README
similarity index 100%
rename from check/check.c
rename to yasm/check/check.c
similarity index 100%
rename from check/check.h
rename to yasm/check/check.h
similarity index 100%
rename from check/check_impl.h
rename to yasm/check/check_impl.h
similarity index 100%
rename from check/check_log.c
rename to yasm/check/check_log.c
similarity index 100%
rename from check/check_log.h
rename to yasm/check/check_log.h
similarity index 100%
rename from check/check_msg.c
rename to yasm/check/check_msg.c
similarity index 100%
rename from check/check_msg.h
rename to yasm/check/check_msg.h
similarity index 100%
rename from check/check_print.c
rename to yasm/check/check_print.c
similarity index 100%
rename from check/check_print.h
rename to yasm/check/check_print.h
similarity index 100%
rename from check/check_run.c
rename to yasm/check/check_run.c
similarity index 100%
rename from check/error.c
rename to yasm/check/error.c
similarity index 100%
rename from check/error.h
rename to yasm/check/error.h
similarity index 100%
rename from check/list.c
rename to yasm/check/list.c
similarity index 100%
rename from check/list.h
rename to yasm/check/list.h
similarity index 100%
rename from config/config.guess
rename to yasm/config/config.guess
similarity index 100%
rename from config/config.rpath
rename to yasm/config/config.rpath
similarity index 100%
rename from config/config.sub
rename to yasm/config/config.sub
similarity index 100%
rename from config/ltmain.sh
rename to yasm/config/ltmain.sh
similarity index 100%
rename from config/ylwrap
rename to yasm/config/ylwrap
similarity index 95%
rename from configure.ac
rename to yasm/configure.ac
index fa37052f6f35e2a41b606953ca07a9a8d85c079a..99c2e515e2f9feb077505e2e03f9b84e4a80d255 100644 (file)
@@ -162,7 +162,7 @@ if test "$USE_MAINTAINER_MODE" = "yes"; then
 
   # Enable more warnings
   if test "$GCC" = "yes"; then
-    MORE_CFLAGS="$MORE_CFLAGS -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings"
+    MORE_CFLAGS="$MORE_CFLAGS -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wconversion -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wwrite-strings"
   fi
 
   # Require Perl
@@ -216,7 +216,7 @@ fi
 # Turn warnings into errors
 if test "$warnerror" = "yes"; then
   if test "$GCC" = "yes"; then
-    MORE_CFLAGS="$MORE_CFLAGS -Werror"
+    MORE_CFLAGS="$MORE_CFLAGS -Wno-conversion -Werror"
   fi
 fi
 
similarity index 100%
rename from float/gdtoa/README
rename to yasm/float/gdtoa/README
similarity index 100%
rename from float/gdtoa/dmisc.c
rename to yasm/float/gdtoa/dmisc.c
similarity index 100%
rename from float/gdtoa/dtoa.c
rename to yasm/float/gdtoa/dtoa.c
similarity index 100%
rename from float/gdtoa/gdtoa.c
rename to yasm/float/gdtoa/gdtoa.c
similarity index 100%
rename from float/gdtoa/gdtoa.h
rename to yasm/float/gdtoa/gdtoa.h
similarity index 100%
rename from float/gdtoa/gmisc.c
rename to yasm/float/gdtoa/gmisc.c
similarity index 100%
rename from float/gdtoa/misc.c
rename to yasm/float/gdtoa/misc.c
similarity index 100%
rename from float/gdtoa/smisc.c
rename to yasm/float/gdtoa/smisc.c
similarity index 100%
rename from float/gdtoa/sum.c
rename to yasm/float/gdtoa/sum.c
similarity index 100%
rename from float/gdtoa/ulp.c
rename to yasm/float/gdtoa/ulp.c
similarity index 99%
rename from frontends/yasm/yasm-module.c
rename to yasm/frontends/yasm/yasm-module.c
index 432b23582f29d03a617f2c32ad834a15152c5349..cfe19d53003a829e018c6364ccc0c9cf358b39d2 100644 (file)
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #include "ltdl.h"
similarity index 99%
rename from frontends/yasm/yasm-options.c
rename to yasm/frontends/yasm/yasm-options.c
index fd8ba56019324996e12377de1aa9fe6c2d8c3a5c..5b309acb35767c2bc3f7f4ea8d1c64790ddaeefa 100644 (file)
@@ -28,7 +28,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #include "yasm-options.h"
similarity index 98%
rename from frontends/yasm/yasm.c
rename to yasm/frontends/yasm/yasm.c
index 6bd6e46d52cdc218361ed22f7e33acf6bbd06428..1463a0660dd3d88a0b5afd71d8d47b484df8e2d3 100644 (file)
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #ifndef WIN32
 # define YASM_MODULE_PATH_ENV  "YASM_MODULE_PATH"
 #endif
 
+#ifndef WIN32
+extern const lt_dlsymlist lt_preloaded_symbols[];
+#endif
+
 /* Preprocess-only buffer size */
 #define PREPROC_BUF_SIZE    16384
 
@@ -164,7 +168,7 @@ main(int argc, char *argv[])
 #endif
 
     /* Initialize preloaded symbol lookup table. */
-    LTDL_SET_PRELOADED_SYMBOLS();
+    lt_dlpreload_default(lt_preloaded_symbols);
 
     /* Initialize libltdl. */
     errors = lt_dlinit();
@@ -430,7 +434,8 @@ main(int argc, char *argv[])
     }
 
     /* Write the object file */
-    cur_objfmt->output(obj?obj:stderr, sections);
+    cur_objfmt->output(obj?obj:stderr, sections,
+                      strcmp(cur_dbgfmt->keyword, "null"));
 
     /* Close object file */
     if (obj)
similarity index 100%
rename from libltdl/.cvsignore
rename to yasm/libltdl/.cvsignore
similarity index 100%
rename from libltdl/COPYING.LIB
rename to yasm/libltdl/COPYING.LIB
similarity index 100%
rename from libltdl/Makefile.am
rename to yasm/libltdl/Makefile.am
similarity index 100%
rename from libltdl/README
rename to yasm/libltdl/README
similarity index 100%
rename from libltdl/ltdl.c
rename to yasm/libltdl/ltdl.c
similarity index 100%
rename from libltdl/ltdl.h
rename to yasm/libltdl/ltdl.h
similarity index 81%
rename from libyasm.h
rename to yasm/libyasm.h
index 9206f279b444a8cbf1763a9867cba78c13a076ce..74fa288de30f350dbca76bd5b163619f2b0c5e0a 100644 (file)
--- a/libyasm.h
  *                    (used when compiling the library itself)
  */
 
-#include "libyasm/util.h"
-#include "libyasm/linemgr.h"
+#include <libyasm/util.h>
+#include <libyasm/linemgr.h>
 
-#include "libyasm/errwarn.h"
-#include "libyasm/intnum.h"
-#include "libyasm/floatnum.h"
-#include "libyasm/expr.h"
-#include "libyasm/symrec.h"
+#include <libyasm/errwarn.h>
+#include <libyasm/intnum.h>
+#include <libyasm/floatnum.h>
+#include <libyasm/expr.h>
+#include <libyasm/symrec.h>
 
-#include "libyasm/bytecode.h"
-#include "libyasm/section.h"
+#include <libyasm/bytecode.h>
+#include <libyasm/section.h>
 
-#include "libyasm/arch.h"
-#include "libyasm/dbgfmt.h"
-#include "libyasm/objfmt.h"
-#include "libyasm/optimizer.h"
-#include "libyasm/parser.h"
-#include "libyasm/preproc.h"
+#include <libyasm/arch.h>
+#include <libyasm/dbgfmt.h>
+#include <libyasm/objfmt.h>
+#include <libyasm/optimizer.h>
+#include <libyasm/parser.h>
+#include <libyasm/preproc.h>
 
 #ifdef YASM_INTERNAL
 #ifdef YASM_BC_INTERNAL
-#include "libyasm/bc-int.h"
+#include <libyasm/bc-int.h>
 #endif
 #ifdef YASM_EXPR_INTERNAL
-#include "libyasm/expr-int.h"
+#include <libyasm/expr-int.h>
 #endif
-#include "libyasm/file.h"
-#include "libyasm/hamt.h"
-#include "libyasm/bitvect.h"
+#include <libyasm/file.h>
+#include <libyasm/hamt.h>
+#include <libyasm/bitvect.h>
 #endif
 
 #endif
similarity index 100%
rename from libyasm/.cvsignore
rename to yasm/libyasm/.cvsignore
similarity index 100%
rename from libyasm/arch.c
rename to yasm/libyasm/arch.c
similarity index 100%
rename from libyasm/arch.h
rename to yasm/libyasm/arch.h
similarity index 100%
rename from libyasm/bc-int.h
rename to yasm/libyasm/bc-int.h
similarity index 100%
rename from libyasm/bitvect.c
rename to yasm/libyasm/bitvect.c
similarity index 100%
rename from libyasm/bitvect.h
rename to yasm/libyasm/bitvect.h
similarity index 96%
rename from libyasm/bytecode.c
rename to yasm/libyasm/bytecode.c
index 808677e77111b3b4549ad6c9877657b91aee6a5c..0f102b5260afa457f30d4e66301bd9120feac13d 100644 (file)
@@ -137,7 +137,7 @@ yasm_ea_get_disp(const yasm_effaddr *ptr)
 }
 
 void
-yasm_ea_set_len(yasm_effaddr *ptr, unsigned char len)
+yasm_ea_set_len(yasm_effaddr *ptr, unsigned int len)
 {
     if (!ptr)
        return;
@@ -146,16 +146,16 @@ yasm_ea_set_len(yasm_effaddr *ptr, unsigned char len)
      * an explicit override, where we expect the user knows what they're doing.
      */
 
-    ptr->len = len;
+    ptr->len = (unsigned char)len;
 }
 
 void
-yasm_ea_set_nosplit(yasm_effaddr *ptr, unsigned char nosplit)
+yasm_ea_set_nosplit(yasm_effaddr *ptr, unsigned int nosplit)
 {
     if (!ptr)
        return;
 
-    ptr->nosplit = nosplit;
+    ptr->nosplit = (unsigned char)nosplit;
 }
 
 /*@-nullstate@*/
@@ -212,7 +212,7 @@ yasm_bc_new_common(yasm_bytecode_type type, size_t size, unsigned long lindex)
 }
 
 yasm_bytecode *
-yasm_bc_new_data(yasm_datavalhead *datahead, unsigned char size,
+yasm_bc_new_data(yasm_datavalhead *datahead, unsigned int size,
                 unsigned long lindex)
 {
     bytecode_data *data;
@@ -221,13 +221,13 @@ yasm_bc_new_data(yasm_datavalhead *datahead, unsigned char size,
        yasm_bc_new_common(YASM_BC__DATA, sizeof(bytecode_data), lindex);
 
     data->datahead = *datahead;
-    data->size = size;
+    data->size = (unsigned char)size;
 
     return (yasm_bytecode *)data;
 }
 
 yasm_bytecode *
-yasm_bc_new_reserve(yasm_expr *numitems, unsigned char itemsize,
+yasm_bc_new_reserve(yasm_expr *numitems, unsigned int itemsize,
                    unsigned long lindex)
 {
     bytecode_reserve *reserve;
@@ -238,7 +238,7 @@ yasm_bc_new_reserve(yasm_expr *numitems, unsigned char itemsize,
     /*@-mustfree@*/
     reserve->numitems = numitems;
     /*@=mustfree@*/
-    reserve->itemsize = itemsize;
+    reserve->itemsize = (unsigned char)itemsize;
 
     return (yasm_bytecode *)reserve;
 }
@@ -340,7 +340,7 @@ yasm_bc_delete(yasm_bytecode *bc)
                    N_("objfmt can't handle its own objfmt data bytecode"));
            break;
        default:
-           if (bc->type < cur_arch->bc.type_max)
+           if ((unsigned int)bc->type < (unsigned int)cur_arch->bc.type_max)
                cur_arch->bc.bc_delete(bc);
            else
                yasm_internal_error(N_("Unknown bytecode type"));
@@ -414,7 +414,7 @@ yasm_bc_print(FILE *f, int indent_level, const yasm_bytecode *bc)
                fprintf(f, "%*sUNKNOWN\n", indent_level, "");
            break;
        default:
-           if (bc->type < cur_arch->bc.type_max)
+           if ((unsigned int)bc->type < (unsigned int)cur_arch->bc.type_max)
                cur_arch->bc.bc_print(f, indent_level, bc);
            else
                fprintf(f, "%*s_Unknown_\n", indent_level, "");
@@ -637,7 +637,7 @@ yasm_bc_resolve(yasm_bytecode *bc, int save, const yasm_section *sect,
            yasm_internal_error(N_("resolving objfmt data bytecode?"));
            /*break;*/
        default:
-           if (bc->type < cur_arch->bc.type_max)
+           if ((unsigned int)bc->type < (unsigned int)cur_arch->bc.type_max)
                retval = cur_arch->bc.bc_resolve(bc, save, sect,
                                                 calc_bc_dist);
            else
@@ -676,7 +676,7 @@ yasm_bc_resolve(yasm_bytecode *bc, int save, const yasm_section *sect,
 
 static int
 bc_tobytes_data(bytecode_data *bc_data, unsigned char **bufp,
-               const yasm_section *sect, const yasm_bytecode *bc, void *d,
+               const yasm_section *sect, yasm_bytecode *bc, void *d,
                yasm_output_expr_func output_expr)
     /*@sets **bufp@*/
 {
@@ -691,7 +691,8 @@ bc_tobytes_data(bytecode_data *bc_data, unsigned char **bufp,
                break;
            case DV_EXPR:
                if (output_expr(&dv->data.expn, bufp, bc_data->size,
-                               *bufp-bufp_orig, sect, bc, 0, d))
+                               (unsigned long)(*bufp-bufp_orig), sect, bc, 0,
+                               d))
                    return 1;
                break;
            case DV_STRING:
@@ -834,7 +835,7 @@ yasm_bc_tobytes(yasm_bytecode *bc, unsigned char *buf, unsigned long *bufsize,
                    N_("Have objfmt data bytecode but no way to output it"));
            break;
        default:
-           if (bc->type < cur_arch->bc.type_max)
+           if ((unsigned int)bc->type < (unsigned int)cur_arch->bc.type_max)
                error = cur_arch->bc.bc_tobytes(bc, &destbuf, sect, d,
                                                output_expr);
            else
similarity index 97%
rename from libyasm/bytecode.h
rename to yasm/libyasm/bytecode.h
index 276633d576561201a9b05f9acc953e02d28efc36..30570221c7c6ac685ae4451f5b62aa38f75dfc54 100644 (file)
@@ -57,8 +57,8 @@ void yasm_bc_initialize(yasm_arch *a);
 /*@only@*/ yasm_immval *yasm_imm_new_expr(/*@keep@*/ yasm_expr *e);
 
 /*@observer@*/ const yasm_expr *yasm_ea_get_disp(const yasm_effaddr *ea);
-void yasm_ea_set_len(yasm_effaddr *ea, unsigned char len);
-void yasm_ea_set_nosplit(yasm_effaddr *ea, unsigned char nosplit);
+void yasm_ea_set_len(yasm_effaddr *ea, unsigned int len);
+void yasm_ea_set_nosplit(yasm_effaddr *ea, unsigned int nosplit);
 void yasm_ea_delete(/*@only@*/ yasm_effaddr *ea);
 void yasm_ea_print(FILE *f, int indent_level, const yasm_effaddr *ea);
 
@@ -68,10 +68,10 @@ void yasm_bc_set_multiple(yasm_bytecode *bc, /*@keep@*/ yasm_expr *e);
                                             size_t datasize,
                                             unsigned long lindex);
 /*@only@*/ yasm_bytecode *yasm_bc_new_data(yasm_datavalhead *datahead,
-                                          unsigned char size,
+                                          unsigned int size,
                                           unsigned long lindex);
 /*@only@*/ yasm_bytecode *yasm_bc_new_reserve(/*@only@*/ yasm_expr *numitems,
-                                             unsigned char itemsize,
+                                             unsigned int itemsize,
                                              unsigned long lindex);
 /*@only@*/ yasm_bytecode *yasm_bc_new_incbin
     (/*@only@*/ char *filename, /*@only@*/ /*@null@*/ yasm_expr *start,
similarity index 98%
rename from libyasm/coretype.h
rename to yasm/libyasm/coretype.h
index 75d9f88da55c49e998251d439522991b3a1f5e4d..3cd2b5bc9a053a02961c1a23e42b6b6789190f3d 100644 (file)
@@ -119,7 +119,7 @@ typedef /*@null@*/ yasm_intnum * (*yasm_calc_bc_dist_func)
 typedef int (*yasm_output_expr_func)
     (yasm_expr **ep, unsigned char **bufp, unsigned long valsize,
      unsigned long offset, /*@observer@*/ const yasm_section *sect,
-     /*@observer@*/ const yasm_bytecode *bc, int rel, /*@null@*/ void *d)
+     yasm_bytecode *bc, int rel, /*@null@*/ void *d)
     /*@uses *ep@*/ /*@sets **bufp@*/;
 
 /* Converts a objfmt data bytecode into its byte representation.  Usually
similarity index 93%
rename from libyasm/dbgfmt.h
rename to yasm/libyasm/dbgfmt.h
index d3467689e5fbf588f8c6149176126424ec51acff..14db4b87b8a021a3bc8a349800aef9f267ab05e3 100644 (file)
@@ -39,12 +39,16 @@ struct yasm_dbgfmt {
      * format functions.  The filenames are provided solely for informational
      * purposes.  May be NULL if not needed by the debug format.
      */
-    void (*initialize) (const char *in_filename, const char *obj_filename);
+    void (*initialize) (const char *in_filename, const char *obj_filename,
+                       yasm_objfmt *of);
 
     /* Cleans up anything allocated by initialize.
      * May be NULL if not needed by the debug format.
      */
     void (*cleanup) (void);
+
+    /* DEBUG directive support. */
+    void (*directive) (yasm_valparamhead *valparams, unsigned long lindex);
 };
 
 #endif
similarity index 99%
rename from libyasm/errwarn.c
rename to yasm/libyasm/errwarn.c
index ac30639cc97b6e620a0d49ff9b4a7a015fd3d28e..3156b8fcc952bb11dc01b12bc8447ae83d1a7430 100644 (file)
@@ -122,7 +122,7 @@ yasm_errwarn_cleanup(void)
  * standard cat(1) convention for unprintable characters.
  */
 char *
-yasm__conv_unprint(char ch)
+yasm__conv_unprint(int ch)
 {
     int pos = 0;
 
similarity index 99%
rename from libyasm/errwarn.h
rename to yasm/libyasm/errwarn.h
index dd46adc8934481ef292edf531becb6f558d184da..e706b8b0a5c2f50192026deb49d0db235712e7a1 100644 (file)
@@ -91,7 +91,7 @@ void yasm_errwarn_output_all
 
 #ifdef YASM_INTERNAL
 /* Convert a possibly unprintable character into a printable string. */
-char *yasm__conv_unprint(char ch);
+char *yasm__conv_unprint(int ch);
 #endif
 
 /* Map to gettext() if gettext is being used. */
similarity index 100%
rename from libyasm/expr-int.h
rename to yasm/libyasm/expr-int.h
similarity index 100%
rename from libyasm/expr.c
rename to yasm/libyasm/expr.c
similarity index 100%
rename from libyasm/expr.h
rename to yasm/libyasm/expr.h
similarity index 100%
rename from libyasm/file.c
rename to yasm/libyasm/file.c
similarity index 100%
rename from libyasm/file.h
rename to yasm/libyasm/file.h
similarity index 100%
rename from libyasm/floatnum.c
rename to yasm/libyasm/floatnum.c
similarity index 100%
rename from libyasm/floatnum.h
rename to yasm/libyasm/floatnum.h
similarity index 100%
rename from libyasm/hamt.c
rename to yasm/libyasm/hamt.c
similarity index 100%
rename from libyasm/hamt.h
rename to yasm/libyasm/hamt.h
similarity index 99%
rename from libyasm/intnum.c
rename to yasm/libyasm/intnum.c
index 26312a48f33ddf171493f5ff50257e137e56f277..81b46d59c8fa76ffdc40837d7f4b1c26654f461a 100644 (file)
@@ -602,12 +602,12 @@ yasm_intnum_check_size(const yasm_intnum *intn, size_t size, int is_signed)
                    int retval;
 
                    BitVector_Negate(abs_bv, intn->val.bv);
-                   retval = Set_Max(abs_bv) < size*8;
+                   retval = Set_Max(abs_bv) < (long)(size*8);
 
                    BitVector_Destroy(abs_bv);
                    return retval;
                } else
-                   return (Set_Max(intn->val.bv) < size*8);
+                   return (Set_Max(intn->val.bv) < (long)(size*8));
        }
     } else {
        switch (intn->type) {
@@ -627,7 +627,7 @@ yasm_intnum_check_size(const yasm_intnum *intn, size_t size, int is_signed)
                if (size >= 10)
                    return 1;
                else
-                   return (Set_Max(intn->val.bv) < size*8);
+                   return (Set_Max(intn->val.bv) < (long)(size*8));
        }
     }
     return 0;
similarity index 100%
rename from libyasm/intnum.h
rename to yasm/libyasm/intnum.h
similarity index 99%
rename from libyasm/linemgr.c
rename to yasm/libyasm/linemgr.c
index df6beac2f167dadf52c4ae9356346bc8cc6c1e17..1983ad6d750d737f12f354ad86352e9575d5da82 100644 (file)
@@ -152,7 +152,7 @@ yasm_std_linemgr_cleanup(void)
            line_index_assoc_data_raw_head *adrh =
                &line_index_assoc_data_array[i];
            if (adrh->delete_func && adrh->vector) {
-               int j;
+               unsigned int j;
                for (j=0; j<adrh->size; j++) {
                    if (adrh->vector[j])
                        adrh->delete_func(adrh->vector[j]);
@@ -191,7 +191,7 @@ yasm_std_linemgr_add_assoc_data(int type, /*@only@*/ void *data,
            &line_index_assoc_data_array[type>>1];
 
        if (adrh->size == 0) {
-           int i;
+           unsigned int i;
 
            adrh->size = 4;
            adrh->vector = yasm_xmalloc(adrh->size*sizeof(void *));
@@ -201,7 +201,7 @@ yasm_std_linemgr_add_assoc_data(int type, /*@only@*/ void *data,
        }
 
        while (line_index > adrh->size) {
-           int i;
+           unsigned int i;
 
            /* allocate another size bins when full for 2x space */
            adrh->vector = yasm_xrealloc(adrh->vector,
similarity index 100%
rename from libyasm/linemgr.h
rename to yasm/libyasm/linemgr.h
similarity index 100%
rename from libyasm/mergesort.c
rename to yasm/libyasm/mergesort.c
similarity index 98%
rename from libyasm/objfmt.h
rename to yasm/libyasm/objfmt.h
index 45522c5623d6ceedefdb296f25a04350471f695b..7cc73a53b9d72d081a44c70213b3befbec2ac48a 100644 (file)
@@ -68,7 +68,7 @@ struct yasm_objfmt {
      * This function may call symrec functions as necessary (including
      * symrec_traverse) to retrieve symbolic information.
      */
-    void (*output) (FILE *f, yasm_sectionhead *sections);
+    void (*output) (FILE *f, yasm_sectionhead *sections, int all_syms);
 
     /* Cleans up anything allocated by initialize.
      * May be NULL if not needed by the object format.
similarity index 100%
rename from libyasm/optimizer.h
rename to yasm/libyasm/optimizer.h
similarity index 100%
rename from libyasm/parser.h
rename to yasm/libyasm/parser.h
similarity index 100%
rename from libyasm/preproc.h
rename to yasm/libyasm/preproc.h
similarity index 100%
rename from libyasm/section.c
rename to yasm/libyasm/section.c
similarity index 100%
rename from libyasm/section.h
rename to yasm/libyasm/section.h
similarity index 100%
rename from libyasm/strsep.c
rename to yasm/libyasm/strsep.c
similarity index 100%
rename from libyasm/symrec.c
rename to yasm/libyasm/symrec.c
similarity index 100%
rename from libyasm/symrec.h
rename to yasm/libyasm/symrec.h
similarity index 97%
rename from util.h
rename to yasm/libyasm/util.h
index 9cf5a0bc030e96afea9585e4da402da46019817f..ca3e26233344ce98f01f4f2338276bd3ff25a976 100644 (file)
--- a/util.h
@@ -42,7 +42,7 @@
 # include <stdarg.h>
 
 #if defined(YASM_LIB_AC_INTERNAL) && defined(HAVE_CONFIG_H)
-# include "libyasm/config.h"
+# include <libyasm/config.h>
 #endif
 
 #if !defined(lint) && !defined(NDEBUG)
@@ -126,7 +126,7 @@ int yasm__strncasecmp(const char *s1, const char *s2, size_t n);
 
 #endif /*YASM_AUTOCONF_INTERNAL*/
 
-#include "libyasm/compat-queue.h"
+#include <libyasm/compat-queue.h>
 
 #if defined(YASM_AUTOCONF_INTERNAL) && defined(HAVE_SYS_CDEFS_H)
 # include <sys/cdefs.h>
@@ -195,8 +195,8 @@ extern void (*yasm_xfree) (/*@only@*/ /*@out@*/ /*@null@*/ void *p)
 
 #endif /*YASM_INTERNAL*/
 
-#include "libyasm/coretype.h"
+#include <libyasm/coretype.h>
 
-#include "libyasm/valparam.h"
+#include <libyasm/valparam.h>
 
 #endif
similarity index 98%
rename from libyasm/valparam.c
rename to yasm/libyasm/valparam.c
index 92faf8e755b22868b7e3918f2dda836df1079ba7..59ccfebbb87eeaad2abcaec9bba56d95e3dc01fb 100644 (file)
@@ -32,7 +32,7 @@
 
 
 yasm_valparam *
-yasm_vp_new(/*@keep@*/ const char *v, /*@keep@*/ yasm_expr *p)
+yasm_vp_new(/*@keep@*/ char *v, /*@keep@*/ yasm_expr *p)
 {
     yasm_valparam *r = yasm_xmalloc(sizeof(yasm_valparam));
     r->val = v;
similarity index 97%
rename from libyasm/valparam.h
rename to yasm/libyasm/valparam.h
index 0d5a26204be82b5988d02774922857d61bff0d35..34f282d34e186a44698ab9921f9adeb42da31c16 100644 (file)
@@ -36,7 +36,7 @@ struct yasm_valparam {
 /*@reldef@*/ STAILQ_HEAD(yasm_valparamhead, yasm_valparam);
 #endif
 
-yasm_valparam *yasm_vp_new(/*@keep@*/ const char *v, /*@keep@*/ yasm_expr *p);
+yasm_valparam *yasm_vp_new(/*@keep@*/ char *v, /*@keep@*/ yasm_expr *p);
 
 void yasm_vps_initialize(/*@out@*/ yasm_valparamhead *headp);
 #ifdef YASM_INTERNAL
similarity index 100%
rename from libyasm/xmalloc.c
rename to yasm/libyasm/xmalloc.c
similarity index 100%
rename from libyasm/xstrdup.c
rename to yasm/libyasm/xstrdup.c
similarity index 100%
rename from m4/Makefile.am
rename to yasm/m4/Makefile.am
similarity index 100%
rename from m4/codeset.m4
rename to yasm/m4/codeset.m4
similarity index 100%
rename from m4/gettext.m4
rename to yasm/m4/gettext.m4
similarity index 100%
rename from m4/glibc21.m4
rename to yasm/m4/glibc21.m4
similarity index 100%
rename from m4/iconv.m4
rename to yasm/m4/iconv.m4
similarity index 100%
rename from m4/intdiv0.m4
rename to yasm/m4/intdiv0.m4
similarity index 100%
rename from m4/inttypes-pri.m4
rename to yasm/m4/inttypes-pri.m4
similarity index 100%
rename from m4/inttypes.m4
rename to yasm/m4/inttypes.m4
similarity index 100%
rename from m4/inttypes_h.m4
rename to yasm/m4/inttypes_h.m4
similarity index 100%
rename from m4/isc-posix.m4
rename to yasm/m4/isc-posix.m4
similarity index 100%
rename from m4/lcmessage.m4
rename to yasm/m4/lcmessage.m4
similarity index 100%
rename from m4/lib-ld.m4
rename to yasm/m4/lib-ld.m4
similarity index 100%
rename from m4/lib-link.m4
rename to yasm/m4/lib-link.m4
similarity index 100%
rename from m4/lib-prefix.m4
rename to yasm/m4/lib-prefix.m4
similarity index 99%
rename from m4/libtool.m4
rename to yasm/m4/libtool.m4
index 5de2188db1449adb267e9cfa7a796eac65458e36..e6e5060343e25ffaa4af758683278215b36595ed 100644 (file)
@@ -38,36 +38,7 @@ m4_ifdef([AC_PROVIDE_IFELSE],
 # AC_PROG_LIBTOOL
 # ---------------
 AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
-dnl And a similar setup for Fortran 77 support
-  AC_PROVIDE_IFELSE([AC_PROG_F77],
-    [AC_LIBTOOL_F77],
-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-       [AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-            [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-            [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-            [define([LT_AC_PROG_GCJ],
-               defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
+[AC_REQUIRE([_AC_PROG_LIBTOOL])])
 
 
 # _AC_PROG_LIBTOOL
similarity index 100%
rename from m4/longlong.m4
rename to yasm/m4/longlong.m4
similarity index 100%
rename from m4/ltdl.m4
rename to yasm/m4/ltdl.m4
similarity index 100%
rename from m4/progtest.m4
rename to yasm/m4/progtest.m4
similarity index 100%
rename from m4/stdint_h.m4
rename to yasm/m4/stdint_h.m4
similarity index 100%
rename from m4/uintmax_t.m4
rename to yasm/m4/uintmax_t.m4
similarity index 91%
rename from modules/arch/x86/Makefile.inc
rename to yasm/modules/arch/x86/Makefile.inc
index 5e5be8f8ded680f861a890f84caaa9c9afbcf08c..bee5f93ba6444237327003e7c88405f7349ce26b 100644 (file)
@@ -13,7 +13,7 @@ yasm_x86_la_LIBADD = libyasm.la
 YASM_MODULES += -dlopen yasm-x86.la
 
 x86id.c: $(srcdir)/modules/arch/x86/x86id.re re2c$(EXEEXT) $(srcdir)/tools/re2c/cleanup.pl
-       $(top_builddir)/re2c$(EXEEXT) -b $(srcdir)/modules/arch/x86/x86id.re | $(PERL) $(srcdir)/tools/re2c/cleanup.pl | sed "/^#l/ s,re2c-out\.c,$@," > $@
+       $(top_builddir)/re2c$(EXEEXT) -s $(srcdir)/modules/arch/x86/x86id.re | $(PERL) $(srcdir)/tools/re2c/cleanup.pl | sed "/^#l/ s,re2c-out\.c,$@," > $@
 
 BUILT_SOURCES += \
        x86id.c
similarity index 94%
rename from modules/arch/x86/x86arch.c
rename to yasm/modules/arch/x86/x86arch.c
index 5441b279923dcb8cf08810dbba966b34cd5b5e46..138a8caf201b7df279f4703a94b52b6eff22a9b8 100644 (file)
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #include "x86arch.h"
@@ -70,7 +70,7 @@ yasm_x86__directive(const char *name, yasm_valparamhead *valparams,
 unsigned int
 yasm_x86__get_reg_size(unsigned long reg)
 {
-    switch ((x86_expritem_reg_size)(reg & ~0xF)) {
+    switch ((x86_expritem_reg_size)(reg & ~0xFUL)) {
        case X86_REG8:
        case X86_REG8X:
            return 1;
@@ -115,7 +115,7 @@ yasm_x86__reg_print(FILE *f, unsigned long reg)
        "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15"
     };
 
-    switch ((x86_expritem_reg_size)(reg&~0xF)) {
+    switch ((x86_expritem_reg_size)(reg & ~0xFUL)) {
        case X86_REG8:
            fprintf(f, "%s", name8[reg&0xF]);
            break;
@@ -167,14 +167,14 @@ yasm_x86__handle_prefix(yasm_bytecode *bc, const unsigned long data[4],
 {
     switch((x86_parse_insn_prefix)data[0]) {
        case X86_LOCKREP:
-           yasm_x86__bc_insn_set_lockrep_prefix(bc, (unsigned char)data[1],
+           yasm_x86__bc_insn_set_lockrep_prefix(bc, data[1] & 0xff,
                                                 lindex);
            break;
        case X86_ADDRSIZE:
-           yasm_x86__bc_insn_addrsize_override(bc, (unsigned char)data[1]);
+           yasm_x86__bc_insn_addrsize_override(bc, data[1]);
            break;
        case X86_OPERSIZE:
-           yasm_x86__bc_insn_opersize_override(bc, (unsigned char)data[1]);
+           yasm_x86__bc_insn_opersize_override(bc, data[1]);
            break;
     }
 }
similarity index 94%
rename from modules/arch/x86/x86arch.h
rename to yasm/modules/arch/x86/x86arch.h
index 26cf2fb7e6470fc4e7485f0b5e82c8e43a962696..ec974693aa3ba5854eb7a4c274889cd749a82159 100644 (file)
@@ -85,27 +85,27 @@ typedef enum {
  * in 64-bit mode or if it wasn't needed to express reg.
  */
 int yasm_x86__set_rex_from_reg(unsigned char *rex, unsigned char *low3,
-                        unsigned long reg, unsigned char bits,
+                        unsigned long reg, unsigned int bits,
                         x86_rex_bit_pos rexbit);
 
 void yasm_x86__ea_set_segment(/*@null@*/ yasm_effaddr *ea,
-                             unsigned char segment, unsigned long lindex);
+                             unsigned int segment, unsigned long lindex);
 void yasm_x86__ea_set_disponly(yasm_effaddr *ea);
 yasm_effaddr *yasm_x86__ea_new_reg(unsigned long reg, unsigned char *rex,
-                                  unsigned char bits);
+                                  unsigned int bits);
 yasm_effaddr *yasm_x86__ea_new_imm(/*@keep@*/ yasm_expr *imm,
-                                  unsigned char im_len);
+                                  unsigned int im_len);
 yasm_effaddr *yasm_x86__ea_new_expr(/*@keep@*/ yasm_expr *e);
 
 /*@observer@*/ /*@null@*/ yasm_effaddr *yasm_x86__bc_insn_get_ea
     (/*@null@*/ yasm_bytecode *bc);
 
 void yasm_x86__bc_insn_opersize_override(yasm_bytecode *bc,
-                                        unsigned char opersize);
+                                        unsigned int opersize);
 void yasm_x86__bc_insn_addrsize_override(yasm_bytecode *bc,
-                                        unsigned char addrsize);
+                                        unsigned int addrsize);
 void yasm_x86__bc_insn_set_lockrep_prefix(yasm_bytecode *bc,
-                                         unsigned char prefix,
+                                         unsigned int prefix,
                                          unsigned long lindex);
 
 /* Structure with *all* inputs passed to x86_bytecode_new_insn().
@@ -158,8 +158,8 @@ int yasm_x86__bc_tobytes(yasm_bytecode *bc, unsigned char **bufp,
                         yasm_output_expr_func output_expr);
 
 int yasm_x86__expr_checkea
-    (yasm_expr **ep, unsigned char *addrsize, unsigned char bits,
-     unsigned char nosplit, unsigned char *displen, unsigned char *modrm,
+    (yasm_expr **ep, unsigned char *addrsize, unsigned int bits,
+     unsigned int nosplit, unsigned char *displen, unsigned char *modrm,
      unsigned char *v_modrm, unsigned char *n_modrm, unsigned char *sib,
      unsigned char *v_sib, unsigned char *n_sib, unsigned char *rex,
      yasm_calc_bc_dist_func calc_bc_dist);
similarity index 96%
rename from modules/arch/x86/x86bc.c
rename to yasm/modules/arch/x86/x86bc.c
index fd4cf461213b90df203561ddaf3fd67799d104f4..ff78ba0e1a531bc88e686a061c88984b3bff1569 100644 (file)
@@ -26,7 +26,7 @@
  */
 #define YASM_LIB_INTERNAL
 #define YASM_BC_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #include "x86arch.h"
@@ -116,13 +116,13 @@ typedef struct x86_jmprel {
 
 int
 yasm_x86__set_rex_from_reg(unsigned char *rex, unsigned char *low3,
-                          unsigned long reg, unsigned char bits,
+                          unsigned long reg, unsigned int bits,
                           x86_rex_bit_pos rexbit)
 {
     *low3 = (unsigned char)(reg&7);
 
     if (bits == 64) {
-       x86_expritem_reg_size size = (x86_expritem_reg_size)(reg & ~0xF);
+       x86_expritem_reg_size size = (x86_expritem_reg_size)(reg & ~0xFUL);
 
        if (size == X86_REG8X || (reg & 0xF) >= 8) {
            if (*rex == 0xff)
@@ -220,7 +220,7 @@ yasm_x86__bc_new_jmprel(x86_new_jmprel_data *d)
 /*@=compmempass =mustfree@*/
 
 void
-yasm_x86__ea_set_segment(yasm_effaddr *ea, unsigned char segment,
+yasm_x86__ea_set_segment(yasm_effaddr *ea, unsigned int segment,
                         unsigned long lindex)
 {
     x86_effaddr *x86_ea = (x86_effaddr *)ea;
@@ -232,7 +232,7 @@ yasm_x86__ea_set_segment(yasm_effaddr *ea, unsigned char segment,
        yasm__warning(YASM_WARN_GENERAL, lindex,
                      N_("multiple segment overrides, using leftmost"));
 
-    x86_ea->segment = segment;
+    x86_ea->segment = (unsigned char)segment;
 }
 
 void
@@ -247,7 +247,7 @@ yasm_x86__ea_set_disponly(yasm_effaddr *ea)
 }
 
 yasm_effaddr *
-yasm_x86__ea_new_reg(unsigned long reg, unsigned char *rex, unsigned char bits)
+yasm_x86__ea_new_reg(unsigned long reg, unsigned char *rex, unsigned int bits)
 {
     x86_effaddr *x86_ea;
     unsigned char rm;
@@ -297,14 +297,14 @@ yasm_x86__ea_new_expr(yasm_expr *e)
 
 /*@-compmempass@*/
 yasm_effaddr *
-yasm_x86__ea_new_imm(yasm_expr *imm, unsigned char im_len)
+yasm_x86__ea_new_imm(yasm_expr *imm, unsigned int im_len)
 {
     x86_effaddr *x86_ea;
 
     x86_ea = yasm_xmalloc(sizeof(x86_effaddr));
 
     x86_ea->ea.disp = imm;
-    x86_ea->ea.len = im_len;
+    x86_ea->ea.len = (unsigned char)im_len;
     x86_ea->ea.nosplit = 0;
     x86_ea->segment = 0;
     x86_ea->modrm = 0;
@@ -331,7 +331,7 @@ yasm_x86__bc_insn_get_ea(yasm_bytecode *bc)
 }
 
 void
-yasm_x86__bc_insn_opersize_override(yasm_bytecode *bc, unsigned char opersize)
+yasm_x86__bc_insn_opersize_override(yasm_bytecode *bc, unsigned int opersize)
 {
     x86_insn *insn;
     x86_jmprel *jmprel;
@@ -342,11 +342,11 @@ yasm_x86__bc_insn_opersize_override(yasm_bytecode *bc, unsigned char opersize)
     switch ((x86_bytecode_type)bc->type) {
        case X86_BC_INSN:
            insn = (x86_insn *)bc;
-           insn->opersize = opersize;
+           insn->opersize = (unsigned char)opersize;
            break;
        case X86_BC_JMPREL:
            jmprel = (x86_jmprel *)bc;
-           jmprel->opersize = opersize;
+           jmprel->opersize = (unsigned char)opersize;
            break;
        default:
            yasm_internal_error(
@@ -355,7 +355,7 @@ yasm_x86__bc_insn_opersize_override(yasm_bytecode *bc, unsigned char opersize)
 }
 
 void
-yasm_x86__bc_insn_addrsize_override(yasm_bytecode *bc, unsigned char addrsize)
+yasm_x86__bc_insn_addrsize_override(yasm_bytecode *bc, unsigned int addrsize)
 {
     x86_insn *insn;
     x86_jmprel *jmprel;
@@ -366,11 +366,11 @@ yasm_x86__bc_insn_addrsize_override(yasm_bytecode *bc, unsigned char addrsize)
     switch ((x86_bytecode_type)bc->type) {
        case X86_BC_INSN:
            insn = (x86_insn *)bc;
-           insn->addrsize = addrsize;
+           insn->addrsize = (unsigned char)addrsize;
            break;
        case X86_BC_JMPREL:
            jmprel = (x86_jmprel *)bc;
-           jmprel->addrsize = addrsize;
+           jmprel->addrsize = (unsigned char)addrsize;
            break;
        default:
            yasm_internal_error(
@@ -379,7 +379,7 @@ yasm_x86__bc_insn_addrsize_override(yasm_bytecode *bc, unsigned char addrsize)
 }
 
 void
-yasm_x86__bc_insn_set_lockrep_prefix(yasm_bytecode *bc, unsigned char prefix,
+yasm_x86__bc_insn_set_lockrep_prefix(yasm_bytecode *bc, unsigned int prefix,
                                     unsigned long lindex)
 {
     x86_insn *insn;
@@ -407,7 +407,7 @@ yasm_x86__bc_insn_set_lockrep_prefix(yasm_bytecode *bc, unsigned char prefix,
        yasm__warning(YASM_WARN_GENERAL, lindex,
                      N_("multiple LOCK or REP prefixes, using leftmost"));
 
-    *lockrep_pre = prefix;
+    *lockrep_pre = (unsigned char)prefix;
 }
 
 void
@@ -831,7 +831,7 @@ yasm_x86__bc_resolve(yasm_bytecode *bc, int save, const yasm_section *sect,
 
 static int
 x86_bc_tobytes_insn(x86_insn *insn, unsigned char **bufp,
-                   const yasm_section *sect, const yasm_bytecode *bc, void *d,
+                   const yasm_section *sect, yasm_bytecode *bc, void *d,
                    yasm_output_expr_func output_expr)
 {
     /*@null@*/ x86_effaddr *x86_ea = insn->ea;
@@ -898,8 +898,9 @@ x86_bc_tobytes_insn(x86_insn *insn, unsigned char **bufp,
                yasm_internal_error(N_("checkea failed"));
 
            if (ea->disp) {
-               if (output_expr(&ea->disp, bufp, ea->len, *bufp-bufp_orig,
-                               sect, bc, 0, d))
+               if (output_expr(&ea->disp, bufp, ea->len,
+                               (unsigned long)(*bufp-bufp_orig), sect, bc, 0,
+                               d))
                    return 1;
            } else {
                /* 0 displacement, but we didn't know it before, so we have to
@@ -914,8 +915,8 @@ x86_bc_tobytes_insn(x86_insn *insn, unsigned char **bufp,
     /* Immediate (if required) */
     if (imm && imm->val) {
        /* TODO: check imm->len vs. sized len from expr? */
-       if (output_expr(&imm->val, bufp, imm->len, *bufp-bufp_orig, sect, bc,
-                       0, d))
+       if (output_expr(&imm->val, bufp, imm->len,
+                       (unsigned long)(*bufp-bufp_orig), sect, bc, 0, d))
            return 1;
     }
 
@@ -924,7 +925,7 @@ x86_bc_tobytes_insn(x86_insn *insn, unsigned char **bufp,
 
 static int
 x86_bc_tobytes_jmprel(x86_jmprel *jmprel, unsigned char **bufp,
-                     const yasm_section *sect, const yasm_bytecode *bc,
+                     const yasm_section *sect, yasm_bytecode *bc,
                      void *d, yasm_output_expr_func output_expr)
 {
     unsigned char opersize;
@@ -957,8 +958,8 @@ x86_bc_tobytes_jmprel(x86_jmprel *jmprel, unsigned char **bufp,
                YASM_WRITE_8(*bufp, jmprel->shortop.opcode[i]);
 
            /* Relative displacement */
-           if (output_expr(&jmprel->target, bufp, 1, *bufp-bufp_orig, sect,
-                           bc, 1, d))
+           if (output_expr(&jmprel->target, bufp, 1,
+                           (unsigned long)(*bufp-bufp_orig), sect, bc, 1, d))
                return 1;
            break;
        case JR_NEAR_FORCED:
@@ -975,8 +976,8 @@ x86_bc_tobytes_jmprel(x86_jmprel *jmprel, unsigned char **bufp,
 
            /* Relative displacement */
            if (output_expr(&jmprel->target, bufp,
-                           (opersize == 32) ? 4UL : 2UL, *bufp-bufp_orig,
-                           sect, bc, 1, d))
+                           (opersize == 32) ? 4UL : 2UL,
+                           (unsigned long)(*bufp-bufp_orig), sect, bc, 1, d))
                return 1;
            break;
        default:
@@ -1015,7 +1016,7 @@ yasm_x86__intnum_tobytes(const yasm_intnum *intn, unsigned char **bufp,
                N_("tried to do PC-relative offset from invalid sized value"));
        val = yasm_intnum_get_uint(intn);
        val -= bc->len;
-       switch (valsize) {
+       switch ((unsigned int)valsize) {
            case 1:
                YASM_WRITE_8(*bufp, val);
                break;
similarity index 97%
rename from modules/arch/x86/x86expr.c
rename to yasm/modules/arch/x86/x86expr.c
index 972ff9536f468172900725fd0be5261c208ab4fd..1cd0a275d4dc345222ba211de22333cc24ffa0b0 100644 (file)
@@ -26,7 +26,7 @@
  */
 #define YASM_LIB_INTERNAL
 #define YASM_EXPR_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #include "x86arch.h"
@@ -47,7 +47,7 @@ x86_expr_checkea_get_reg3264(yasm_expr__item *ei, int *regnum,
 {
     x86_checkea_reg3264_data *data = d;
 
-    switch ((x86_expritem_reg_size)(ei->data.reg & ~0xF)) {
+    switch ((x86_expritem_reg_size)(ei->data.reg & ~0xFUL)) {
        case X86_REG32:
            if (data->addrsize != 32)
                return 0;
@@ -97,7 +97,7 @@ x86_expr_checkea_get_reg16(yasm_expr__item *ei, int *regnum, void *d)
     reg16[7] = &data->di;
 
     /* don't allow 32-bit registers */
-    if ((ei->data.reg & ~0xF) != X86_REG16)
+    if ((ei->data.reg & ~0xFUL) != X86_REG16)
        return 0;
 
     /* & 7 for sanity check */
@@ -491,7 +491,7 @@ x86_expr_checkea_getregsize_callback(yasm_expr__item *ei, void *d)
     unsigned char *addrsize = (unsigned char *)d;
 
     if (ei->type == YASM_EXPR_REG) {
-       switch ((x86_expritem_reg_size)(ei->data.reg & ~0xF)) {
+       switch ((x86_expritem_reg_size)(ei->data.reg & ~0xFUL)) {
            case X86_REG16:
                *addrsize = 16;
                break;
@@ -512,7 +512,7 @@ x86_expr_checkea_getregsize_callback(yasm_expr__item *ei, void *d)
 
 int
 yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
-                      unsigned char bits, unsigned char nosplit,
+                      unsigned int bits, unsigned int nosplit,
                       unsigned char *displen, unsigned char *modrm,
                       unsigned char *v_modrm, unsigned char *n_modrm,
                       unsigned char *sib, unsigned char *v_sib,
@@ -740,7 +740,8 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
             * of register basereg is, as x86_set_rex_from_reg doesn't pay
             * much attention.
             */
-           if (yasm_x86__set_rex_from_reg(rex, &low3, X86_REG64 | basereg,
+           if (yasm_x86__set_rex_from_reg(rex, &low3,
+                                          (unsigned int)(X86_REG64 | basereg),
                                           bits, X86_REX_B)) {
                yasm__error(e->line,
                    N_("invalid combination of operands and effective address"));
@@ -769,8 +770,9 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
            if (basereg == REG3264_NONE)
                *sib |= 5;
            else {
-               if (yasm_x86__set_rex_from_reg(rex, &low3, X86_REG64 | basereg,
-                                              bits, X86_REX_B)) {
+               if (yasm_x86__set_rex_from_reg(rex, &low3, (unsigned int)
+                                              (X86_REG64 | basereg), bits,
+                                              X86_REX_B)) {
                    yasm__error(e->line,
                        N_("invalid combination of operands and effective address"));
                    return 0;
@@ -783,8 +785,8 @@ yasm_x86__expr_checkea(yasm_expr **ep, unsigned char *addrsize,
                *sib |= 040;
                /* Any scale field is valid, just leave at 0. */
            else {
-               if (yasm_x86__set_rex_from_reg(rex, &low3,
-                                              X86_REG64 | indexreg, bits,
+               if (yasm_x86__set_rex_from_reg(rex, &low3, (unsigned int)
+                                              (X86_REG64 | indexreg), bits,
                                               X86_REX_X)) {
                    yasm__error(e->line,
                        N_("invalid combination of operands and effective address"));
similarity index 99%
rename from modules/arch/x86/x86id.re
rename to yasm/modules/arch/x86/x86id.re
index 37d55564dbac6d53ab6e8a9b895980e31b82ba58..d7a8bc74f33b3763053badbc1d684760632e41e8 100644 (file)
@@ -27,7 +27,7 @@
 #define YASM_LIB_INTERNAL
 #define YASM_BC_INTERNAL
 #define YASM_EXPR_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 RCSID("$IdPath$");
 
 #include "modules/arch/x86/x86arch.h"
@@ -1532,7 +1532,7 @@ x86_new_jmprel(const unsigned long data[4], int num_operands,
                                               0, lindex)), lindex);
 
     /* See if the user explicitly specified short/near. */
-    switch (jrinfo->operands[0] & OPTM_MASK) {
+    switch ((int)(jrinfo->operands[0] & OPTM_MASK)) {
        case OPTM_Short:
            d.op_sel = JR_SHORT_FORCED;
            break;
@@ -1585,7 +1585,7 @@ x86_new_jmprel(const unsigned long data[4], int num_operands,
        if (info->opersize != d.opersize)
            continue;
 
-       switch (info->operands[0] & OPTM_MASK) {
+       switch ((int)(info->operands[0] & OPTM_MASK)) {
            case OPTM_Short:
                d.short_op_len = info->opcode_len;
                d.short_op[0] = info->opcode[0];
@@ -1655,7 +1655,7 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
        for(i = 0, op = yasm_ops_first(operands); op && i<info->num_operands &&
            !mismatch; op = yasm_ops_next(op), i++) {
            /* Check operand type */
-           switch (info->operands[i] & OPT_MASK) {
+           switch ((int)(info->operands[i] & OPT_MASK)) {
                case OPT_Imm:
                    if (op->type != YASM_INSN__OPERAND_IMM)
                        mismatch = 1;
@@ -1668,7 +1668,7 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
                    if (op->type != YASM_INSN__OPERAND_REG)
                        mismatch = 1;
                    else {
-                       switch ((x86_expritem_reg_size)(op->data.reg & ~0xF)) {
+                       switch ((x86_expritem_reg_size)(op->data.reg&~0xFUL)) {
                            case X86_REG8:
                            case X86_REG8X:
                            case X86_REG16:
@@ -1694,7 +1694,7 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
                    if (op->type != YASM_INSN__OPERAND_REG)
                        mismatch = 1;
                    else {
-                       switch ((x86_expritem_reg_size)(op->data.reg & ~0xF)) {
+                       switch ((x86_expritem_reg_size)(op->data.reg&~0xFUL)) {
                            case X86_MMXREG:
                            case X86_XMMREG:
                                break;
@@ -1710,17 +1710,17 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
                    break;
                case OPT_CRReg:
                    if (op->type != YASM_INSN__OPERAND_REG ||
-                       (op->data.reg & ~0xF) != X86_CRREG)
+                       (op->data.reg & ~0xFUL) != X86_CRREG)
                        mismatch = 1;
                    break;
                case OPT_DRReg:
                    if (op->type != YASM_INSN__OPERAND_REG ||
-                       (op->data.reg & ~0xF) != X86_DRREG)
+                       (op->data.reg & ~0xFUL) != X86_DRREG)
                        mismatch = 1;
                    break;
                case OPT_TRReg:
                    if (op->type != YASM_INSN__OPERAND_REG ||
-                       (op->data.reg & ~0xF) != X86_TRREG)
+                       (op->data.reg & ~0xFUL) != X86_TRREG)
                        mismatch = 1;
                    break;
                case OPT_ST0:
@@ -1837,7 +1837,7 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
                break;
 
            /* Check target modifier */
-           switch (info->operands[i] & OPTM_MASK) {
+           switch ((int)(info->operands[i] & OPTM_MASK)) {
                case OPTM_None:
                    if (op->targetmod != 0)
                        mismatch = 1;
@@ -1876,12 +1876,13 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
     }
 
     /* Extended error/warning handling */
-    switch (info->modifiers & MOD_Ext_MASK) {
+    switch ((int)(info->modifiers & MOD_Ext_MASK)) {
        case MOD_ExtNone:
            /* No extended modifier, so just continue */
            break;
        case MOD_ExtErr:
-           switch ((info->modifiers & MOD_ExtIndex_MASK)>>MOD_ExtIndex_SHIFT) {
+           switch ((int)((info->modifiers & MOD_ExtIndex_MASK)
+                         >> MOD_ExtIndex_SHIFT)) {
                case 0:
                    yasm__error(lindex, N_("mismatch in operand sizes"));
                    break;
@@ -1893,7 +1894,8 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
            }
            return NULL;    /* It was an error */
        case MOD_ExtWarn:
-           switch ((info->modifiers & MOD_ExtIndex_MASK)>>MOD_ExtIndex_SHIFT) {
+           switch ((int)((info->modifiers & MOD_ExtIndex_MASK)
+                         >> MOD_ExtIndex_SHIFT)) {
                default:
                    yasm_internal_error(N_("unrecognized x86 ext mod index"));
            }
@@ -1950,7 +1952,7 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
     }
     if (info->modifiers & MOD_Imm8) {
        d.imm = yasm_expr_new_ident(yasm_expr_int(
-           yasm_intnum_new_int(mod_data & 0xFF)), lindex);
+           yasm_intnum_new_uint(mod_data & 0xFF)), lindex);
        d.im_len = 1;
        /*mod_data >>= 8;*/
     }
@@ -1959,7 +1961,7 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
     if (operands) {
        for(i = 0, op = yasm_ops_first(operands); op && i<info->num_operands;
            op = yasm_ops_next(op), i++) {
-           switch (info->operands[i] & OPA_MASK) {
+           switch ((int)(info->operands[i] & OPA_MASK)) {
                case OPA_None:
                    /* Throw away the operand contents */
                    switch (op->type) {
@@ -2070,7 +2072,7 @@ yasm_x86__new_insn(const unsigned long data[4], int num_operands,
                    yasm_internal_error(N_("unknown operand action"));
            }
 
-           switch (info->operands[i] & OPAP_MASK) {
+           switch ((int)(info->operands[i] & OPAP_MASK)) {
                case OPAP_None:
                    break;
                case OPAP_ShiftOp:
@@ -3159,14 +3161,14 @@ yasm_x86__check_identifier(unsigned long data[4], const char *id,
        F C H S { RET_INSN(twobyte, 0xD9E0, CPU_FPU); }
        F A B S { RET_INSN(twobyte, 0xD9E1, CPU_FPU); }
        F N I N I T { RET_INSN(twobyte, 0xDBE3, CPU_FPU); }
-       F I N I T { RET_INSN(threebyte, 0x98DBE3, CPU_FPU); }
+       F I N I T { RET_INSN(threebyte, 0x98DBE3UL, CPU_FPU); }
        F L D C W { RET_INSN(fldnstcw, 0x05, CPU_FPU); }
        F N S T C W { RET_INSN(fldnstcw, 0x07, CPU_FPU); }
        F S T C W { RET_INSN(fstcw, 0, CPU_FPU); }
        F N S T S W { RET_INSN(fnstsw, 0, CPU_FPU); }
        F S T S W { RET_INSN(fstsw, 0, CPU_FPU); }
        F N C L E X { RET_INSN(twobyte, 0xDBE2, CPU_FPU); }
-       F C L E X { RET_INSN(threebyte, 0x98DBE2, CPU_FPU); }
+       F C L E X { RET_INSN(threebyte, 0x98DBE2UL, CPU_FPU); }
        F N S T E N V { RET_INSN(onebytemem, 0x06D9, CPU_FPU); }
        F S T E N V { RET_INSN(twobytemem, 0x069BD9, CPU_FPU); }
        F L D E N V { RET_INSN(onebytemem, 0x04D9, CPU_FPU); }
similarity index 91%
rename from modules/dbgfmts/null/null-dbgfmt.c
rename to yasm/modules/dbgfmts/null/null-dbgfmt.c
index 8cc9617fbf21d8ea061563bb2ea124bc25de4c99..a3b6b9b365713d613d487b68320a6d8cdda3de72 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 
-/* Define preproc structure -- see preproc.h for details */
+/* Define dbgfmt structure -- see dbgfmt.h for details */
 yasm_dbgfmt yasm_null_LTX_dbgfmt = {
     "No debugging info",
     "null",
     NULL,   /*null_dbgfmt_initialize*/
-    NULL    /*null_dbgfmt_cleanup*/
+    NULL,   /*null_dbgfmt_cleanup*/
+    NULL    /*null_dbgfmt_directive*/
 };
similarity index 65%
rename from modules/objfmts/Makefile.inc
rename to yasm/modules/objfmts/Makefile.inc
index dc191c0f2b612e1fb4162cd433a35e8848ee2178..82c456580247d9a5fe0688070dc70999df5f3fb9 100644 (file)
@@ -3,8 +3,10 @@
 EXTRA_DIST += \
        modules/objfmts/dbg/Makefile.inc \
        modules/objfmts/bin/Makefile.inc \
-       modules/objfmts/coff/Makefile.inc
+       modules/objfmts/coff/Makefile.inc \
+       modules/objfmts/win32/Makefile.inc
 
 include modules/objfmts/dbg/Makefile.inc
 include modules/objfmts/bin/Makefile.inc
 include modules/objfmts/coff/Makefile.inc
+include modules/objfmts/win32/Makefile.inc
similarity index 99%
rename from modules/objfmts/bin/bin-objfmt.c
rename to yasm/modules/objfmts/bin/bin-objfmt.c
index adb9e30710efdd615558d27394b00d06f4524e7e..23d57b7f7d3af48de3a045616ecb49b9cbece0e2 100644 (file)
@@ -27,7 +27,7 @@
 #define YASM_LIB_INTERNAL
 #define YASM_BC_INTERNAL
 #define YASM_EXPR_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 
@@ -129,7 +129,7 @@ bin_objfmt_output_expr(yasm_expr **ep, unsigned char **bufp,
                       unsigned long valsize,
                       /*@unused@*/ unsigned long offset,
                       /*@observer@*/ const yasm_section *sect,
-                      /*@observer@*/ const yasm_bytecode *bc, int rel,
+                      yasm_bytecode *bc, int rel,
                       /*@unused@*/ /*@null@*/ void *d)
 {
     /*@dependent@*/ /*@null@*/ const yasm_intnum *intn;
@@ -216,7 +216,8 @@ bin_objfmt_output_bytecode(yasm_bytecode *bc, /*@null@*/ void *d)
 }
 
 static void
-bin_objfmt_output(FILE *f, yasm_sectionhead *sections)
+bin_objfmt_output(FILE *f, yasm_sectionhead *sections,
+                 /*@unused@*/ int all_syms)
 {
     /*@observer@*/ /*@null@*/ yasm_section *text, *data, *bss, *prevsect;
     /*@null@*/ yasm_expr *startexpr;
similarity index 74%
rename from modules/objfmts/coff/coff-objfmt.c
rename to yasm/modules/objfmts/coff/coff-objfmt.c
index cc26ca43313ab54cc323978c21ccae1fbcb369f5..2095a4d6b6e6517532b8c61c7333de475f2871e3 100644 (file)
@@ -27,7 +27,7 @@
 #define YASM_LIB_INTERNAL
 #define YASM_BC_INTERNAL
 #define YASM_EXPR_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 
@@ -40,7 +40,7 @@
  * with VMA=0.  Who's right?  This is #defined as changing this setting affects
  * several places in the code.
  */
-#define COFF_SET_VMA   1
+#define COFF_SET_VMA   (!win32)
 
 #define COFF_I386MAGIC 0x14C
 
@@ -60,16 +60,26 @@ typedef struct coff_reloc {
     } type;                        /* type of relocation */
 } coff_reloc;
 
-typedef enum coff_section_data_flags {
-    COFF_STYP_TEXT = 0x0020,
-    COFF_STYP_DATA = 0x0040,
-    COFF_STYP_BSS = 0x0080
-} coff_section_data_flags;
+#define COFF_STYP_TEXT         0x00000020UL
+#define COFF_STYP_DATA         0x00000040UL
+#define COFF_STYP_BSS          0x00000080UL
+#define COFF_STYP_INFO         0x00000200UL
+#define COFF_STYP_STD_MASK     0x000003FFUL
+#define COFF_STYP_ALIGN_MASK   0x00F00000UL
+#define COFF_STYP_ALIGN_SHIFT  20
+#define COFF_STYP_DISCARD      0x02000000UL
+#define COFF_STYP_NOCACHE      0x04000000UL
+#define COFF_STYP_NOPAGE       0x08000000UL
+#define COFF_STYP_SHARED       0x10000000UL
+#define COFF_STYP_EXECUTE      0x20000000UL
+#define COFF_STYP_READ         0x40000000UL
+#define COFF_STYP_WRITE                0x80000000UL
+#define COFF_STYP_WIN32_MASK   0xFE000000UL
 
 typedef struct coff_section_data {
     /*@dependent@*/ yasm_symrec *sym;  /* symbol created for this section */
     unsigned int scnum;            /* section number (1=first section) */
-    coff_section_data_flags flags;
+    unsigned long flags;    /* section flags (see COFF_STYP_* above) */
     unsigned long addr;            /* starting memory address (first section -> 0) */
     unsigned long scnptr;   /* file ptr to raw data */
     unsigned long size;            /* size of raw data (section data) in bytes */
@@ -150,6 +160,9 @@ static coff_symtab_head coff_symtab;            /* symbol table of indexed syms */
 yasm_objfmt yasm_coff_LTX_objfmt;
 static /*@dependent@*/ yasm_arch *cur_arch;
 
+/* Set nonzero for win32 output. */
+static int win32;
+
 
 static /*@dependent@*/ coff_symtab_entry *
 coff_objfmt_symtab_append(yasm_symrec *sym, coff_symrec_sclass sclass,
@@ -182,8 +195,17 @@ coff_objfmt_symtab_append(yasm_symrec *sym, coff_symrec_sclass sclass,
     return entry;
 }
 
+static int
+coff_objfmt_append_local_sym(yasm_symrec *sym, /*@unused@*/ /*@null@*/ void *d)
+{
+    if (!yasm_symrec_get_of_data(sym))
+       coff_objfmt_symtab_append(sym, COFF_SCL_STAT, NULL, 0,
+                                 COFF_SYMTAB_AUX_NONE);
+    return 1;
+}
+
 static void
-coff_objfmt_initialize(const char *in_filename,
+coff_common_initialize(const char *in_filename,
                       /*@unused@*/ const char *obj_filename,
                       /*@unused@*/ yasm_dbgfmt *df, yasm_arch *a)
 {
@@ -211,6 +233,22 @@ coff_objfmt_initialize(const char *in_filename,
     STAILQ_INSERT_TAIL(&coff_symtab, entry, link);
 }
 
+static void
+coff_objfmt_initialize(const char *in_filename, const char *obj_filename,
+                      yasm_dbgfmt *df, yasm_arch *a)
+{
+    win32 = 0;
+    coff_common_initialize(in_filename, obj_filename, df, a);
+}
+
+static void
+win32_objfmt_initialize(const char *in_filename, const char *obj_filename,
+                       yasm_dbgfmt *df, yasm_arch *a)
+{
+    win32 = 1;
+    coff_common_initialize(in_filename, obj_filename, df, a);
+}
+
 static int
 coff_objfmt_set_section_addr(yasm_section *sect, /*@null@*/ void *d)
 {
@@ -238,8 +276,7 @@ static int
 coff_objfmt_output_expr(yasm_expr **ep, unsigned char **bufp,
                        unsigned long valsize, unsigned long offset,
                        /*@observer@*/ const yasm_section *sect,
-                       /*@observer@*/ const yasm_bytecode *bc, int rel,
-                       /*@unused@*/ /*@null@*/ void *d)
+                       yasm_bytecode *bc, int rel, /*@null@*/ void *d)
 {
     /*@null@*/ coff_objfmt_output_info *info = (coff_objfmt_output_info *)d;
     /*@dependent@*/ /*@null@*/ const yasm_intnum *intn;
@@ -275,15 +312,17 @@ coff_objfmt_output_expr(yasm_expr **ep, unsigned char **bufp,
        reloc->sym = sym;
        vis = yasm_symrec_get_visibility(sym);
        if (vis & YASM_SYM_COMMON) {
-           /*@dependent@*/ /*@null@*/ coff_symrec_data *csymd;
-
-           /* COMMON symbols have their length added in */
-           csymd = yasm_symrec_get_of_data(sym);
-           assert(csymd != NULL);
-           *ep = yasm_expr_new(YASM_EXPR_ADD, yasm_expr_expr(*ep),
-                               yasm_expr_expr(yasm_expr_copy(csymd->size)),
-                               csymd->size->line);
-           *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
+           /* In standard COFF, COMMON symbols have their length added in */
+           if (!win32) {
+               /*@dependent@*/ /*@null@*/ coff_symrec_data *csymd;
+
+               csymd = yasm_symrec_get_of_data(sym);
+               assert(csymd != NULL);
+               *ep = yasm_expr_new(YASM_EXPR_ADD, yasm_expr_expr(*ep),
+                                   yasm_expr_expr(yasm_expr_copy(csymd->size)),
+                                   csymd->size->line);
+               *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
+           }
        } else if (!(vis & YASM_SYM_EXTERN)) {
            /* Local symbols need relocation to their section's start */
            if (yasm_symrec_get_label(sym, &label_sect, &label_precbc)) {
@@ -300,11 +339,22 @@ coff_objfmt_output_expr(yasm_expr **ep, unsigned char **bufp,
 
        if (rel) {
            reloc->type = COFF_RELOC_REL32;
-           /* Need to reference to start of section, so add $$ in. */
-           *ep = yasm_expr_new(YASM_EXPR_ADD, yasm_expr_expr(*ep),
-               yasm_expr_sym(yasm_symrec_define_label("$$", info->sect, NULL,
-                                                      0, (*ep)->line)),
-               (*ep)->line);
+           /* For standard COFF, need to reference to start of section, so add
+            * $$ in.
+            * For Win32 COFF, need to reference to next bytecode, so add '$'
+            * (really $+$.len) in.
+            */
+           if (win32)
+               *ep = yasm_expr_new(YASM_EXPR_ADD, yasm_expr_expr(*ep),
+                   yasm_expr_sym(yasm_symrec_define_label("$", info->sect, bc,
+                                                          0, (*ep)->line)),
+                   (*ep)->line);
+           else
+               *ep = yasm_expr_new(YASM_EXPR_ADD, yasm_expr_expr(*ep),
+                   yasm_expr_sym(yasm_symrec_define_label("$$", info->sect,
+                                                          NULL, 0,
+                                                          (*ep)->line)),
+                   (*ep)->line);
            *ep = yasm_expr_simplify(*ep, yasm_common_calc_bc_dist);
        } else
            reloc->type = COFF_RELOC_ADDR32;
@@ -383,7 +433,7 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
     long pos;
     coff_reloc *reloc;
 
-    /* Don't output absolute sections */
+    /* Don't output absolute sections into the section table */
     if (yasm_section_is_absolute(sect))
        return 0;
 
@@ -393,7 +443,7 @@ coff_objfmt_output_section(yasm_section *sect, /*@null@*/ void *d)
 
     csd->addr = info->addr;
 
-    if (csd->flags == COFF_STYP_BSS) {
+    if ((csd->flags & COFF_STYP_STD_MASK) == COFF_STYP_BSS) {
        /*@null@*/ yasm_bytecode *last =
            yasm_bcs_last(yasm_section_get_bytecodes(sect));
 
@@ -459,7 +509,7 @@ coff_objfmt_output_secthead(yasm_section *sect, /*@null@*/ void *d)
     /*@dependent@*/ /*@null@*/ coff_section_data *csd;
     unsigned char *localbuf;
 
-    /* Don't output absolute sections */
+    /* Don't output absolute sections into the section table */
     if (yasm_section_is_absolute(sect))
        return 0;
 
@@ -494,7 +544,7 @@ coff_objfmt_output_secthead(yasm_section *sect, /*@null@*/ void *d)
 }
 
 static void
-coff_objfmt_output(FILE *f, yasm_sectionhead *sections)
+coff_objfmt_output(FILE *f, yasm_sectionhead *sections, int all_syms)
 {
     coff_objfmt_output_info info;
     unsigned char *localbuf;
@@ -508,7 +558,7 @@ coff_objfmt_output(FILE *f, yasm_sectionhead *sections)
     info.buf = yasm_xmalloc(REGULAR_OUTBUF_SIZE);
 
     /* Allocate space for headers by seeking forward */
-    if (fseek(f, 20+40*(coff_objfmt_parse_scnum-1), SEEK_SET) < 0) {
+    if (fseek(f, (long)(20+40*(coff_objfmt_parse_scnum-1)), SEEK_SET) < 0) {
        yasm__error(0, N_("could not seek on output file"));
        return;
     }
@@ -530,6 +580,10 @@ coff_objfmt_output(FILE *f, yasm_sectionhead *sections)
        return;
 
     /* Symbol table */
+    if (all_syms) {
+       /* Need to put all local syms into COFF symbol table */
+       yasm_symrec_traverse(NULL, coff_objfmt_append_local_sym);
+    }
     pos = ftell(f);
     if (pos == -1) {
        yasm__error(0, N_("could not get file position on output file"));
@@ -538,6 +592,8 @@ coff_objfmt_output(FILE *f, yasm_sectionhead *sections)
     symtab_pos = (unsigned long)pos;
     STAILQ_FOREACH(entry, &coff_symtab, link) {
        const char *name = yasm_symrec_get_name(entry->sym);
+       const yasm_expr *equ_val;
+       const yasm_intnum *intn;
        size_t len = strlen(name);
        int aux;
        /*@dependent@*/ /*@null@*/ coff_symrec_data *csymd;
@@ -561,18 +617,48 @@ coff_objfmt_output(FILE *f, yasm_sectionhead *sections)
            if (sect) {
                /*@dependent@*/ /*@null@*/ coff_section_data *csectd;
                csectd = yasm_section_get_of_data(sect);
-               scnum = csectd->scnum;
-               scnlen = csectd->size;
-               nreloc = csectd->nreloc;
+               if (csectd) {
+                   scnum = csectd->scnum;
+                   scnlen = csectd->size;
+                   nreloc = csectd->nreloc;
+                   if (COFF_SET_VMA)
+                       value = csectd->addr;
+               } else if (yasm_section_is_absolute(sect)) {
+                   yasm_expr *abs_start;
+
+                   abs_start = yasm_expr_copy(yasm_section_get_start(sect));
+                   intn = yasm_expr_get_intnum(&abs_start,
+                                               yasm_common_calc_bc_dist);
+                   if (!intn)
+                       yasm__error(abs_start->line,
+                           N_("absolute section start not an integer expression"));
+                   else
+                       value = yasm_intnum_get_uint(intn);
+                   yasm_expr_delete(abs_start);
+
+                   scnum = 0xffff;     /* -1 = absolute symbol */
+               } else
+                   yasm_internal_error(N_("didn't understand section"));
                if (precbc)
-                   value = precbc->offset + precbc->len;
-               if (COFF_SET_VMA)
-                   value += csectd->addr;
+                   value += precbc->offset + precbc->len;
            }
+       } else if ((equ_val = yasm_symrec_get_equ(entry->sym))) {
+           yasm_expr *equ_val_copy = yasm_expr_copy(equ_val);
+           intn = yasm_expr_get_intnum(&equ_val_copy,
+                                       yasm_common_calc_bc_dist);
+           if (!intn) {
+               yasm_sym_vis vis = yasm_symrec_get_visibility(entry->sym);
+               if (vis & YASM_SYM_GLOBAL)
+                   yasm__error(equ_val->line,
+                       N_("global EQU value not an integer expression"));
+           } else
+               value = yasm_intnum_get_uint(intn);
+           yasm_expr_delete(equ_val_copy);
+
+           scnum = 0xffff;     /* -1 = absolute symbol */
        } else {
            yasm_sym_vis vis = yasm_symrec_get_visibility(entry->sym);
            if (vis & YASM_SYM_COMMON) {
-               const yasm_intnum *intn;
                intn = yasm_expr_get_intnum(&csymd->size,
                                            yasm_common_calc_bc_dist);
                if (!intn)
@@ -667,7 +753,9 @@ coff_objfmt_output(FILE *f, yasm_sectionhead *sections)
     YASM_WRITE_32_L(localbuf, symtab_pos);             /* file ptr to symtab */
     YASM_WRITE_32_L(localbuf, symtab_count);           /* number of symtabs */
     YASM_WRITE_16_L(localbuf, 0);      /* size of optional header (none) */
-    YASM_WRITE_16_L(localbuf, COFF_F_AR32WR|COFF_F_LNNO|COFF_F_LSYMS); /* flags */
+    /* flags */
+    YASM_WRITE_16_L(localbuf, COFF_F_AR32WR|COFF_F_LNNO
+                   |(all_syms?0:COFF_F_LSYMS));
     fwrite(info.buf, 20, 1, f);
 
     yasm_sections_traverse(sections, &info, coff_objfmt_output_secthead);
@@ -701,42 +789,170 @@ coff_objfmt_sections_switch(yasm_sectionhead *headp,
     yasm_valparam *vp = yasm_vps_first(valparams);
     yasm_section *retval;
     int isnew;
-    coff_section_data_flags flags;
+    unsigned long flags;
     int flags_override = 0;
     char *sectname;
     int resonly = 0;
+    static const struct {
+       const char *name;
+       unsigned long stdflags; /* if 0, win32 only qualifier */
+       unsigned long win32flags;
+       /* Mode: 0 => clear specified bits
+        *       1 => set specified bits
+        *       2 => clear all bits, then set specified bits
+        */
+       int mode;
+    } flagquals[] = {
+       { "code", COFF_STYP_TEXT, COFF_STYP_EXECUTE | COFF_STYP_READ, 2 },
+       { "text", COFF_STYP_TEXT, COFF_STYP_EXECUTE | COFF_STYP_READ, 2 },
+       { "data", COFF_STYP_DATA, COFF_STYP_READ | COFF_STYP_WRITE, 2 },
+       { "bss", COFF_STYP_BSS, COFF_STYP_READ | COFF_STYP_WRITE, 2 },
+       { "info", COFF_STYP_INFO, COFF_STYP_DISCARD | COFF_STYP_READ, 2 },
+       { "discard", 0, COFF_STYP_DISCARD, 1 },
+       { "nodiscard", 0, COFF_STYP_DISCARD, 0 },
+       { "cache", 0, COFF_STYP_NOCACHE, 0 },
+       { "nocache", 0, COFF_STYP_NOCACHE, 1 },
+       { "page", 0, COFF_STYP_NOPAGE, 0 },
+       { "nopage", 0, COFF_STYP_NOPAGE, 1 },
+       { "share", 0, COFF_STYP_SHARED, 1 },
+       { "noshare", 0, COFF_STYP_SHARED, 0 },
+       { "execute", 0, COFF_STYP_EXECUTE, 1 },
+       { "noexecute", 0, COFF_STYP_EXECUTE, 0 },
+       { "read", 0, COFF_STYP_READ, 1 },
+       { "noread", 0, COFF_STYP_READ, 0 },
+       { "write", 0, COFF_STYP_WRITE, 1 },
+       { "nowrite", 0, COFF_STYP_WRITE, 0 },
+    };
 
     if (!vp || vp->param || !vp->val)
        return NULL;
 
     sectname = vp->val;
     if (strlen(sectname) > 8) {
+       /* TODO: win32 format supports >8 character section names in object
+        * files via "/nnnn" (where nnnn is decimal offset into string table).
+        */
        yasm__warning(YASM_WARN_GENERAL, lindex,
            N_("COFF section names limited to 8 characters: truncating"));
        sectname[8] = '\0';
     }
 
-    if (strcmp(sectname, ".data") == 0)
+    if (strcmp(sectname, ".data") == 0) {
        flags = COFF_STYP_DATA;
-    else if (strcmp(sectname, ".bss") == 0) {
+       if (win32)
+           flags |= COFF_STYP_READ | COFF_STYP_WRITE |
+               (3<<COFF_STYP_ALIGN_SHIFT);     /* align=4 */
+    } else if (strcmp(sectname, ".bss") == 0) {
        flags = COFF_STYP_BSS;
+       if (win32)
+           flags |= COFF_STYP_READ | COFF_STYP_WRITE |
+               (3<<COFF_STYP_ALIGN_SHIFT);     /* align=4 */
        resonly = 1;
-    } else
+    } else if (strcmp(sectname, ".text") == 0) {
+       flags = COFF_STYP_TEXT;
+       if (win32)
+           flags |= COFF_STYP_EXECUTE | COFF_STYP_READ |
+               (5<<COFF_STYP_ALIGN_SHIFT);     /* align=16 */
+    } else if (strcmp(sectname, ".rdata") == 0) {
+       flags = COFF_STYP_DATA;
+       if (win32)
+           flags |= COFF_STYP_READ | (4<<COFF_STYP_ALIGN_SHIFT); /* align=8 */
+       else
+           yasm__warning(YASM_WARN_GENERAL, lindex,
+               N_("Standard COFF does not support read-only data sections"));
+    } else {
+       /* Default to code */
        flags = COFF_STYP_TEXT;
+       if (win32)
+           flags |= COFF_STYP_EXECUTE | COFF_STYP_READ;
+    }
 
     while ((vp = yasm_vps_next(vp))) {
-       if (yasm__strcasecmp(vp->val, "code") == 0 ||
-           yasm__strcasecmp(vp->val, "text") == 0) {
-           flags = COFF_STYP_TEXT;
-           flags_override = 1;
-       } else if (yasm__strcasecmp(vp->val, "data") == 0) {
-           flags = COFF_STYP_DATA;
-           flags_override = 1;
-       } else if (yasm__strcasecmp(vp->val, "bss") == 0) {
-           flags = COFF_STYP_BSS;
-           flags_override = 1;
-           resonly = 1;
+       size_t i;
+       int match, win32warn;
+
+       win32warn = 0;
+
+       match = 0;
+       for (i=0; i<NELEMS(flagquals) && !match; i++) {
+           if (yasm__strcasecmp(vp->val, flagquals[i].name) == 0) {
+               if (!win32 && flagquals[i].stdflags == 0)
+                   win32warn = 1;
+               else switch (flagquals[i].mode) {
+                   case 0:
+                       flags &= ~flagquals[i].stdflags;
+                       if (win32)
+                           flags &= ~flagquals[i].win32flags;
+                       break;
+                   case 1:
+                       flags |= flagquals[i].stdflags;
+                       if (win32)
+                           flags |= flagquals[i].win32flags;
+                       break;
+                   case 2:
+                       flags &= ~COFF_STYP_STD_MASK;
+                       flags |= flagquals[i].stdflags;
+                       if (win32) {
+                           flags &= ~COFF_STYP_WIN32_MASK;
+                           flags |= flagquals[i].win32flags;
+                       }
+                       break;
+               }
+               flags_override = 1;
+               match = 1;
+           }
        }
+
+       if (match)
+           ;
+       else if (yasm__strcasecmp(vp->val, "align") == 0 && vp->param) {
+           if (win32) {
+               /*@dependent@*/ /*@null@*/ const yasm_intnum *align;
+               unsigned long bitcnt;
+               unsigned long addralign;
+
+               align = yasm_expr_get_intnum(&vp->param, NULL);
+               if (!align) {
+                   yasm__error(lindex,
+                               N_("argument to `%s' is not a power of two"),
+                               vp->val);
+                   return NULL;
+               }
+               addralign = yasm_intnum_get_uint(align);
+
+               /* Check to see if alignment is a power of two.
+                * This can be checked by seeing if only one bit is set.
+                */
+               BitCount(bitcnt, addralign);
+               if (bitcnt > 1) {
+                   yasm__error(lindex,
+                               N_("argument to `%s' is not a power of two"),
+                               vp->val);
+                   return NULL;
+               }
+
+               /* Check to see if alignment is supported size */
+               if (addralign > 8192) {
+                   yasm__error(lindex,
+                       N_("Win32 does not support alignments > 8192"));
+                   return NULL;
+               }
+
+               /* Convert alignment into flags setting */
+               flags &= ~COFF_STYP_ALIGN_MASK;
+               while (addralign != 0) {
+                   flags += 1<<COFF_STYP_ALIGN_SHIFT;
+                   addralign >>= 1;
+               }
+           } else
+               win32warn = 1;
+       } else
+           yasm__warning(YASM_WARN_GENERAL, lindex,
+                         N_("Unrecognized qualifier `%s'"), vp->val);
+
+       if (win32warn)
+           yasm__warning(YASM_WARN_GENERAL, lindex,
+               N_("Standard COFF does not support qualifier `%s'"), vp->val);
     }
 
     retval = yasm_sections_switch_general(headp, sectname, 0, resonly, &isnew,
@@ -793,7 +1009,7 @@ coff_objfmt_section_data_print(FILE *f, int indent_level, void *data)
     yasm_symrec_print(f, indent_level+1, csd->sym);
     fprintf(f, "%*sscnum=%d\n", indent_level, "", csd->scnum);
     fprintf(f, "%*sflags=", indent_level, "");
-    switch (csd->flags) {
+    switch (csd->flags & COFF_STYP_STD_MASK) {
        case COFF_STYP_TEXT:
            fprintf(f, "TEXT");
            break;
@@ -914,3 +1130,28 @@ yasm_objfmt yasm_coff_LTX_objfmt = {
     NULL /*coff_objfmt_bc_objfmt_data_delete*/,
     NULL /*coff_objfmt_bc_objfmt_data_print*/
 };
+
+/* Define objfmt structure -- see objfmt.h for details */
+yasm_objfmt yasm_win32_LTX_objfmt = {
+    "Win32",
+    "win32",
+    "obj",
+    ".text",
+    32,
+    coff_objfmt_dbgfmt_keywords,
+    "null",
+    win32_objfmt_initialize,
+    coff_objfmt_output,
+    coff_objfmt_cleanup,
+    coff_objfmt_sections_switch,
+    coff_objfmt_section_data_delete,
+    coff_objfmt_section_data_print,
+    coff_objfmt_extglob_declare,
+    coff_objfmt_extglob_declare,
+    coff_objfmt_common_declare,
+    coff_objfmt_symrec_data_delete,
+    coff_objfmt_symrec_data_print,
+    coff_objfmt_directive,
+    NULL /*coff_objfmt_bc_objfmt_data_delete*/,
+    NULL /*coff_objfmt_bc_objfmt_data_print*/
+};
similarity index 98%
rename from modules/objfmts/dbg/dbg-objfmt.c
rename to yasm/modules/objfmts/dbg/dbg-objfmt.c
index 2cc1c13aa5956fa2d3f3fdb5ac7102ae70bd47db..dbdf5a32de69c40f496124df1bc157649dfedb8e 100644 (file)
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 
@@ -58,11 +58,12 @@ dbg_objfmt_initialize(const char *in_filename, const char *obj_filename,
 }
 
 static void
-dbg_objfmt_output(/*@unused@*/ FILE *f, yasm_sectionhead *sections)
+dbg_objfmt_output(/*@unused@*/ FILE *f, yasm_sectionhead *sections,
+                 int all_syms)
 {
     fprintf(dbg_objfmt_file, "output(f, sections->\n");
     yasm_sections_print(dbg_objfmt_file, 1, sections);
-    fprintf(dbg_objfmt_file, ")\n");
+    fprintf(dbg_objfmt_file, "%d)\n", all_syms);
     fprintf(dbg_objfmt_file, " Symbol Table:\n");
     yasm_symrec_print_all(dbg_objfmt_file, 1);
 }
diff --git a/yasm/modules/objfmts/elf/elf32.c b/yasm/modules/objfmts/elf/elf32.c
new file mode 100644 (file)
index 0000000..4a830de
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * ELF-32 utility functions
+ *
+ *  Copyright (C) 2003  Peter Johnson
+ *
+ *  This file is part of YASM.
+ *
+ *  YASM is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  YASM is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#define YASM_LIB_INTERNAL
+#include "libyasm.h"
+/*@unused@*/ RCSID("$IdPath$");
+
+#include "elf32.h"
+
+/* Converts an ELF-32 header into little endian bytes */
+void
+elf32_write_elf_header(unsigned char **bufp, Elf32_Ehdr *ehdr)
+{
+    int i;
+
+    for (i=0; i<EI_NIDENT; i++)
+       YASM_WRITE_8(*bufp, ehdr->e_ident[i]);
+    YASM_WRITE_16_L(*bufp, ehdr->e_type);
+    YASM_WRITE_16_L(*bufp, ehdr->e_machine);
+    YASM_WRITE_32_L(*bufp, ehdr->e_version);
+    YASM_WRITE_32_L(*bufp, ehdr->e_entry);
+    YASM_WRITE_32_L(*bufp, ehdr->e_phoff);
+    YASM_WRITE_32_L(*bufp, ehdr->e_shoff);
+    YASM_WRITE_32_L(*bufp, ehdr->e_flags);
+    YASM_WRITE_16_L(*bufp, ehdr->e_ehsize);
+    YASM_WRITE_16_L(*bufp, ehdr->e_phentsize);
+    YASM_WRITE_16_L(*bufp, ehdr->e_phnum);
+    YASM_WRITE_16_L(*bufp, ehdr->e_shentsize);
+    YASM_WRITE_16_L(*bufp, ehdr->e_shnum);
+    YASM_WRITE_16_L(*bufp, ehdr->e_shstrndx);
+}
+
+/* Converts an ELF-32 section header into little endian bytes */
+void
+elf32_write_sect_header(unsigned char **bufp, Elf32_Shdr *shdr)
+{
+    YASM_WRITE_32_L(*bufp, shdr->sh_name);
+    YASM_WRITE_32_L(*bufp, shdr->sh_type);
+    YASM_WRITE_32_L(*bufp, shdr->sh_flags);
+    YASM_WRITE_32_L(*bufp, shdr->sh_addr);
+    YASM_WRITE_32_L(*bufp, shdr->sh_offset);
+    YASM_WRITE_32_L(*bufp, shdr->sh_size);
+    YASM_WRITE_32_L(*bufp, shdr->sh_link);
+    YASM_WRITE_32_L(*bufp, shdr->sh_info);
+    YASM_WRITE_32_L(*bufp, shdr->sh_addralign);
+    YASM_WRITE_32_L(*bufp, shdr->sh_entsize);
+}
+
+void
+elf32_print_sect_header(FILE *f, int indent_level, Elf32_Shdr *shdr)
+{
+    static const char *sh_type_names[] = {
+       "null", "progbits", "symtab", "strtab", "rela", "hash", "dynamic",
+       "note", "nobits", "rel", "shlib", "dynsym"
+    };
+
+    fprintf(f, "%*ssh_name=%lu\n", indent_level, "", shdr->sh_name);
+    fprintf(f, "%*ssh_type=", indent_level, "");
+    if (shdr->sh_type < NELEMS(sh_type_names))
+       fprintf(f, "%s", sh_type_names[shdr->sh_type]);
+    else
+       fprintf(f, "%lu", shdr->sh_type);
+    fprintf(f, "\n%*ssh_flags=%lx\n", indent_level, "", shdr->sh_flags);
+    fprintf(f, "%*ssh_addr=0x%lx\n", indent_level, "", shdr->sh_addr);
+    fprintf(f, "%*ssh_offset=0x%lx\n", indent_level, "", shdr->sh_offset);
+    fprintf(f, "%*ssh_size=0x%lx\n", indent_level, "", shdr->sh_size);
+    fprintf(f, "%*ssh_link=%lu\n", indent_level, "", shdr->sh_link);
+    fprintf(f, "%*ssh_info=%lu\n", indent_level, "", shdr->sh_info);
+    fprintf(f, "%*ssh_addralign=%lu\n", indent_level, "", shdr->sh_addralign);
+    fprintf(f, "%*ssh_entsize=%lu\n", indent_level, "", shdr->sh_entsize);
+}
+
+/* Converts an ELF-32 relocation (non-addend) entry into little endian bytes */
+void
+elf32_write_rel(unsigned char **bufp, Elf32_Rel *rel)
+{
+    YASM_WRITE_32_L(*bufp, rel->r_offset);
+    YASM_WRITE_32_L(*bufp, rel->r_info);
+}
+
+/* Converts an ELF-32 symbol table entry into little endian bytes */
+void
+elf32_write_sym(unsigned char **bufp, Elf32_Sym *sym)
+{
+    YASM_WRITE_32_L(*bufp, sym->st_name);
+    YASM_WRITE_32_L(*bufp, sym->st_value);
+    YASM_WRITE_32_L(*bufp, sym->st_size);
+    YASM_WRITE_8(*bufp, sym->st_info);
+    YASM_WRITE_8(*bufp, sym->st_other);
+    YASM_WRITE_16_L(*bufp, sym->st_shndx);
+}
similarity index 94%
rename from modules/objfmts/elf/elf32.h
rename to yasm/modules/objfmts/elf/elf32.h
index 2e80f84dd856448bb710eda3af2d397e155fdbbc..bacb661347a72c9a12e1814e8f0a0e826b338a3e 100644 (file)
@@ -152,4 +152,10 @@ typedef struct {
 /* Macro for constructing st_info from field values. */
 #define ELF32_ST_INFO(bind, type)      (((bind) << 4) + ((type) & 0xf))
 
+void elf32_write_elf_header(unsigned char **bufp, Elf32_Ehdr *ehdr);
+void elf32_write_sect_header(unsigned char **bufp, Elf32_Shdr *shdr);
+void elf32_print_sect_header(FILE *f, int indent_level, Elf32_Shdr *shdr);
+void elf32_write_rel(unsigned char **bufp, Elf32_Rel *rel);
+void elf32_write_sym(unsigned char **bufp, Elf32_Sym *sym);
+
 #endif /* !YASM_ELF32_H */
diff --git a/yasm/modules/objfmts/win32/Makefile.inc b/yasm/modules/objfmts/win32/Makefile.inc
new file mode 100644 (file)
index 0000000..8cc8aad
--- /dev/null
@@ -0,0 +1,14 @@
+# $IdPath$
+
+lib_LTLIBRARIES += yasm-win32.la
+
+yasm_win32_la_SOURCES = \
+       modules/objfmts/coff/coff-objfmt.c
+yasm_win32_la_LDFLAGS = -module -avoid-version -no-undefined
+yasm_win32_la_LIBADD = libyasm.la
+YASM_MODULES += -dlopen yasm-win32.la
+
+EXTRA_DIST += \
+       modules/objfmts/win32/tests/Makefile.inc
+
+include modules/objfmts/win32/tests/Makefile.inc
diff --git a/yasm/modules/objfmts/win32/tests/Makefile.inc b/yasm/modules/objfmts/win32/tests/Makefile.inc
new file mode 100644 (file)
index 0000000..5e66fc7
--- /dev/null
@@ -0,0 +1,11 @@
+# $IdPath$
+
+TESTS += \
+       modules/objfmts/win32/tests/win32_test.sh
+
+EXTRA_DIST += \
+       modules/objfmts/win32/tests/win32_test.sh       \
+       modules/objfmts/win32/tests/win32test.c         \
+       modules/objfmts/win32/tests/win32test.asm       \
+       modules/objfmts/win32/tests/win32test.hex       \
+       modules/objfmts/win32/tests/win32test.errwarn
diff --git a/yasm/modules/objfmts/win32/tests/win32_test.sh b/yasm/modules/objfmts/win32/tests/win32_test.sh
new file mode 100755 (executable)
index 0000000..8fe2855
--- /dev/null
@@ -0,0 +1,4 @@
+#! /bin/sh
+# $IdPath$
+${srcdir}/out_test.sh win32_test modules/objfmts/win32/tests "win32 objfmt" "-f win32" ".obj"
+exit $?
diff --git a/yasm/modules/objfmts/win32/tests/win32test.asm b/yasm/modules/objfmts/win32/tests/win32test.asm
new file mode 100644 (file)
index 0000000..17b93f9
--- /dev/null
@@ -0,0 +1,82 @@
+; test source file for assembling to COFF
+; build with (under DJGPP, for example):
+;    yasm -f coff cofftest.asm
+;    gcc -o cofftest cofftest.c cofftest.o
+
+; This file should test the following:
+; [1] Define and export a global text-section symbol
+; [2] Define and export a global data-section symbol
+; [3] Define and export a global BSS-section symbol
+; [4] Define a non-global text-section symbol
+; [5] Define a non-global data-section symbol
+; [6] Define a non-global BSS-section symbol
+; [7] Define a COMMON symbol
+; [8] Define a NASM local label
+; [9] Reference a NASM local label
+; [10] Import an external symbol
+; [11] Make a PC-relative call to an external symbol
+; [12] Reference a text-section symbol in the text section
+; [13] Reference a data-section symbol in the text section
+; [14] Reference a BSS-section symbol in the text section
+; [15] Reference a text-section symbol in the data section
+; [16] Reference a data-section symbol in the data section
+; [17] Reference a BSS-section symbol in the data section
+
+[BITS 32]
+[GLOBAL _lrotate]      ; [1]
+[GLOBAL _greet]                ; [1]
+[GLOBAL _asmstr]       ; [2]
+[GLOBAL _textptr]      ; [2]
+[GLOBAL _selfptr]      ; [2]
+[GLOBAL _integer]      ; [3]
+[EXTERN _printf]       ; [10]
+[COMMON _commvar 4]    ; [7]
+
+[SECTION .text]
+
+; prototype: long lrotate(long x, int num);
+_lrotate:                      ; [1]
+         push ebp
+         mov ebp,esp
+         mov eax,[ebp+8]
+         mov ecx,[ebp+12]
+.label   rol eax,1             ; [4] [8]
+         loop .label           ; [9] [12]
+         mov esp,ebp
+         pop ebp
+         ret
+
+; prototype: void greet(void);
+_greet   mov eax,[_integer]    ; [14]
+         inc eax
+         mov [localint],eax    ; [14]
+         push dword [_commvar]
+         mov eax,[localptr]    ; [13]
+         push dword [eax]
+         push dword [_integer] ; [1] [14]
+         push dword _printfstr ; [13]
+         call _printf          ; [11]
+         add esp,16
+         ret
+
+[SECTION .data]
+
+; a string
+_asmstr          db 'hello, world', 0  ; [2]
+
+; a string for Printf
+_printfstr db "integer==%d, localint==%d, commvar=%d"
+         db 10, 0
+
+; some pointers
+localptr  dd localint          ; [5] [17]
+_textptr  dd _greet            ; [15]
+_selfptr  dd _selfptr          ; [16]
+
+[SECTION .bss]
+
+; an integer
+_integer  resd 1               ; [3]
+
+; a local integer
+localint  resd 1               ; [6]
diff --git a/yasm/modules/objfmts/win32/tests/win32test.c b/yasm/modules/objfmts/win32/tests/win32test.c
new file mode 100644 (file)
index 0000000..f7446b8
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * test source file for assembling to COFF
+ * build with (under DJGPP, for example):
+ *    yasm -f coff cofftest.asm
+ *    gcc -o cofftest cofftest.c cofftest.o
+ */
+
+#include <stdio.h>
+
+extern int lrotate(long, int);
+extern void greet(void);
+extern char asmstr[];
+extern void *selfptr;
+extern void *textptr;
+extern int integer, commvar;
+
+int main(void) {
+
+    printf("Testing lrotate: should get 0x00400000, 0x00000001\n");
+    printf("lrotate(0x00040000, 4) = 0x%08lx\n", lrotate(0x40000,4));
+    printf("lrotate(0x00040000, 14) = 0x%08lx\n", lrotate(0x40000,14));
+
+    printf("This string should read `hello, world': `%s'\n", asmstr);
+
+    printf("The integers here should be 1234, 1235 and 4321:\n");
+    integer = 1234;
+    commvar = 4321;
+    greet();
+
+    printf("These pointers should be equal: %p and %p\n",
+          &greet, textptr);
+
+    printf("So should these: %p and %p\n", selfptr, &selfptr);
+}
diff --git a/yasm/modules/objfmts/win32/tests/win32test.hex b/yasm/modules/objfmts/win32/tests/win32test.hex
new file mode 100644 (file)
index 0000000..3697acb
--- /dev/null
@@ -0,0 +1,660 @@
+4c 
+01 
+03 
+00 
+00 
+00 
+00 
+00 
+70 
+01 
+00 
+00 
+10 
+00 
+00 
+00 
+00 
+00 
+0c 
+01 
+2e 
+74 
+65 
+78 
+74 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+40 
+00 
+00 
+00 
+8c 
+00 
+00 
+00 
+cc 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+07 
+00 
+00 
+00 
+20 
+00 
+50 
+60 
+2e 
+64 
+61 
+74 
+61 
+00 
+00 
+00 
+40 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+40 
+00 
+00 
+00 
+12 
+01 
+00 
+00 
+52 
+01 
+00 
+00 
+00 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+40 
+00 
+30 
+c0 
+2e 
+62 
+73 
+73 
+00 
+00 
+00 
+00 
+80 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+08 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+80 
+00 
+30 
+c0 
+55 
+89 
+e5 
+8b 
+45 
+08 
+8b 
+4d 
+0c 
+d1 
+c0 
+e2 
+fc 
+89 
+ec 
+5d 
+c3 
+a1 
+00 
+00 
+00 
+00 
+40 
+a3 
+04 
+00 
+00 
+00 
+ff 
+35 
+00 
+00 
+00 
+00 
+a1 
+34 
+00 
+00 
+00 
+ff 
+30 
+ff 
+35 
+00 
+00 
+00 
+00 
+68 
+0d 
+00 
+00 
+00 
+e8 
+00 
+00 
+00 
+00 
+81 
+c4 
+10 
+00 
+00 
+00 
+c3 
+12 
+00 
+00 
+00 
+0e 
+00 
+00 
+00 
+06 
+00 
+18 
+00 
+00 
+00 
+0e 
+00 
+00 
+00 
+06 
+00 
+1e 
+00 
+00 
+00 
+0b 
+00 
+00 
+00 
+06 
+00 
+23 
+00 
+00 
+00 
+0c 
+00 
+00 
+00 
+06 
+00 
+2b 
+00 
+00 
+00 
+0e 
+00 
+00 
+00 
+06 
+00 
+30 
+00 
+00 
+00 
+0c 
+00 
+00 
+00 
+06 
+00 
+35 
+00 
+00 
+00 
+0a 
+00 
+00 
+00 
+14 
+00 
+68 
+65 
+6c 
+6c 
+6f 
+2c 
+20 
+77 
+6f 
+72 
+6c 
+64 
+00 
+69 
+6e 
+74 
+65 
+67 
+65 
+72 
+3d 
+3d 
+25 
+64 
+2c 
+20 
+6c 
+6f 
+63 
+61 
+6c 
+69 
+6e 
+74 
+3d 
+3d 
+25 
+64 
+2c 
+20 
+63 
+6f 
+6d 
+6d 
+76 
+61 
+72 
+3d 
+25 
+64 
+0a 
+00 
+04 
+00 
+00 
+00 
+11 
+00 
+00 
+00 
+3c 
+00 
+00 
+00 
+34 
+00 
+00 
+00 
+0e 
+00 
+00 
+00 
+06 
+00 
+38 
+00 
+00 
+00 
+02 
+00 
+00 
+00 
+06 
+00 
+3c 
+00 
+00 
+00 
+0c 
+00 
+00 
+00 
+06 
+00 
+2e 
+66 
+69 
+6c 
+65 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+fe 
+ff 
+00 
+00 
+67 
+01 
+2d 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+2e 
+74 
+65 
+78 
+74 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+03 
+01 
+40 
+00 
+00 
+00 
+07 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+5f 
+6c 
+72 
+6f 
+74 
+61 
+74 
+65 
+00 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+02 
+00 
+5f 
+67 
+72 
+65 
+65 
+74 
+00 
+00 
+11 
+00 
+00 
+00 
+01 
+00 
+00 
+00 
+02 
+00 
+5f 
+61 
+73 
+6d 
+73 
+74 
+72 
+00 
+00 
+00 
+00 
+00 
+02 
+00 
+00 
+00 
+02 
+00 
+5f 
+74 
+65 
+78 
+74 
+70 
+74 
+72 
+38 
+00 
+00 
+00 
+02 
+00 
+00 
+00 
+02 
+00 
+5f 
+73 
+65 
+6c 
+66 
+70 
+74 
+72 
+3c 
+00 
+00 
+00 
+02 
+00 
+00 
+00 
+02 
+00 
+5f 
+69 
+6e 
+74 
+65 
+67 
+65 
+72 
+00 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+02 
+00 
+5f 
+70 
+72 
+69 
+6e 
+74 
+66 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+02 
+00 
+5f 
+63 
+6f 
+6d 
+6d 
+76 
+61 
+72 
+04 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+02 
+00 
+2e 
+64 
+61 
+74 
+61 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+02 
+00 
+00 
+00 
+03 
+01 
+40 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+2e 
+62 
+73 
+73 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+03 
+00 
+00 
+00 
+03 
+01 
+08 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+00 
+04 
+00 
+00 
+00 
similarity index 99%
rename from modules/optimizers/basic/basic-optimizer.c
rename to yasm/modules/optimizers/basic/basic-optimizer.c
index fea7f8fcf26076ddee37cf058e83a79f1d746599..ff47e175535cbae65578ecdb21a1e8f4de3087da 100644 (file)
@@ -26,7 +26,7 @@
  */
 #define YASM_LIB_INTERNAL
 #define YASM_BC_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 
similarity index 99%
rename from modules/parsers/nasm/nasm-bison.y
rename to yasm/modules/parsers/nasm/nasm-bison.y
index 3032d501b1d570b373349c7cbeb960c09ff525f7..0e0203de4cff16c5eeb10459badcec95355f64f4 100644 (file)
@@ -27,7 +27,7 @@
 %{
 #define YASM_LIB_INTERNAL
 #define YASM_EXPR_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 RCSID("$IdPath$");
 
 #ifdef STDC_HEADERS
similarity index 98%
rename from modules/parsers/nasm/nasm-parser.c
rename to yasm/modules/parsers/nasm/nasm-parser.c
index 5f8edece98b5a0ab97b0a3e7009ca3b7f359609e..a9796abe7b89ef913291c5b5628acac9c3295fb8 100644 (file)
@@ -25,7 +25,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 /*@unused@*/ RCSID("$IdPath$");
 
 #include "nasm-parser.h"
@@ -82,6 +82,8 @@ nasm_parser_do_parse(yasm_preproc *pp, yasm_arch *a, yasm_objfmt *of,
 /* Define valid preprocessors to use with this parser */
 static const char *nasm_parser_preproc_keywords[] = {
     "raw",
+    "nasm",
+    "yapp",
     NULL
 };
 
similarity index 98%
rename from modules/parsers/nasm/nasm-token.re
rename to yasm/modules/parsers/nasm/nasm-token.re
index 854ecc06adca3f33c0da9e940cca148dbf02e943..50b1bedc04a35c6ad188cb0c4ab8278cb7f7d42f 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #define YASM_LIB_INTERNAL
-#include "libyasm.h"
+#include <libyasm.h>
 RCSID("$IdPath$");
 
 #include "modules/parsers/nasm/nasm-parser.h"
@@ -51,7 +51,7 @@ RCSID("$IdPath$");
        s.tok = cursor; \
     }
 
-#define TOKLEN         (cursor-s.tok)
+#define TOKLEN         (size_t)(cursor-s.tok)
 
 typedef struct Scanner {
     YYCTYPE            *bot, *tok, *ptr, *cur, *pos, *lim, *top, *eof;
@@ -70,7 +70,7 @@ fill(YYCTYPE *cursor)
     if(!s.eof){
        size_t cnt = s.tok - s.bot;
        if(cnt){
-           memcpy(s.bot, s.tok, s.lim - s.tok);
+           memcpy(s.bot, s.tok, (size_t)(s.lim - s.tok));
            s.tok = s.bot;
            s.ptr -= cnt;
            cursor -= cnt;
@@ -80,8 +80,8 @@ fill(YYCTYPE *cursor)
        if (!s.bot)
            first = 1;
        if((s.top - s.lim) < BSIZE){
-           char *buf = yasm_xmalloc((s.lim - s.bot) + BSIZE);
-           memcpy(buf, s.tok, s.lim - s.tok);
+           char *buf = yasm_xmalloc((size_t)(s.lim - s.bot) + BSIZE);
+           memcpy(buf, s.tok, (size_t)(s.lim - s.tok));
            s.tok = buf;
            s.ptr = &buf[s.ptr - s.bot];
            cursor = &buf[cursor - s.bot];
similarity index 98%
rename from modules/preprocs/nasm/nasm-eval.c
rename to yasm/modules/preprocs/nasm/nasm-eval.c
index 1991a4d19028ce3bbe5a9b43d763c556f8ba75c6..942f4c8bb96255735a86a181466a1a72e25e9939 100644 (file)
@@ -511,8 +511,8 @@ static nasm_expr *expr3(int critical)
            e = scalarvect (nasm_reloc_value(e) << nasm_reloc_value(f));
            break;
          case TOKEN_SHR:
-           e = scalarvect (((unsigned long)nasm_reloc_value(e)) >>
-                           nasm_reloc_value(f));
+           e = scalarvect ((long)(((unsigned long)nasm_reloc_value(e)) >>
+                           nasm_reloc_value(f)));
            break;
        }
     }
@@ -589,15 +589,15 @@ static nasm_expr *expr5(int critical)
            if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
                e = unknown_expr();
            else
-               e = scalarvect (((unsigned long)nasm_reloc_value(e)) /
-                               ((unsigned long)nasm_reloc_value(f)));
+               e = scalarvect ((long)(((unsigned long)nasm_reloc_value(e)) /
+                               ((unsigned long)nasm_reloc_value(f))));
            break;
          case '%':
            if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
                e = unknown_expr();
            else
-               e = scalarvect (((unsigned long)nasm_reloc_value(e)) %
-                               ((unsigned long)nasm_reloc_value(f)));
+               e = scalarvect ((long)(((unsigned long)nasm_reloc_value(e)) %
+                               ((unsigned long)nasm_reloc_value(f))));
            break;
          case TOKEN_SDIV:
            if (nasm_is_just_unknown(e) || nasm_is_just_unknown(f))
similarity index 99%
rename from modules/preprocs/nasm/nasm-pp.c
rename to yasm/modules/preprocs/nasm/nasm-pp.c
index 9d8c30eb39bd32b54fa393c703a5dbcfd5f3a4e7..012531d52e9193cbc309a96109d9a0961b23dd5b 100644 (file)
@@ -445,7 +445,8 @@ static Token *delete_Token(Token * t);
 static char *
 check_tasm_directive(char *line)
 {
-    int i, j, k, m, len;
+    int i, j, k, m;
+    size_t len;
     char *p = line, *oldline, oldchar;
 
     /* Skip whitespace */
@@ -513,7 +514,8 @@ check_tasm_directive(char *line)
 static char *
 prepreproc(char *line)
 {
-    int lineno, fnlen;
+    int lineno;
+    size_t fnlen;
     char *fname, *oldline;
 
     if (line[0] == '#' && line[1] == ' ')
@@ -526,7 +528,7 @@ prepreproc(char *line)
            fname++;
        fnlen = strcspn(fname, "\"");
        line = nasm_malloc(20 + fnlen);
-       sprintf(line, "%%line %d %.*s", lineno, fnlen, fname);
+       sprintf(line, "%%line %d %.*s", lineno, (int)fnlen, fname);
        nasm_free(oldline);
     }
     if (tasm_compatible_mode)
@@ -544,7 +546,7 @@ static int
 hash(char *s)
 {
     unsigned int h = 0;
-    int i = 0;
+    unsigned int i = 0;
     /*
      * Powers of three, mod 31.
      */
@@ -722,7 +724,7 @@ read_line(void)
        {
            long offset = p - buffer;
            bufsize += BUF_DELTA;
-           buffer = nasm_realloc(buffer, bufsize);
+           buffer = nasm_realloc(buffer, (size_t)bufsize);
            p = buffer + offset;        /* prevent stale-pointer problems */
        }
     }
@@ -988,8 +990,8 @@ new_Token(Token * next, int type, const char *text, int txtlen)
     {
        if (txtlen == 0)
            txtlen = strlen(text);
-       t->text = nasm_malloc(1 + txtlen);
-       strncpy(t->text, text, txtlen);
+       t->text = nasm_malloc(1 + (size_t)txtlen);
+       strncpy(t->text, text, (size_t)txtlen);
        t->text[txtlen] = '\0';
     }
     return t;
@@ -1056,7 +1058,7 @@ detoken(Token * tlist, int expand_locals)
            len += strlen(t->text);
        }
     }
-    p = line = nasm_malloc(len + 1);
+    p = line = nasm_malloc((size_t)len + 1);
     for (t = tlist; t; t = t->next)
     {
        if (t->type == TOK_WHITESPACE)
@@ -2812,7 +2814,7 @@ do_directive(Token * tline)
 
            macro_start = nasm_malloc(sizeof(*macro_start));
            macro_start->next = NULL;
-           make_tok_num(macro_start, strlen(t->text) - 2);
+           make_tok_num(macro_start, (int)strlen(t->text) - 2);
            macro_start->mac = NULL;
 
            /*
@@ -2912,7 +2914,7 @@ do_directive(Token * tline)
            macro_start->next = NULL;
            macro_start->text = nasm_strdup("'''");
            if (evalresult->value > 0
-                   && evalresult->value < strlen(t->text) - 1)
+                   && evalresult->value < (int)strlen(t->text) - 1)
            {
                macro_start->text[1] = t->text[evalresult->value];
            }
similarity index 99%
rename from modules/preprocs/nasm/nasmlib.c
rename to yasm/modules/preprocs/nasm/nasmlib.c
index 6b025dfd4bd11deb709deaa034b00183c2e5f567..d74d053f4c8d71ed666b80f41a3b1abbb30ec952 100644 (file)
@@ -344,7 +344,7 @@ int nasm_src_get(long *xline, char **xname)
 
 void nasm_quote(char **str) 
 {
-    int ln=strlen(*str);
+    size_t ln=strlen(*str);
     char q=(*str)[0];
     char *p;
     if (ln>1 && (*str)[ln-1]==q && (q=='"' || q=='\''))
similarity index 99%
rename from modules/preprocs/yapp/yapp-preproc.c
rename to yasm/modules/preprocs/yapp/yapp-preproc.c
index 593437295d9044693faa3ba4f53e4f63b2927cdb..68e154e428b0f388390b3a4fb993d2a1d0efd539 100644 (file)
@@ -418,7 +418,7 @@ append_token(int token, struct source_head *to_head, source **to_tail)
     }
 }
 
-void
+static void
 replay_saved_tokens(char *ident,
                    struct source_head *from_head,
                    struct source_head *to_head,
@@ -748,11 +748,11 @@ static size_t
 yapp_preproc_input(char *buf, size_t max_size)
 {
     static YAPP_State state = YAPP_STATE_INITIAL;
-    int n = 0;
+    size_t n = 0;
     int token;
     int need_line_directive = 0;
 
-    while (saved_length < max_size && state != YAPP_STATE_EOF)
+    while ((size_t)saved_length < max_size && state != YAPP_STATE_EOF)
     {
        token = yapp_preproc_lex();
 
similarity index 99%
rename from modules/preprocs/yapp/yapp-token.l
rename to yasm/modules/preprocs/yapp/yapp-token.l
index 8423430ec33a61339f8dbab9119795e4114f6650..7889ea3f73ebc0422c26e9471f214174f9de248a 100644 (file)
@@ -122,7 +122,8 @@ DIR  %[ \t]*
 
     /* string/character constant values */
 ["']   {
-    int inch, count;
+    int inch;
+    size_t count;
     char endch = yytext[0];
 
     strbuf = yasm_xmalloc(STRBUF_ALLOC_SIZE);
similarity index 100%
rename from out_test.sh
rename to yasm/out_test.sh
similarity index 100%
rename from po/.cvsignore
rename to yasm/po/.cvsignore
diff --git a/yasm/po/ChangeLog b/yasm/po/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
similarity index 100%
rename from po/Makefile.in.in
rename to yasm/po/Makefile.in.in
similarity index 100%
rename from po/Makevars
rename to yasm/po/Makevars
similarity index 100%
rename from po/POTFILES.in
rename to yasm/po/POTFILES.in
similarity index 100%
rename from po/Rules-quot
rename to yasm/po/Rules-quot
similarity index 100%
rename from po/boldquot.sed
rename to yasm/po/boldquot.sed
similarity index 100%
rename from po/en@quot.header
rename to yasm/po/en@quot.header
similarity index 100%
rename from po/quot.sed
rename to yasm/po/quot.sed
similarity index 100%
rename from splint.sh
rename to yasm/splint.sh
similarity index 100%
rename from test_hd.pl
rename to yasm/test_hd.pl
similarity index 100%
rename from tests/nasm/bits.asm
rename to yasm/tests/nasm/bits.asm
similarity index 100%
rename from tests/nasm/data.asm
rename to yasm/tests/nasm/data.asm
similarity index 100%
rename from tests/nasm/dir.asm
rename to yasm/tests/nasm/dir.asm
similarity index 100%
rename from tests/nasm/equ.asm
rename to yasm/tests/nasm/equ.asm
similarity index 100%
rename from tests/nasm/fp.asm
rename to yasm/tests/nasm/fp.asm
similarity index 100%
rename from tests/nasm/fp2.asm
rename to yasm/tests/nasm/fp2.asm
similarity index 100%
rename from tests/nasm/mem.asm
rename to yasm/tests/nasm/mem.asm
similarity index 100%
rename from tests/nasm/mem2.asm
rename to yasm/tests/nasm/mem2.asm
similarity index 100%
rename from tests/nasm/org.asm
rename to yasm/tests/nasm/org.asm
similarity index 100%
rename from tests/nasm/org2.asm
rename to yasm/tests/nasm/org2.asm
similarity index 100%
rename from tools/Makefile.inc
rename to yasm/tools/Makefile.inc
similarity index 100%
rename from tools/re2c/README
rename to yasm/tools/re2c/README
similarity index 100%
rename from tools/re2c/basics.h
rename to yasm/tools/re2c/basics.h
diff --git a/yasm/tools/re2c/cleanup.pl b/yasm/tools/re2c/cleanup.pl
new file mode 100755 (executable)
index 0000000..84f3da1
--- /dev/null
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+my @sourcelines = <>;
+my %usedlabel;
+my %usedvar;
+my $lastusedvarline = 0;
+my $level = 0;
+my $line = 1;
+for (@sourcelines) {
+    $usedlabel{"$1:"} = "$1:" if m/goto\s+(yy[0-9]*)\s*;/;
+    $level = $level + 1 if m/\{/;
+    $level = $level - 1 if m/\}/;
+    if ($level < $usedvar{$lastusedvarline}) {
+       $lastusedvarline = 0;
+    }
+    if (m/int\s+yyaccept/) {
+       $usedvar{$line} = $level;
+       $lastusedvarline = $line;
+    } elsif (m/yyaccept/) {
+       $usedvar{$lastusedvarline} = 1000;
+    }
+    $line = $line + 1;
+}
+$line = 1;
+for (@sourcelines) {
+    s/^(yy[0-9]*:)/$usedlabel{$1}/;
+    if ($usedvar{$line} != 0 && $usedvar{$line} != 1000) {
+       print "\n";
+    } else {
+       print;
+    }
+    $line = $line + 1;
+}
similarity index 100%
rename from tools/re2c/code.c
rename to yasm/tools/re2c/code.c
similarity index 100%
rename from tools/re2c/dfa.c
rename to yasm/tools/re2c/dfa.c
similarity index 100%
rename from tools/re2c/dfa.h
rename to yasm/tools/re2c/dfa.h
similarity index 100%
rename from tools/re2c/ins.h
rename to yasm/tools/re2c/ins.h
similarity index 100%
rename from tools/re2c/main.c
rename to yasm/tools/re2c/main.c
similarity index 100%
rename from tools/re2c/parse.h
rename to yasm/tools/re2c/parse.h
similarity index 100%
rename from tools/re2c/re.h
rename to yasm/tools/re2c/re.h
similarity index 100%
rename from tools/re2c/re2c.1
rename to yasm/tools/re2c/re2c.1
similarity index 100%
rename from tools/re2c/substr.c
rename to yasm/tools/re2c/substr.c
similarity index 100%
rename from tools/re2c/substr.h
rename to yasm/tools/re2c/substr.h
similarity index 100%
rename from tools/re2c/token.h
rename to yasm/tools/re2c/token.h
similarity index 97%
rename from libyasm/util.h
rename to yasm/util.h
index 9cf5a0bc030e96afea9585e4da402da46019817f..ca3e26233344ce98f01f4f2338276bd3ff25a976 100644 (file)
@@ -42,7 +42,7 @@
 # include <stdarg.h>
 
 #if defined(YASM_LIB_AC_INTERNAL) && defined(HAVE_CONFIG_H)
-# include "libyasm/config.h"
+# include <libyasm/config.h>
 #endif
 
 #if !defined(lint) && !defined(NDEBUG)
@@ -126,7 +126,7 @@ int yasm__strncasecmp(const char *s1, const char *s2, size_t n);
 
 #endif /*YASM_AUTOCONF_INTERNAL*/
 
-#include "libyasm/compat-queue.h"
+#include <libyasm/compat-queue.h>
 
 #if defined(YASM_AUTOCONF_INTERNAL) && defined(HAVE_SYS_CDEFS_H)
 # include <sys/cdefs.h>
@@ -195,8 +195,8 @@ extern void (*yasm_xfree) (/*@only@*/ /*@out@*/ /*@null@*/ void *p)
 
 #endif /*YASM_INTERNAL*/
 
-#include "libyasm/coretype.h"
+#include <libyasm/coretype.h>
 
-#include "libyasm/valparam.h"
+#include <libyasm/valparam.h>
 
 #endif