From d03ab9a413bc59b7af52e3d06ca17adcef151a38 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 27 Mar 2003 05:06:10 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'YASM_0_2'. svn path=/branches/YASM_0_2/; revision=892 --- Mkfiles/Makefile.dj | 76 -- Mkfiles/Makefile.flat | 99 --- Mkfiles/Makefile.vc | 76 -- tools/re2c/cleanup.pl | 10 - .cvsignore => yasm/.cvsignore | 0 .indent.pro => yasm/.indent.pro | 0 ABOUT-NLS => yasm/ABOUT-NLS | 0 AUTHORS => yasm/AUTHORS | 0 COPYING => yasm/COPYING | 0 COPYING.LIB-2.0 => yasm/COPYING.LIB-2.0 | 0 ChangeLog => yasm/ChangeLog | 0 HACKING => yasm/HACKING | 0 INSTALL => yasm/INSTALL | 0 Makefile.am => yasm/Makefile.am | 15 +- yasm/Mkfiles/Makefile.dj | 98 +++ yasm/Mkfiles/Makefile.flat | 101 +++ {Mkfiles => yasm/Mkfiles}/dj/config.h | 28 +- yasm/Mkfiles/dj/libyasm/config.h | 336 +++++++++ {Mkfiles => yasm/Mkfiles}/nightly-build.pl | 0 {Mkfiles => yasm/Mkfiles}/vc/.cvsignore | 0 {Mkfiles => yasm/Mkfiles}/vc/config.h | 0 .../Mkfiles}/vc/libyasm/.cvsignore | 0 {Mkfiles => yasm/Mkfiles}/vc/libyasm/config.h | 0 .../Mkfiles}/vc/libyasm/libyasm.dep | 0 .../Mkfiles}/vc/libyasm/libyasm.dsp | 0 .../Mkfiles}/vc/libyasm/libyasm.mak | 0 .../Mkfiles}/vc/modules/.cvsignore | 0 .../Mkfiles}/vc/modules/modules.dep | 0 .../Mkfiles}/vc/modules/modules.dsp | 0 .../Mkfiles}/vc/modules/modules.mak | 0 {Mkfiles => yasm/Mkfiles}/vc/yasm-module.c | 4 +- {Mkfiles => yasm/Mkfiles}/vc/yasm.dep | 0 {Mkfiles => yasm/Mkfiles}/vc/yasm.dsp | 0 {Mkfiles => yasm/Mkfiles}/vc/yasm.dsw | 0 {Mkfiles => yasm/Mkfiles}/vc/yasm.mak | 0 NEWS => yasm/NEWS | 0 README => yasm/README | 0 autogen.sh => yasm/autogen.sh | 0 {check => yasm/check}/Makefile.inc | 0 {check => yasm/check}/NEWS | 0 {check => yasm/check}/README | 0 {check => yasm/check}/check.c | 0 {check => yasm/check}/check.h | 0 {check => yasm/check}/check_impl.h | 0 {check => yasm/check}/check_log.c | 0 {check => yasm/check}/check_log.h | 0 {check => yasm/check}/check_msg.c | 0 {check => yasm/check}/check_msg.h | 0 {check => yasm/check}/check_print.c | 0 {check => yasm/check}/check_print.h | 0 {check => yasm/check}/check_run.c | 0 {check => yasm/check}/error.c | 0 {check => yasm/check}/error.h | 0 {check => yasm/check}/list.c | 0 {check => yasm/check}/list.h | 0 {config => yasm/config}/config.guess | 0 {config => yasm/config}/config.rpath | 0 {config => yasm/config}/config.sub | 0 {config => yasm/config}/ltmain.sh | 0 {config => yasm/config}/ylwrap | 0 configure.ac => yasm/configure.ac | 4 +- .../doc}/programmer/bitvect/.cvsignore | 0 {doc => yasm/doc}/programmer/queue/.cvsignore | 0 {float => yasm/float}/gdtoa/Makefile | 0 {float => yasm/float}/gdtoa/README | 0 {float => yasm/float}/gdtoa/arithchk.c | 0 {float => yasm/float}/gdtoa/dmisc.c | 0 {float => yasm/float}/gdtoa/dtoa.c | 0 {float => yasm/float}/gdtoa/g_Qfmt.c | 0 {float => yasm/float}/gdtoa/g__fmt.c | 0 {float => yasm/float}/gdtoa/g_ddfmt.c | 0 {float => yasm/float}/gdtoa/g_dfmt.c | 0 {float => yasm/float}/gdtoa/g_ffmt.c | 0 {float => yasm/float}/gdtoa/g_xLfmt.c | 0 {float => yasm/float}/gdtoa/g_xfmt.c | 0 {float => yasm/float}/gdtoa/gdtoa.c | 0 {float => yasm/float}/gdtoa/gdtoa.h | 0 {float => yasm/float}/gdtoa/gdtoaimp.h | 0 {float => yasm/float}/gdtoa/gethex.c | 0 {float => yasm/float}/gdtoa/gmisc.c | 0 {float => yasm/float}/gdtoa/hd_init.c | 0 {float => yasm/float}/gdtoa/hexnan.c | 0 {float => yasm/float}/gdtoa/misc.c | 0 {float => yasm/float}/gdtoa/smisc.c | 0 {float => yasm/float}/gdtoa/strtoIQ.c | 0 {float => yasm/float}/gdtoa/strtoId.c | 0 {float => yasm/float}/gdtoa/strtoIdd.c | 0 {float => yasm/float}/gdtoa/strtoIf.c | 0 {float => yasm/float}/gdtoa/strtoIg.c | 0 {float => yasm/float}/gdtoa/strtoIx.c | 0 {float => yasm/float}/gdtoa/strtoIxL.c | 0 {float => yasm/float}/gdtoa/strtod.c | 0 {float => yasm/float}/gdtoa/strtodI.c | 0 {float => yasm/float}/gdtoa/strtodg.c | 0 {float => yasm/float}/gdtoa/strtof.c | 0 {float => yasm/float}/gdtoa/strtopQ.c | 0 {float => yasm/float}/gdtoa/strtopd.c | 0 {float => yasm/float}/gdtoa/strtopdd.c | 0 {float => yasm/float}/gdtoa/strtopf.c | 0 {float => yasm/float}/gdtoa/strtopx.c | 0 {float => yasm/float}/gdtoa/strtopxL.c | 0 {float => yasm/float}/gdtoa/strtorQ.c | 0 {float => yasm/float}/gdtoa/strtord.c | 0 {float => yasm/float}/gdtoa/strtordd.c | 0 {float => yasm/float}/gdtoa/strtorf.c | 0 {float => yasm/float}/gdtoa/strtorx.c | 0 {float => yasm/float}/gdtoa/strtorxL.c | 0 {float => yasm/float}/gdtoa/sum.c | 0 {float => yasm/float}/gdtoa/test/Makefile | 0 {float => yasm/float}/gdtoa/test/Q.ou0 | 0 {float => yasm/float}/gdtoa/test/Q.ou1 | 0 {float => yasm/float}/gdtoa/test/Qtest.c | 0 {float => yasm/float}/gdtoa/test/README | 0 {float => yasm/float}/gdtoa/test/d.out | 0 {float => yasm/float}/gdtoa/test/dI.out | 0 {float => yasm/float}/gdtoa/test/dIsi.out | 0 {float => yasm/float}/gdtoa/test/dItest.c | 0 {float => yasm/float}/gdtoa/test/dd.out | 0 {float => yasm/float}/gdtoa/test/ddsi.out | 0 {float => yasm/float}/gdtoa/test/ddtest.c | 0 {float => yasm/float}/gdtoa/test/dt.c | 0 {float => yasm/float}/gdtoa/test/dtest.c | 0 {float => yasm/float}/gdtoa/test/dtst.out | 0 {float => yasm/float}/gdtoa/test/f.out | 0 {float => yasm/float}/gdtoa/test/ftest.c | 0 {float => yasm/float}/gdtoa/test/getround.c | 0 {float => yasm/float}/gdtoa/test/rtestnos | 0 {float => yasm/float}/gdtoa/test/strtoIdSI.c | 0 {float => yasm/float}/gdtoa/test/strtoIddSI.c | 0 {float => yasm/float}/gdtoa/test/strtodISI.c | 0 {float => yasm/float}/gdtoa/test/strtodt.c | 0 {float => yasm/float}/gdtoa/test/strtopddSI.c | 0 {float => yasm/float}/gdtoa/test/strtorddSI.c | 0 {float => yasm/float}/gdtoa/test/testnos | 0 {float => yasm/float}/gdtoa/test/testnos1 | 0 {float => yasm/float}/gdtoa/test/testnos3 | 0 {float => yasm/float}/gdtoa/test/x.ou0 | 0 {float => yasm/float}/gdtoa/test/x.ou1 | 0 {float => yasm/float}/gdtoa/test/xL.ou0 | 0 {float => yasm/float}/gdtoa/test/xL.ou1 | 0 {float => yasm/float}/gdtoa/test/xLtest.c | 0 {float => yasm/float}/gdtoa/test/xQtest.c | 0 {float => yasm/float}/gdtoa/test/xsum0.out | 0 {float => yasm/float}/gdtoa/test/xtest.c | 0 {float => yasm/float}/gdtoa/ulp.c | 0 {float => yasm/float}/gdtoa/xsum0.out | 0 .../float}/softfloat/processors/386-GCC.h | 0 .../float}/softfloat/processors/SPARC-GCC.h | 0 .../float}/softfloat/softfloat/README.txt | 0 .../softfloat/softfloat/SoftFloat-history.txt | 0 .../softfloat/softfloat/SoftFloat-source.txt | 0 .../float}/softfloat/softfloat/SoftFloat.txt | 0 .../softfloat/bits32/386-Win32-GCC/milieu.h | 0 .../bits32/386-Win32-GCC/softfloat-specialize | 0 .../bits32/386-Win32-GCC/softfloat.h | 0 .../bits32/SPARC-Solaris-GCC/milieu.h | 0 .../SPARC-Solaris-GCC/softfloat-specialize | 0 .../bits32/SPARC-Solaris-GCC/softfloat.h | 0 .../softfloat/bits32/softfloat-macros | 0 .../softfloat/softfloat/bits32/softfloat.c | 0 .../softfloat/bits32/templates/milieu.h | 0 .../bits32/templates/softfloat-specialize | 0 .../softfloat/bits32/templates/softfloat.h | 0 .../softfloat/bits32/timesoftfloat.c | 0 .../softfloat/bits64/386-Win32-GCC/milieu.h | 0 .../bits64/386-Win32-GCC/softfloat-specialize | 0 .../bits64/386-Win32-GCC/softfloat.h | 0 .../bits64/SPARC-Solaris-GCC/milieu.h | 0 .../SPARC-Solaris-GCC/softfloat-specialize | 0 .../bits64/SPARC-Solaris-GCC/softfloat.h | 0 .../softfloat/bits64/softfloat-macros | 0 .../softfloat/softfloat/bits64/softfloat.c | 0 .../softfloat/bits64/templates/milieu.h | 0 .../bits64/templates/softfloat-specialize | 0 .../softfloat/bits64/templates/softfloat.h | 0 .../softfloat/bits64/timesoftfloat.c | 0 .../softfloat/softfloat/timesoftfloat.txt | 0 {frontends => yasm/frontends}/Makefile.inc | 0 .../frontends}/yasm/Makefile.inc | 0 .../frontends}/yasm/yasm-module.c | 2 +- .../frontends}/yasm/yasm-module.h | 0 .../frontends}/yasm/yasm-options.c | 2 +- .../frontends}/yasm/yasm-options.h | 0 {frontends => yasm/frontends}/yasm/yasm.c | 11 +- {libltdl => yasm/libltdl}/.cvsignore | 0 {libltdl => yasm/libltdl}/COPYING.LIB | 0 {libltdl => yasm/libltdl}/Makefile.am | 0 {libltdl => yasm/libltdl}/README | 0 {libltdl => yasm/libltdl}/ltdl.c | 0 {libltdl => yasm/libltdl}/ltdl.h | 0 libyasm.h => yasm/libyasm.h | 40 +- {libyasm => yasm/libyasm}/.cvsignore | 0 {libyasm => yasm/libyasm}/Makefile.inc | 0 {libyasm => yasm/libyasm}/arch.c | 0 {libyasm => yasm/libyasm}/arch.h | 0 {libyasm => yasm/libyasm}/bc-int.h | 0 {libyasm => yasm/libyasm}/bitvect.c | 0 {libyasm => yasm/libyasm}/bitvect.h | 0 {libyasm => yasm/libyasm}/bytecode.c | 29 +- {libyasm => yasm/libyasm}/bytecode.h | 8 +- {libyasm => yasm/libyasm}/compat-queue.h | 0 {libyasm => yasm/libyasm}/coretype.h | 2 +- {libyasm => yasm/libyasm}/dbgfmt.h | 6 +- {libyasm => yasm/libyasm}/errwarn.c | 2 +- {libyasm => yasm/libyasm}/errwarn.h | 2 +- {libyasm => yasm/libyasm}/expr-int.h | 0 {libyasm => yasm/libyasm}/expr.c | 0 {libyasm => yasm/libyasm}/expr.h | 0 {libyasm => yasm/libyasm}/file.c | 0 {libyasm => yasm/libyasm}/file.h | 0 {libyasm => yasm/libyasm}/floatnum.c | 0 {libyasm => yasm/libyasm}/floatnum.h | 0 {libyasm => yasm/libyasm}/hamt.c | 0 {libyasm => yasm/libyasm}/hamt.h | 0 {libyasm => yasm/libyasm}/intnum.c | 6 +- {libyasm => yasm/libyasm}/intnum.h | 0 {libyasm => yasm/libyasm}/linemgr.c | 6 +- {libyasm => yasm/libyasm}/linemgr.h | 0 {libyasm => yasm/libyasm}/mergesort.c | 0 {libyasm => yasm/libyasm}/objfmt.h | 2 +- {libyasm => yasm/libyasm}/optimizer.h | 0 {libyasm => yasm/libyasm}/parser.h | 0 {libyasm => yasm/libyasm}/preproc.h | 0 {libyasm => yasm/libyasm}/section.c | 0 {libyasm => yasm/libyasm}/section.h | 0 {libyasm => yasm/libyasm}/strcasecmp.c | 0 {libyasm => yasm/libyasm}/strsep.c | 0 {libyasm => yasm/libyasm}/symrec.c | 0 {libyasm => yasm/libyasm}/symrec.h | 0 {libyasm => yasm/libyasm}/tests/Makefile.inc | 0 .../libyasm}/tests/bitvect_test.c | 0 .../libyasm}/tests/bytecode_test.c | 0 .../libyasm}/tests/floatnum_test.c | 0 .../libyasm}/tests/memexpr_test.c | 0 util.h => yasm/libyasm/util.h | 8 +- {libyasm => yasm/libyasm}/valparam.c | 2 +- {libyasm => yasm/libyasm}/valparam.h | 2 +- {libyasm => yasm/libyasm}/xmalloc.c | 0 {libyasm => yasm/libyasm}/xstrdup.c | 0 {m4 => yasm/m4}/Makefile.am | 0 {m4 => yasm/m4}/codeset.m4 | 0 {m4 => yasm/m4}/gettext.m4 | 0 {m4 => yasm/m4}/glibc21.m4 | 0 {m4 => yasm/m4}/iconv.m4 | 0 {m4 => yasm/m4}/intdiv0.m4 | 0 {m4 => yasm/m4}/inttypes-pri.m4 | 0 {m4 => yasm/m4}/inttypes.m4 | 0 {m4 => yasm/m4}/inttypes_h.m4 | 0 {m4 => yasm/m4}/isc-posix.m4 | 0 {m4 => yasm/m4}/lcmessage.m4 | 0 {m4 => yasm/m4}/lib-ld.m4 | 0 {m4 => yasm/m4}/lib-link.m4 | 0 {m4 => yasm/m4}/lib-prefix.m4 | 0 {m4 => yasm/m4}/libtool.m4 | 31 +- {m4 => yasm/m4}/longlong.m4 | 0 {m4 => yasm/m4}/ltdl.m4 | 0 {m4 => yasm/m4}/progtest.m4 | 0 {m4 => yasm/m4}/stdint_h.m4 | 0 {m4 => yasm/m4}/uintmax_t.m4 | 0 {modules => yasm/modules}/Makefile.inc | 0 {modules => yasm/modules}/arch/Makefile.inc | 0 .../modules}/arch/x86/Makefile.inc | 2 +- {modules => yasm/modules}/arch/x86/README | 0 .../modules}/arch/x86/tests/Makefile.inc | 0 .../modules}/arch/x86/tests/addbyte.asm | 0 .../modules}/arch/x86/tests/addbyte.errwarn | 0 .../modules}/arch/x86/tests/addbyte.hex | 0 .../modules}/arch/x86/tests/addrop-err.asm | 0 .../arch/x86/tests/addrop-err.errwarn | 0 .../modules}/arch/x86/tests/addrop.asm | 0 .../modules}/arch/x86/tests/addrop.errwarn | 0 .../modules}/arch/x86/tests/addrop.hex | 0 .../modules}/arch/x86/tests/cpubasic-err.asm | 0 .../arch/x86/tests/cpubasic-err.errwarn | 0 .../modules}/arch/x86/tests/div-err.asm | 0 .../modules}/arch/x86/tests/div-err.errwarn | 0 .../modules}/arch/x86/tests/effaddr.asm | 0 .../modules}/arch/x86/tests/effaddr.errwarn | 0 .../modules}/arch/x86/tests/effaddr.hex | 0 .../modules}/arch/x86/tests/genopcode.asm | 0 .../modules}/arch/x86/tests/genopcode.errwarn | 0 .../modules}/arch/x86/tests/genopcode.hex | 0 .../modules}/arch/x86/tests/lds-err.asm | 0 .../modules}/arch/x86/tests/lds-err.errwarn | 0 .../modules}/arch/x86/tests/loopadsz.asm | 0 .../modules}/arch/x86/tests/loopadsz.errwarn | 0 .../modules}/arch/x86/tests/loopadsz.hex | 0 .../modules}/arch/x86/tests/mem64-err.asm | 0 .../modules}/arch/x86/tests/mem64-err.errwarn | 0 .../modules}/arch/x86/tests/mem64.asm | 0 .../modules}/arch/x86/tests/mem64.errwarn | 0 .../modules}/arch/x86/tests/mem64.hex | 0 .../modules}/arch/x86/tests/negequ.asm | 0 .../modules}/arch/x86/tests/negequ.errwarn | 0 .../modules}/arch/x86/tests/negequ.hex | 0 .../modules}/arch/x86/tests/nomem64-err.asm | 0 .../arch/x86/tests/nomem64-err.errwarn | 0 .../modules}/arch/x86/tests/nomem64.asm | 0 .../modules}/arch/x86/tests/nomem64.errwarn | 0 .../modules}/arch/x86/tests/nomem64.hex | 0 .../modules}/arch/x86/tests/opersize.asm | 0 .../modules}/arch/x86/tests/opersize.errwarn | 0 .../modules}/arch/x86/tests/opersize.hex | 0 .../modules}/arch/x86/tests/opsize-err.asm | 0 .../arch/x86/tests/opsize-err.errwarn | 0 .../modules}/arch/x86/tests/ret.asm | 0 .../modules}/arch/x86/tests/ret.errwarn | 0 .../modules}/arch/x86/tests/ret.hex | 0 .../modules}/arch/x86/tests/segmov.asm | 0 .../modules}/arch/x86/tests/segmov.errwarn | 0 .../modules}/arch/x86/tests/segmov.hex | 0 .../modules}/arch/x86/tests/shift.asm | 0 .../modules}/arch/x86/tests/shift.errwarn | 0 .../modules}/arch/x86/tests/shift.hex | 0 .../modules}/arch/x86/tests/x86_test.sh | 0 .../modules}/arch/x86/tests/x86label.asm | 0 .../modules}/arch/x86/tests/x86label.errwarn | 0 .../modules}/arch/x86/tests/x86label.hex | 0 {modules => yasm/modules}/arch/x86/x86arch.c | 12 +- {modules => yasm/modules}/arch/x86/x86arch.h | 18 +- {modules => yasm/modules}/arch/x86/x86bc.c | 55 +- {modules => yasm/modules}/arch/x86/x86expr.c | 22 +- {modules => yasm/modules}/arch/x86/x86id.re | 38 +- .../modules}/dbgfmts/Makefile.inc | 0 .../modules}/dbgfmts/null/Makefile.inc | 0 .../modules}/dbgfmts/null/null-dbgfmt.c | 7 +- .../modules}/objfmts/Makefile.inc | 4 +- .../modules}/objfmts/bin/Makefile.inc | 0 .../modules}/objfmts/bin/bin-objfmt.c | 7 +- .../modules}/objfmts/bin/tests/Makefile.inc | 0 .../modules}/objfmts/bin/tests/abs.asm | 0 .../modules}/objfmts/bin/tests/abs.errwarn | 0 .../modules}/objfmts/bin/tests/abs.hex | 0 .../modules}/objfmts/bin/tests/bin_test.sh | 0 .../modules}/objfmts/bin/tests/bintest.asm | 0 .../objfmts/bin/tests/bintest.errwarn | 0 .../modules}/objfmts/bin/tests/bintest.hex | 0 .../modules}/objfmts/bin/tests/float-err.asm | 0 .../objfmts/bin/tests/float-err.errwarn | 0 .../modules}/objfmts/bin/tests/float.asm | 0 .../modules}/objfmts/bin/tests/float.errwarn | 0 .../modules}/objfmts/bin/tests/float.hex | 0 .../objfmts/bin/tests/integer-warn.asm | 0 .../objfmts/bin/tests/integer-warn.errwarn | 0 .../objfmts/bin/tests/integer-warn.hex | 0 .../modules}/objfmts/bin/tests/integer.asm | 0 .../objfmts/bin/tests/integer.errwarn | 0 .../modules}/objfmts/bin/tests/integer.hex | 0 .../objfmts/bin/tests/reserve-err.asm | 0 .../objfmts/bin/tests/reserve-err.errwarn | 0 .../modules}/objfmts/bin/tests/reserve.asm | 0 .../objfmts/bin/tests/reserve.errwarn | 0 .../modules}/objfmts/bin/tests/reserve.hex | 0 .../modules}/objfmts/coff/Makefile.inc | 0 .../modules}/objfmts/coff/coff-objfmt.c | 349 +++++++-- .../modules}/objfmts/coff/tests/Makefile.inc | 0 .../modules}/objfmts/coff/tests/coff_test.sh | 0 .../modules}/objfmts/coff/tests/cofftest.asm | 0 .../modules}/objfmts/coff/tests/cofftest.c | 0 .../objfmts/coff/tests/cofftest.errwarn | 0 .../modules}/objfmts/coff/tests/cofftest.hex | 0 .../modules}/objfmts/dbg/Makefile.inc | 0 .../modules}/objfmts/dbg/dbg-objfmt.c | 7 +- yasm/modules/objfmts/elf/elf32.c | 109 +++ {modules => yasm/modules}/objfmts/elf/elf32.h | 6 + .../modules}/objfmts/elf/elf_common.h | 0 yasm/modules/objfmts/win32/Makefile.inc | 14 + yasm/modules/objfmts/win32/tests/Makefile.inc | 11 + .../modules/objfmts/win32/tests/win32_test.sh | 4 + .../modules/objfmts/win32/tests/win32test.asm | 82 +++ yasm/modules/objfmts/win32/tests/win32test.c | 34 + .../objfmts/win32/tests/win32test.errwarn | 0 .../modules/objfmts/win32/tests/win32test.hex | 660 ++++++++++++++++++ .../modules}/optimizers/Makefile.inc | 0 .../modules}/optimizers/basic/Makefile.inc | 0 .../optimizers/basic/basic-optimizer.c | 2 +- .../modules}/parsers/Makefile.inc | 0 .../modules}/parsers/nasm/Makefile.inc | 0 .../modules}/parsers/nasm/nasm-bison.y | 2 +- .../modules}/parsers/nasm/nasm-defs.h | 0 .../modules}/parsers/nasm/nasm-parser.c | 4 +- .../modules}/parsers/nasm/nasm-parser.h | 0 .../modules}/parsers/nasm/nasm-token.re | 10 +- .../modules}/parsers/nasm/tests/Makefile.inc | 0 .../modules}/parsers/nasm/tests/equlocal.asm | 0 .../parsers/nasm/tests/equlocal.errwarn | 0 .../modules}/parsers/nasm/tests/equlocal.hex | 0 .../modules}/parsers/nasm/tests/nasm_test.sh | 0 .../modules}/parsers/nasm/tests/newsect.asm | 0 .../parsers/nasm/tests/newsect.errwarn | 0 .../modules}/parsers/nasm/tests/newsect.hex | 0 .../modules}/preprocs/Makefile.inc | 0 .../modules}/preprocs/nasm/Makefile.inc | 0 .../modules}/preprocs/nasm/macros.pl | 0 .../modules}/preprocs/nasm/nasm-eval.c | 12 +- .../modules}/preprocs/nasm/nasm-eval.h | 0 .../modules}/preprocs/nasm/nasm-pp.c | 22 +- .../modules}/preprocs/nasm/nasm-pp.h | 0 .../modules}/preprocs/nasm/nasm-preproc.c | 0 .../modules}/preprocs/nasm/nasm.h | 0 .../modules}/preprocs/nasm/nasmlib.c | 2 +- .../modules}/preprocs/nasm/nasmlib.h | 0 .../modules}/preprocs/nasm/standard.mac | 0 .../modules}/preprocs/raw/Makefile.inc | 0 .../modules}/preprocs/raw/raw-preproc.c | 0 .../modules}/preprocs/yapp/Makefile.inc | 0 .../modules}/preprocs/yapp/tests/Makefile.inc | 0 .../modules}/preprocs/yapp/tests/comment.asm | 0 .../modules}/preprocs/yapp/tests/comment.pre | 0 .../modules}/preprocs/yapp/tests/ddefine.asm | 0 .../modules}/preprocs/yapp/tests/ddefine.pre | 0 .../modules}/preprocs/yapp/tests/define.asm | 0 .../modules}/preprocs/yapp/tests/define.pre | 0 .../modules}/preprocs/yapp/tests/ifdef.asm | 0 .../modules}/preprocs/yapp/tests/ifdef.pre | 0 .../modules}/preprocs/yapp/tests/include.asm | 0 .../modules}/preprocs/yapp/tests/include.pre | 0 .../modules}/preprocs/yapp/tests/params.asm | 0 .../modules}/preprocs/yapp/tests/params.pre | 0 .../modules}/preprocs/yapp/tests/pdefine.asm | 0 .../modules}/preprocs/yapp/tests/pdefine.pre | 0 .../modules}/preprocs/yapp/tests/raw.asm | 0 .../modules}/preprocs/yapp/tests/raw.pre | 0 .../modules}/preprocs/yapp/tests/rdefine.asm | 0 .../modules}/preprocs/yapp/tests/rdefine.pre | 0 .../modules}/preprocs/yapp/tests/rinclude.asm | 0 .../modules}/preprocs/yapp/tests/rinclude.pre | 0 .../modules}/preprocs/yapp/tests/yapp_test.sh | 0 .../modules}/preprocs/yapp/yapp-preproc.c | 6 +- .../modules}/preprocs/yapp/yapp-preproc.h | 0 .../modules}/preprocs/yapp/yapp-token.h | 0 .../modules}/preprocs/yapp/yapp-token.l | 3 +- out_test.sh => yasm/out_test.sh | 0 {po => yasm/po}/.cvsignore | 0 yasm/po/ChangeLog | 0 {po => yasm/po}/Makefile.in.in | 0 {po => yasm/po}/Makevars | 0 {po => yasm/po}/Makevars.template | 0 {po => yasm/po}/POTFILES.in | 0 {po => yasm/po}/Rules-quot | 0 {po => yasm/po}/boldquot.sed | 0 {po => yasm/po}/en@boldquot.header | 0 {po => yasm/po}/en@quot.header | 0 {po => yasm/po}/insert-header.sin | 0 {po => yasm/po}/quot.sed | 0 {po => yasm/po}/remove-potcdate.sin | 0 splint.sh => yasm/splint.sh | 0 test_hd.pl => yasm/test_hd.pl | 0 {tests => yasm/tests}/nasm/binfmt.asm | 0 {tests => yasm/tests}/nasm/binfmt2.asm | 0 {tests => yasm/tests}/nasm/bits.asm | 0 {tests => yasm/tests}/nasm/circular1.asm | 0 {tests => yasm/tests}/nasm/circular2.asm | 0 {tests => yasm/tests}/nasm/circular3.asm | 0 {tests => yasm/tests}/nasm/circular4.asm | 0 {tests => yasm/tests}/nasm/data.asm | 0 {tests => yasm/tests}/nasm/dir.asm | 0 {tests => yasm/tests}/nasm/enter.asm | 0 {tests => yasm/tests}/nasm/equ.asm | 0 {tests => yasm/tests}/nasm/error1.asm | 0 {tests => yasm/tests}/nasm/errors.asm | 0 {tests => yasm/tests}/nasm/first.asm | 0 {tests => yasm/tests}/nasm/fp.asm | 0 {tests => yasm/tests}/nasm/fp2.asm | 0 {tests => yasm/tests}/nasm/global.asm | 0 {tests => yasm/tests}/nasm/jumps.asm | 0 {tests => yasm/tests}/nasm/labels.asm | 0 {tests => yasm/tests}/nasm/labels2.asm | 0 {tests => yasm/tests}/nasm/labels3.asm | 0 {tests => yasm/tests}/nasm/mem.asm | 0 {tests => yasm/tests}/nasm/mem2.asm | 0 {tests => yasm/tests}/nasm/multiequ.asm | 0 {tests => yasm/tests}/nasm/multiext.asm | 0 {tests => yasm/tests}/nasm/multisect.asm | 0 {tests => yasm/tests}/nasm/multisect2.asm | 0 {tests => yasm/tests}/nasm/multisect3.asm | 0 {tests => yasm/tests}/nasm/multisect4.asm | 0 {tests => yasm/tests}/nasm/numconst.asm | 0 {tests => yasm/tests}/nasm/org.asm | 0 {tests => yasm/tests}/nasm/org2.asm | 0 {tests => yasm/tests}/nasm/reloc.asm | 0 {tests => yasm/tests}/nasm/reloc2.asm | 0 {tests => yasm/tests}/nasm/second.asm | 0 {tests => yasm/tests}/nasm/signed.asm | 0 {tests => yasm/tests}/nasm/sizes.asm | 0 {tests => yasm/tests}/nasm/sizes2.asm | 0 {tests => yasm/tests}/nasm/socket.asm | 0 {tests => yasm/tests}/nasm/store.asm | 0 {tests => yasm/tests}/nasm/string.asm | 0 {tests => yasm/tests}/nasm/test1.asm | 0 {tests => yasm/tests}/nasm/times.asm | 0 {tests => yasm/tests}/nasm/vbeaf.asm | 0 {tools => yasm/tools}/Makefile.inc | 0 {tools => yasm/tools}/re2c/CHANGELOG | 0 {tools => yasm/tools}/re2c/Makefile.inc | 0 {tools => yasm/tools}/re2c/NO_WARRANTY | 0 {tools => yasm/tools}/re2c/README | 0 {tools => yasm/tools}/re2c/actions.c | 0 {tools => yasm/tools}/re2c/basics.h | 0 {tools => yasm/tools}/re2c/bootstrap/re2c.man | 0 .../tools}/re2c/bootstrap/scanner.c | 0 yasm/tools/re2c/cleanup.pl | 32 + {tools => yasm/tools}/re2c/code.c | 0 {tools => yasm/tools}/re2c/dfa.c | 0 {tools => yasm/tools}/re2c/dfa.h | 0 {tools => yasm/tools}/re2c/doc/loplas.ps.gz | Bin {tools => yasm/tools}/re2c/doc/sample.bib | 0 .../tools}/re2c/examples/basemmap.c | 0 {tools => yasm/tools}/re2c/examples/c.re | 0 {tools => yasm/tools}/re2c/examples/cmmap.re | 0 {tools => yasm/tools}/re2c/examples/cnokw.re | 0 .../tools}/re2c/examples/cunroll.re | 0 {tools => yasm/tools}/re2c/examples/modula.re | 0 .../tools}/re2c/examples/rexx/README | 0 .../tools}/re2c/examples/rexx/rexx.l | 0 .../tools}/re2c/examples/rexx/scanio.c | 0 {tools => yasm/tools}/re2c/examples/sample.re | 0 {tools => yasm/tools}/re2c/examples/simple.re | 0 {tools => yasm/tools}/re2c/globals.h | 0 {tools => yasm/tools}/re2c/ins.h | 0 {tools => yasm/tools}/re2c/main.c | 0 {tools => yasm/tools}/re2c/parse.h | 0 {tools => yasm/tools}/re2c/re.h | 0 {tools => yasm/tools}/re2c/re2c-parser.y | 0 {tools => yasm/tools}/re2c/re2c.1 | 0 {tools => yasm/tools}/re2c/scanner.c | 0 {tools => yasm/tools}/re2c/scanner.h | 0 {tools => yasm/tools}/re2c/scanner.re | 0 {tools => yasm/tools}/re2c/substr.c | 0 {tools => yasm/tools}/re2c/substr.h | 0 {tools => yasm/tools}/re2c/token.h | 0 {tools => yasm/tools}/re2c/translate.c | 0 {libyasm => yasm}/util.h | 8 +- 533 files changed, 2008 insertions(+), 544 deletions(-) delete mode 100644 Mkfiles/Makefile.dj delete mode 100644 Mkfiles/Makefile.flat delete mode 100644 Mkfiles/Makefile.vc delete mode 100755 tools/re2c/cleanup.pl rename .cvsignore => yasm/.cvsignore (100%) rename .indent.pro => yasm/.indent.pro (100%) rename ABOUT-NLS => yasm/ABOUT-NLS (100%) rename AUTHORS => yasm/AUTHORS (100%) rename COPYING => yasm/COPYING (100%) rename COPYING.LIB-2.0 => yasm/COPYING.LIB-2.0 (100%) rename ChangeLog => yasm/ChangeLog (100%) rename HACKING => yasm/HACKING (100%) rename INSTALL => yasm/INSTALL (100%) rename Makefile.am => yasm/Makefile.am (68%) create mode 100644 yasm/Mkfiles/Makefile.dj create mode 100644 yasm/Mkfiles/Makefile.flat rename {Mkfiles => yasm/Mkfiles}/dj/config.h (90%) create mode 100644 yasm/Mkfiles/dj/libyasm/config.h rename {Mkfiles => yasm/Mkfiles}/nightly-build.pl (100%) rename {Mkfiles => yasm/Mkfiles}/vc/.cvsignore (100%) rename {Mkfiles => yasm/Mkfiles}/vc/config.h (100%) rename {Mkfiles => yasm/Mkfiles}/vc/libyasm/.cvsignore (100%) rename {Mkfiles => yasm/Mkfiles}/vc/libyasm/config.h (100%) rename {Mkfiles => yasm/Mkfiles}/vc/libyasm/libyasm.dep (100%) rename {Mkfiles => yasm/Mkfiles}/vc/libyasm/libyasm.dsp (100%) rename {Mkfiles => yasm/Mkfiles}/vc/libyasm/libyasm.mak (100%) rename {Mkfiles => yasm/Mkfiles}/vc/modules/.cvsignore (100%) rename {Mkfiles => yasm/Mkfiles}/vc/modules/modules.dep (100%) rename {Mkfiles => yasm/Mkfiles}/vc/modules/modules.dsp (100%) rename {Mkfiles => yasm/Mkfiles}/vc/modules/modules.mak (100%) rename {Mkfiles => yasm/Mkfiles}/vc/yasm-module.c (97%) rename {Mkfiles => yasm/Mkfiles}/vc/yasm.dep (100%) rename {Mkfiles => yasm/Mkfiles}/vc/yasm.dsp (100%) rename {Mkfiles => yasm/Mkfiles}/vc/yasm.dsw (100%) rename {Mkfiles => yasm/Mkfiles}/vc/yasm.mak (100%) rename NEWS => yasm/NEWS (100%) rename README => yasm/README (100%) rename autogen.sh => yasm/autogen.sh (100%) rename {check => yasm/check}/Makefile.inc (100%) rename {check => yasm/check}/NEWS (100%) rename {check => yasm/check}/README (100%) rename {check => yasm/check}/check.c (100%) rename {check => yasm/check}/check.h (100%) rename {check => yasm/check}/check_impl.h (100%) rename {check => yasm/check}/check_log.c (100%) rename {check => yasm/check}/check_log.h (100%) rename {check => yasm/check}/check_msg.c (100%) rename {check => yasm/check}/check_msg.h (100%) rename {check => yasm/check}/check_print.c (100%) rename {check => yasm/check}/check_print.h (100%) rename {check => yasm/check}/check_run.c (100%) rename {check => yasm/check}/error.c (100%) rename {check => yasm/check}/error.h (100%) rename {check => yasm/check}/list.c (100%) rename {check => yasm/check}/list.h (100%) rename {config => yasm/config}/config.guess (100%) rename {config => yasm/config}/config.rpath (100%) rename {config => yasm/config}/config.sub (100%) rename {config => yasm/config}/ltmain.sh (100%) rename {config => yasm/config}/ylwrap (100%) rename configure.ac => yasm/configure.ac (95%) rename {doc => yasm/doc}/programmer/bitvect/.cvsignore (100%) rename {doc => yasm/doc}/programmer/queue/.cvsignore (100%) rename {float => yasm/float}/gdtoa/Makefile (100%) rename {float => yasm/float}/gdtoa/README (100%) rename {float => yasm/float}/gdtoa/arithchk.c (100%) rename {float => yasm/float}/gdtoa/dmisc.c (100%) rename {float => yasm/float}/gdtoa/dtoa.c (100%) rename {float => yasm/float}/gdtoa/g_Qfmt.c (100%) rename {float => yasm/float}/gdtoa/g__fmt.c (100%) rename {float => yasm/float}/gdtoa/g_ddfmt.c (100%) rename {float => yasm/float}/gdtoa/g_dfmt.c (100%) rename {float => yasm/float}/gdtoa/g_ffmt.c (100%) rename {float => yasm/float}/gdtoa/g_xLfmt.c (100%) rename {float => yasm/float}/gdtoa/g_xfmt.c (100%) rename {float => yasm/float}/gdtoa/gdtoa.c (100%) rename {float => yasm/float}/gdtoa/gdtoa.h (100%) rename {float => yasm/float}/gdtoa/gdtoaimp.h (100%) rename {float => yasm/float}/gdtoa/gethex.c (100%) rename {float => yasm/float}/gdtoa/gmisc.c (100%) rename {float => yasm/float}/gdtoa/hd_init.c (100%) rename {float => yasm/float}/gdtoa/hexnan.c (100%) rename {float => yasm/float}/gdtoa/misc.c (100%) rename {float => yasm/float}/gdtoa/smisc.c (100%) rename {float => yasm/float}/gdtoa/strtoIQ.c (100%) rename {float => yasm/float}/gdtoa/strtoId.c (100%) rename {float => yasm/float}/gdtoa/strtoIdd.c (100%) rename {float => yasm/float}/gdtoa/strtoIf.c (100%) rename {float => yasm/float}/gdtoa/strtoIg.c (100%) rename {float => yasm/float}/gdtoa/strtoIx.c (100%) rename {float => yasm/float}/gdtoa/strtoIxL.c (100%) rename {float => yasm/float}/gdtoa/strtod.c (100%) rename {float => yasm/float}/gdtoa/strtodI.c (100%) rename {float => yasm/float}/gdtoa/strtodg.c (100%) rename {float => yasm/float}/gdtoa/strtof.c (100%) rename {float => yasm/float}/gdtoa/strtopQ.c (100%) rename {float => yasm/float}/gdtoa/strtopd.c (100%) rename {float => yasm/float}/gdtoa/strtopdd.c (100%) rename {float => yasm/float}/gdtoa/strtopf.c (100%) rename {float => yasm/float}/gdtoa/strtopx.c (100%) rename {float => yasm/float}/gdtoa/strtopxL.c (100%) rename {float => yasm/float}/gdtoa/strtorQ.c (100%) rename {float => yasm/float}/gdtoa/strtord.c (100%) rename {float => yasm/float}/gdtoa/strtordd.c (100%) rename {float => yasm/float}/gdtoa/strtorf.c (100%) rename {float => yasm/float}/gdtoa/strtorx.c (100%) rename {float => yasm/float}/gdtoa/strtorxL.c (100%) rename {float => yasm/float}/gdtoa/sum.c (100%) rename {float => yasm/float}/gdtoa/test/Makefile (100%) rename {float => yasm/float}/gdtoa/test/Q.ou0 (100%) rename {float => yasm/float}/gdtoa/test/Q.ou1 (100%) rename {float => yasm/float}/gdtoa/test/Qtest.c (100%) rename {float => yasm/float}/gdtoa/test/README (100%) rename {float => yasm/float}/gdtoa/test/d.out (100%) rename {float => yasm/float}/gdtoa/test/dI.out (100%) rename {float => yasm/float}/gdtoa/test/dIsi.out (100%) rename {float => yasm/float}/gdtoa/test/dItest.c (100%) rename {float => yasm/float}/gdtoa/test/dd.out (100%) rename {float => yasm/float}/gdtoa/test/ddsi.out (100%) rename {float => yasm/float}/gdtoa/test/ddtest.c (100%) rename {float => yasm/float}/gdtoa/test/dt.c (100%) rename {float => yasm/float}/gdtoa/test/dtest.c (100%) rename {float => yasm/float}/gdtoa/test/dtst.out (100%) rename {float => yasm/float}/gdtoa/test/f.out (100%) rename {float => yasm/float}/gdtoa/test/ftest.c (100%) rename {float => yasm/float}/gdtoa/test/getround.c (100%) rename {float => yasm/float}/gdtoa/test/rtestnos (100%) rename {float => yasm/float}/gdtoa/test/strtoIdSI.c (100%) rename {float => yasm/float}/gdtoa/test/strtoIddSI.c (100%) rename {float => yasm/float}/gdtoa/test/strtodISI.c (100%) rename {float => yasm/float}/gdtoa/test/strtodt.c (100%) rename {float => yasm/float}/gdtoa/test/strtopddSI.c (100%) rename {float => yasm/float}/gdtoa/test/strtorddSI.c (100%) rename {float => yasm/float}/gdtoa/test/testnos (100%) rename {float => yasm/float}/gdtoa/test/testnos1 (100%) rename {float => yasm/float}/gdtoa/test/testnos3 (100%) rename {float => yasm/float}/gdtoa/test/x.ou0 (100%) rename {float => yasm/float}/gdtoa/test/x.ou1 (100%) rename {float => yasm/float}/gdtoa/test/xL.ou0 (100%) rename {float => yasm/float}/gdtoa/test/xL.ou1 (100%) rename {float => yasm/float}/gdtoa/test/xLtest.c (100%) rename {float => yasm/float}/gdtoa/test/xQtest.c (100%) rename {float => yasm/float}/gdtoa/test/xsum0.out (100%) rename {float => yasm/float}/gdtoa/test/xtest.c (100%) rename {float => yasm/float}/gdtoa/ulp.c (100%) rename {float => yasm/float}/gdtoa/xsum0.out (100%) rename {float => yasm/float}/softfloat/processors/386-GCC.h (100%) rename {float => yasm/float}/softfloat/processors/SPARC-GCC.h (100%) rename {float => yasm/float}/softfloat/softfloat/README.txt (100%) rename {float => yasm/float}/softfloat/softfloat/SoftFloat-history.txt (100%) rename {float => yasm/float}/softfloat/softfloat/SoftFloat-source.txt (100%) rename {float => yasm/float}/softfloat/softfloat/SoftFloat.txt (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/386-Win32-GCC/milieu.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/386-Win32-GCC/softfloat-specialize (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/386-Win32-GCC/softfloat.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/SPARC-Solaris-GCC/milieu.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat-specialize (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/softfloat-macros (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/softfloat.c (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/templates/milieu.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/templates/softfloat-specialize (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/templates/softfloat.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits32/timesoftfloat.c (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/386-Win32-GCC/milieu.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/386-Win32-GCC/softfloat-specialize (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/386-Win32-GCC/softfloat.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/SPARC-Solaris-GCC/milieu.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat-specialize (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/softfloat-macros (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/softfloat.c (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/templates/milieu.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/templates/softfloat-specialize (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/templates/softfloat.h (100%) rename {float => yasm/float}/softfloat/softfloat/bits64/timesoftfloat.c (100%) rename {float => yasm/float}/softfloat/softfloat/timesoftfloat.txt (100%) rename {frontends => yasm/frontends}/Makefile.inc (100%) rename {frontends => yasm/frontends}/yasm/Makefile.inc (100%) rename {frontends => yasm/frontends}/yasm/yasm-module.c (99%) rename {frontends => yasm/frontends}/yasm/yasm-module.h (100%) rename {frontends => yasm/frontends}/yasm/yasm-options.c (99%) rename {frontends => yasm/frontends}/yasm/yasm-options.h (100%) rename {frontends => yasm/frontends}/yasm/yasm.c (98%) rename {libltdl => yasm/libltdl}/.cvsignore (100%) rename {libltdl => yasm/libltdl}/COPYING.LIB (100%) rename {libltdl => yasm/libltdl}/Makefile.am (100%) rename {libltdl => yasm/libltdl}/README (100%) rename {libltdl => yasm/libltdl}/ltdl.c (100%) rename {libltdl => yasm/libltdl}/ltdl.h (100%) rename libyasm.h => yasm/libyasm.h (81%) rename {libyasm => yasm/libyasm}/.cvsignore (100%) rename {libyasm => yasm/libyasm}/Makefile.inc (100%) rename {libyasm => yasm/libyasm}/arch.c (100%) rename {libyasm => yasm/libyasm}/arch.h (100%) rename {libyasm => yasm/libyasm}/bc-int.h (100%) rename {libyasm => yasm/libyasm}/bitvect.c (100%) rename {libyasm => yasm/libyasm}/bitvect.h (100%) rename {libyasm => yasm/libyasm}/bytecode.c (96%) rename {libyasm => yasm/libyasm}/bytecode.h (97%) rename {libyasm => yasm/libyasm}/compat-queue.h (100%) rename {libyasm => yasm/libyasm}/coretype.h (98%) rename {libyasm => yasm/libyasm}/dbgfmt.h (93%) rename {libyasm => yasm/libyasm}/errwarn.c (99%) rename {libyasm => yasm/libyasm}/errwarn.h (99%) rename {libyasm => yasm/libyasm}/expr-int.h (100%) rename {libyasm => yasm/libyasm}/expr.c (100%) rename {libyasm => yasm/libyasm}/expr.h (100%) rename {libyasm => yasm/libyasm}/file.c (100%) rename {libyasm => yasm/libyasm}/file.h (100%) rename {libyasm => yasm/libyasm}/floatnum.c (100%) rename {libyasm => yasm/libyasm}/floatnum.h (100%) rename {libyasm => yasm/libyasm}/hamt.c (100%) rename {libyasm => yasm/libyasm}/hamt.h (100%) rename {libyasm => yasm/libyasm}/intnum.c (99%) rename {libyasm => yasm/libyasm}/intnum.h (100%) rename {libyasm => yasm/libyasm}/linemgr.c (99%) rename {libyasm => yasm/libyasm}/linemgr.h (100%) rename {libyasm => yasm/libyasm}/mergesort.c (100%) rename {libyasm => yasm/libyasm}/objfmt.h (98%) rename {libyasm => yasm/libyasm}/optimizer.h (100%) rename {libyasm => yasm/libyasm}/parser.h (100%) rename {libyasm => yasm/libyasm}/preproc.h (100%) rename {libyasm => yasm/libyasm}/section.c (100%) rename {libyasm => yasm/libyasm}/section.h (100%) rename {libyasm => yasm/libyasm}/strcasecmp.c (100%) rename {libyasm => yasm/libyasm}/strsep.c (100%) rename {libyasm => yasm/libyasm}/symrec.c (100%) rename {libyasm => yasm/libyasm}/symrec.h (100%) rename {libyasm => yasm/libyasm}/tests/Makefile.inc (100%) rename {libyasm => yasm/libyasm}/tests/bitvect_test.c (100%) rename {libyasm => yasm/libyasm}/tests/bytecode_test.c (100%) rename {libyasm => yasm/libyasm}/tests/floatnum_test.c (100%) rename {libyasm => yasm/libyasm}/tests/memexpr_test.c (100%) rename util.h => yasm/libyasm/util.h (97%) rename {libyasm => yasm/libyasm}/valparam.c (98%) rename {libyasm => yasm/libyasm}/valparam.h (97%) rename {libyasm => yasm/libyasm}/xmalloc.c (100%) rename {libyasm => yasm/libyasm}/xstrdup.c (100%) rename {m4 => yasm/m4}/Makefile.am (100%) rename {m4 => yasm/m4}/codeset.m4 (100%) rename {m4 => yasm/m4}/gettext.m4 (100%) rename {m4 => yasm/m4}/glibc21.m4 (100%) rename {m4 => yasm/m4}/iconv.m4 (100%) rename {m4 => yasm/m4}/intdiv0.m4 (100%) rename {m4 => yasm/m4}/inttypes-pri.m4 (100%) rename {m4 => yasm/m4}/inttypes.m4 (100%) rename {m4 => yasm/m4}/inttypes_h.m4 (100%) rename {m4 => yasm/m4}/isc-posix.m4 (100%) rename {m4 => yasm/m4}/lcmessage.m4 (100%) rename {m4 => yasm/m4}/lib-ld.m4 (100%) rename {m4 => yasm/m4}/lib-link.m4 (100%) rename {m4 => yasm/m4}/lib-prefix.m4 (100%) rename {m4 => yasm/m4}/libtool.m4 (99%) rename {m4 => yasm/m4}/longlong.m4 (100%) rename {m4 => yasm/m4}/ltdl.m4 (100%) rename {m4 => yasm/m4}/progtest.m4 (100%) rename {m4 => yasm/m4}/stdint_h.m4 (100%) rename {m4 => yasm/m4}/uintmax_t.m4 (100%) rename {modules => yasm/modules}/Makefile.inc (100%) rename {modules => yasm/modules}/arch/Makefile.inc (100%) rename {modules => yasm/modules}/arch/x86/Makefile.inc (91%) rename {modules => yasm/modules}/arch/x86/README (100%) rename {modules => yasm/modules}/arch/x86/tests/Makefile.inc (100%) rename {modules => yasm/modules}/arch/x86/tests/addbyte.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/addbyte.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/addbyte.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/addrop-err.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/addrop-err.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/addrop.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/addrop.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/addrop.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/cpubasic-err.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/cpubasic-err.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/div-err.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/div-err.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/effaddr.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/effaddr.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/effaddr.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/genopcode.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/genopcode.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/genopcode.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/lds-err.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/lds-err.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/loopadsz.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/loopadsz.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/loopadsz.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/mem64-err.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/mem64-err.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/mem64.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/mem64.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/mem64.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/negequ.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/negequ.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/negequ.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/nomem64-err.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/nomem64-err.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/nomem64.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/nomem64.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/nomem64.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/opersize.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/opersize.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/opersize.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/opsize-err.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/opsize-err.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/ret.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/ret.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/ret.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/segmov.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/segmov.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/segmov.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/shift.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/shift.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/shift.hex (100%) rename {modules => yasm/modules}/arch/x86/tests/x86_test.sh (100%) rename {modules => yasm/modules}/arch/x86/tests/x86label.asm (100%) rename {modules => yasm/modules}/arch/x86/tests/x86label.errwarn (100%) rename {modules => yasm/modules}/arch/x86/tests/x86label.hex (100%) rename {modules => yasm/modules}/arch/x86/x86arch.c (94%) rename {modules => yasm/modules}/arch/x86/x86arch.h (94%) rename {modules => yasm/modules}/arch/x86/x86bc.c (96%) rename {modules => yasm/modules}/arch/x86/x86expr.c (97%) rename {modules => yasm/modules}/arch/x86/x86id.re (99%) rename {modules => yasm/modules}/dbgfmts/Makefile.inc (100%) rename {modules => yasm/modules}/dbgfmts/null/Makefile.inc (100%) rename {modules => yasm/modules}/dbgfmts/null/null-dbgfmt.c (91%) rename {modules => yasm/modules}/objfmts/Makefile.inc (65%) rename {modules => yasm/modules}/objfmts/bin/Makefile.inc (100%) rename {modules => yasm/modules}/objfmts/bin/bin-objfmt.c (99%) rename {modules => yasm/modules}/objfmts/bin/tests/Makefile.inc (100%) rename {modules => yasm/modules}/objfmts/bin/tests/abs.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/abs.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/abs.hex (100%) rename {modules => yasm/modules}/objfmts/bin/tests/bin_test.sh (100%) rename {modules => yasm/modules}/objfmts/bin/tests/bintest.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/bintest.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/bintest.hex (100%) rename {modules => yasm/modules}/objfmts/bin/tests/float-err.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/float-err.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/float.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/float.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/float.hex (100%) rename {modules => yasm/modules}/objfmts/bin/tests/integer-warn.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/integer-warn.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/integer-warn.hex (100%) rename {modules => yasm/modules}/objfmts/bin/tests/integer.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/integer.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/integer.hex (100%) rename {modules => yasm/modules}/objfmts/bin/tests/reserve-err.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/reserve-err.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/reserve.asm (100%) rename {modules => yasm/modules}/objfmts/bin/tests/reserve.errwarn (100%) rename {modules => yasm/modules}/objfmts/bin/tests/reserve.hex (100%) rename {modules => yasm/modules}/objfmts/coff/Makefile.inc (100%) rename {modules => yasm/modules}/objfmts/coff/coff-objfmt.c (74%) rename {modules => yasm/modules}/objfmts/coff/tests/Makefile.inc (100%) rename {modules => yasm/modules}/objfmts/coff/tests/coff_test.sh (100%) rename {modules => yasm/modules}/objfmts/coff/tests/cofftest.asm (100%) rename {modules => yasm/modules}/objfmts/coff/tests/cofftest.c (100%) rename {modules => yasm/modules}/objfmts/coff/tests/cofftest.errwarn (100%) rename {modules => yasm/modules}/objfmts/coff/tests/cofftest.hex (100%) rename {modules => yasm/modules}/objfmts/dbg/Makefile.inc (100%) rename {modules => yasm/modules}/objfmts/dbg/dbg-objfmt.c (98%) create mode 100644 yasm/modules/objfmts/elf/elf32.c rename {modules => yasm/modules}/objfmts/elf/elf32.h (94%) rename {modules => yasm/modules}/objfmts/elf/elf_common.h (100%) create mode 100644 yasm/modules/objfmts/win32/Makefile.inc create mode 100644 yasm/modules/objfmts/win32/tests/Makefile.inc create mode 100755 yasm/modules/objfmts/win32/tests/win32_test.sh create mode 100644 yasm/modules/objfmts/win32/tests/win32test.asm create mode 100644 yasm/modules/objfmts/win32/tests/win32test.c rename modules/parsers/nasm/tests/equlocal.errwarn => yasm/modules/objfmts/win32/tests/win32test.errwarn (100%) create mode 100644 yasm/modules/objfmts/win32/tests/win32test.hex rename {modules => yasm/modules}/optimizers/Makefile.inc (100%) rename {modules => yasm/modules}/optimizers/basic/Makefile.inc (100%) rename {modules => yasm/modules}/optimizers/basic/basic-optimizer.c (99%) rename {modules => yasm/modules}/parsers/Makefile.inc (100%) rename {modules => yasm/modules}/parsers/nasm/Makefile.inc (100%) rename {modules => yasm/modules}/parsers/nasm/nasm-bison.y (99%) rename {modules => yasm/modules}/parsers/nasm/nasm-defs.h (100%) rename {modules => yasm/modules}/parsers/nasm/nasm-parser.c (98%) rename {modules => yasm/modules}/parsers/nasm/nasm-parser.h (100%) rename {modules => yasm/modules}/parsers/nasm/nasm-token.re (98%) rename {modules => yasm/modules}/parsers/nasm/tests/Makefile.inc (100%) rename {modules => yasm/modules}/parsers/nasm/tests/equlocal.asm (100%) rename modules/parsers/nasm/tests/newsect.errwarn => yasm/modules/parsers/nasm/tests/equlocal.errwarn (100%) rename {modules => yasm/modules}/parsers/nasm/tests/equlocal.hex (100%) rename {modules => yasm/modules}/parsers/nasm/tests/nasm_test.sh (100%) rename {modules => yasm/modules}/parsers/nasm/tests/newsect.asm (100%) rename po/ChangeLog => yasm/modules/parsers/nasm/tests/newsect.errwarn (100%) rename {modules => yasm/modules}/parsers/nasm/tests/newsect.hex (100%) rename {modules => yasm/modules}/preprocs/Makefile.inc (100%) rename {modules => yasm/modules}/preprocs/nasm/Makefile.inc (100%) rename {modules => yasm/modules}/preprocs/nasm/macros.pl (100%) rename {modules => yasm/modules}/preprocs/nasm/nasm-eval.c (98%) rename {modules => yasm/modules}/preprocs/nasm/nasm-eval.h (100%) rename {modules => yasm/modules}/preprocs/nasm/nasm-pp.c (99%) rename {modules => yasm/modules}/preprocs/nasm/nasm-pp.h (100%) rename {modules => yasm/modules}/preprocs/nasm/nasm-preproc.c (100%) rename {modules => yasm/modules}/preprocs/nasm/nasm.h (100%) rename {modules => yasm/modules}/preprocs/nasm/nasmlib.c (99%) rename {modules => yasm/modules}/preprocs/nasm/nasmlib.h (100%) rename {modules => yasm/modules}/preprocs/nasm/standard.mac (100%) rename {modules => yasm/modules}/preprocs/raw/Makefile.inc (100%) rename {modules => yasm/modules}/preprocs/raw/raw-preproc.c (100%) rename {modules => yasm/modules}/preprocs/yapp/Makefile.inc (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/Makefile.inc (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/comment.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/comment.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/ddefine.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/ddefine.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/define.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/define.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/ifdef.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/ifdef.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/include.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/include.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/params.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/params.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/pdefine.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/pdefine.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/raw.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/raw.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/rdefine.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/rdefine.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/rinclude.asm (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/rinclude.pre (100%) rename {modules => yasm/modules}/preprocs/yapp/tests/yapp_test.sh (100%) rename {modules => yasm/modules}/preprocs/yapp/yapp-preproc.c (99%) rename {modules => yasm/modules}/preprocs/yapp/yapp-preproc.h (100%) rename {modules => yasm/modules}/preprocs/yapp/yapp-token.h (100%) rename {modules => yasm/modules}/preprocs/yapp/yapp-token.l (99%) rename out_test.sh => yasm/out_test.sh (100%) rename {po => yasm/po}/.cvsignore (100%) create mode 100644 yasm/po/ChangeLog rename {po => yasm/po}/Makefile.in.in (100%) rename {po => yasm/po}/Makevars (100%) rename {po => yasm/po}/Makevars.template (100%) rename {po => yasm/po}/POTFILES.in (100%) rename {po => yasm/po}/Rules-quot (100%) rename {po => yasm/po}/boldquot.sed (100%) rename {po => yasm/po}/en@boldquot.header (100%) rename {po => yasm/po}/en@quot.header (100%) rename {po => yasm/po}/insert-header.sin (100%) rename {po => yasm/po}/quot.sed (100%) rename {po => yasm/po}/remove-potcdate.sin (100%) rename splint.sh => yasm/splint.sh (100%) rename test_hd.pl => yasm/test_hd.pl (100%) rename {tests => yasm/tests}/nasm/binfmt.asm (100%) rename {tests => yasm/tests}/nasm/binfmt2.asm (100%) rename {tests => yasm/tests}/nasm/bits.asm (100%) rename {tests => yasm/tests}/nasm/circular1.asm (100%) rename {tests => yasm/tests}/nasm/circular2.asm (100%) rename {tests => yasm/tests}/nasm/circular3.asm (100%) rename {tests => yasm/tests}/nasm/circular4.asm (100%) rename {tests => yasm/tests}/nasm/data.asm (100%) rename {tests => yasm/tests}/nasm/dir.asm (100%) rename {tests => yasm/tests}/nasm/enter.asm (100%) rename {tests => yasm/tests}/nasm/equ.asm (100%) rename {tests => yasm/tests}/nasm/error1.asm (100%) rename {tests => yasm/tests}/nasm/errors.asm (100%) rename {tests => yasm/tests}/nasm/first.asm (100%) rename {tests => yasm/tests}/nasm/fp.asm (100%) rename {tests => yasm/tests}/nasm/fp2.asm (100%) rename {tests => yasm/tests}/nasm/global.asm (100%) rename {tests => yasm/tests}/nasm/jumps.asm (100%) rename {tests => yasm/tests}/nasm/labels.asm (100%) rename {tests => yasm/tests}/nasm/labels2.asm (100%) rename {tests => yasm/tests}/nasm/labels3.asm (100%) rename {tests => yasm/tests}/nasm/mem.asm (100%) rename {tests => yasm/tests}/nasm/mem2.asm (100%) rename {tests => yasm/tests}/nasm/multiequ.asm (100%) rename {tests => yasm/tests}/nasm/multiext.asm (100%) rename {tests => yasm/tests}/nasm/multisect.asm (100%) rename {tests => yasm/tests}/nasm/multisect2.asm (100%) rename {tests => yasm/tests}/nasm/multisect3.asm (100%) rename {tests => yasm/tests}/nasm/multisect4.asm (100%) rename {tests => yasm/tests}/nasm/numconst.asm (100%) rename {tests => yasm/tests}/nasm/org.asm (100%) rename {tests => yasm/tests}/nasm/org2.asm (100%) rename {tests => yasm/tests}/nasm/reloc.asm (100%) rename {tests => yasm/tests}/nasm/reloc2.asm (100%) rename {tests => yasm/tests}/nasm/second.asm (100%) rename {tests => yasm/tests}/nasm/signed.asm (100%) rename {tests => yasm/tests}/nasm/sizes.asm (100%) rename {tests => yasm/tests}/nasm/sizes2.asm (100%) rename {tests => yasm/tests}/nasm/socket.asm (100%) rename {tests => yasm/tests}/nasm/store.asm (100%) rename {tests => yasm/tests}/nasm/string.asm (100%) rename {tests => yasm/tests}/nasm/test1.asm (100%) rename {tests => yasm/tests}/nasm/times.asm (100%) rename {tests => yasm/tests}/nasm/vbeaf.asm (100%) rename {tools => yasm/tools}/Makefile.inc (100%) rename {tools => yasm/tools}/re2c/CHANGELOG (100%) rename {tools => yasm/tools}/re2c/Makefile.inc (100%) rename {tools => yasm/tools}/re2c/NO_WARRANTY (100%) rename {tools => yasm/tools}/re2c/README (100%) rename {tools => yasm/tools}/re2c/actions.c (100%) rename {tools => yasm/tools}/re2c/basics.h (100%) rename {tools => yasm/tools}/re2c/bootstrap/re2c.man (100%) rename {tools => yasm/tools}/re2c/bootstrap/scanner.c (100%) create mode 100755 yasm/tools/re2c/cleanup.pl rename {tools => yasm/tools}/re2c/code.c (100%) rename {tools => yasm/tools}/re2c/dfa.c (100%) rename {tools => yasm/tools}/re2c/dfa.h (100%) rename {tools => yasm/tools}/re2c/doc/loplas.ps.gz (100%) rename {tools => yasm/tools}/re2c/doc/sample.bib (100%) rename {tools => yasm/tools}/re2c/examples/basemmap.c (100%) rename {tools => yasm/tools}/re2c/examples/c.re (100%) rename {tools => yasm/tools}/re2c/examples/cmmap.re (100%) rename {tools => yasm/tools}/re2c/examples/cnokw.re (100%) rename {tools => yasm/tools}/re2c/examples/cunroll.re (100%) rename {tools => yasm/tools}/re2c/examples/modula.re (100%) rename {tools => yasm/tools}/re2c/examples/rexx/README (100%) rename {tools => yasm/tools}/re2c/examples/rexx/rexx.l (100%) rename {tools => yasm/tools}/re2c/examples/rexx/scanio.c (100%) rename {tools => yasm/tools}/re2c/examples/sample.re (100%) rename {tools => yasm/tools}/re2c/examples/simple.re (100%) rename {tools => yasm/tools}/re2c/globals.h (100%) rename {tools => yasm/tools}/re2c/ins.h (100%) rename {tools => yasm/tools}/re2c/main.c (100%) rename {tools => yasm/tools}/re2c/parse.h (100%) rename {tools => yasm/tools}/re2c/re.h (100%) rename {tools => yasm/tools}/re2c/re2c-parser.y (100%) rename {tools => yasm/tools}/re2c/re2c.1 (100%) rename {tools => yasm/tools}/re2c/scanner.c (100%) rename {tools => yasm/tools}/re2c/scanner.h (100%) rename {tools => yasm/tools}/re2c/scanner.re (100%) rename {tools => yasm/tools}/re2c/substr.c (100%) rename {tools => yasm/tools}/re2c/substr.h (100%) rename {tools => yasm/tools}/re2c/token.h (100%) rename {tools => yasm/tools}/re2c/translate.c (100%) rename {libyasm => yasm}/util.h (97%) diff --git a/Mkfiles/Makefile.dj b/Mkfiles/Makefile.dj deleted file mode 100644 index ac01cbc5..00000000 --- a/Mkfiles/Makefile.dj +++ /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 index 8765c9e1..00000000 --- a/Mkfiles/Makefile.flat +++ /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 index c8bcf58f..00000000 --- a/Mkfiles/Makefile.vc +++ /dev/null @@ -1,76 +0,0 @@ -# $IdPath$ -# -# Ultra-flat Makefile for Visual C++. -# 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: -# nmake -fMkfiles/Makefile.vc - -CFLAGS=/DHAVE_CONFIG_H /IMkfiles/vc /I. /Isrc /Isrc/arch/x86 -CC=cl - -all: yasm.exe - -YASM_BASE_OBJS= \ - src/bytecode.obj \ - src/expr.obj \ - src/symrec.obj \ - src/globals.obj \ - src/file.obj \ - src/section.obj \ - src/arch.obj \ - src/objfmt.obj \ - src/preproc.obj \ - src/parser.obj \ - src/intnum.obj \ - src/floatnum.obj \ - src/hamt.obj \ - src/bitvect.obj \ - src/valparam.obj \ - src/xmalloc.obj \ - src/xstrdup.obj \ - src/strcasecmp.obj - -YASM_ARCH_OBJS= \ - src/arch/x86/x86arch.obj \ - src/arch/x86/x86bc.obj \ - src/arch/x86/x86expr.obj - -YASM_PARSER_OBJS= \ - src/parsers/nasm/nasm-parser.obj \ - nasm-bison.obj \ - nasm-token.obj - -YASM_PREPROC_OBJS= \ - src/preprocs/raw/raw-preproc.obj \ - src/preprocs/yapp/yapp-preproc.obj \ - yapp-token.obj - -YASM_OPTIMIZER_OBJS= \ - src/optimizers/basic/basic-optimizer.obj - -YASM_OBJFMT_OBJS= \ - src/objfmts/dbg/dbg-objfmt.obj \ - src/objfmts/bin/bin-objfmt.obj - -YASM_OBJS= \ - src/main.obj \ - src/errwarn.obj \ - src/options.obj \ - $(YASM_BASE_OBJS) \ - $(YASM_ARCH_OBJS) \ - $(YASM_PARSER_OBJS) \ - $(YASM_PREPROC_OBJS) \ - $(YASM_OPTIMIZER_OBJS) \ - $(YASM_OBJFMT_OBJS) \ - mergesort.obj - -yasm.exe: $(YASM_OBJS) - $(CC) /Feyasm.exe $(YASM_OBJS) - -.c.obj: - $(CC) /c $(CFLAGS) /Fo$@ $< - diff --git a/tools/re2c/cleanup.pl b/tools/re2c/cleanup.pl deleted file mode 100755 index 7034a468..00000000 --- a/tools/re2c/cleanup.pl +++ /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; -} diff --git a/.cvsignore b/yasm/.cvsignore similarity index 100% rename from .cvsignore rename to yasm/.cvsignore diff --git a/.indent.pro b/yasm/.indent.pro similarity index 100% rename from .indent.pro rename to yasm/.indent.pro diff --git a/ABOUT-NLS b/yasm/ABOUT-NLS similarity index 100% rename from ABOUT-NLS rename to yasm/ABOUT-NLS diff --git a/AUTHORS b/yasm/AUTHORS similarity index 100% rename from AUTHORS rename to yasm/AUTHORS diff --git a/COPYING b/yasm/COPYING similarity index 100% rename from COPYING rename to yasm/COPYING diff --git a/COPYING.LIB-2.0 b/yasm/COPYING.LIB-2.0 similarity index 100% rename from COPYING.LIB-2.0 rename to yasm/COPYING.LIB-2.0 diff --git a/ChangeLog b/yasm/ChangeLog similarity index 100% rename from ChangeLog rename to yasm/ChangeLog diff --git a/HACKING b/yasm/HACKING similarity index 100% rename from HACKING rename to yasm/HACKING diff --git a/INSTALL b/yasm/INSTALL similarity index 100% rename from INSTALL rename to yasm/INSTALL diff --git a/Makefile.am b/yasm/Makefile.am similarity index 68% rename from Makefile.am rename to yasm/Makefile.am index a9381313..c9d1f213 100644 --- a/Makefile.am +++ b/yasm/Makefile.am @@ -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 index 00000000..87b6405a --- /dev/null +++ b/yasm/Mkfiles/Makefile.dj @@ -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 index 00000000..7ce9c72b --- /dev/null +++ b/yasm/Mkfiles/Makefile.flat @@ -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 $@ $< + diff --git a/Mkfiles/dj/config.h b/yasm/Mkfiles/dj/config.h similarity index 90% rename from Mkfiles/dj/config.h rename to yasm/Mkfiles/dj/config.h index 5a29c4b6..8ac0485f 100644 --- a/Mkfiles/dj/config.h +++ b/yasm/Mkfiles/dj/config.h @@ -30,18 +30,12 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_ASSERT_H */ -/* Define to 1 if you have the `basename' function. */ -#define HAVE_BASENAME 1 - /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ /* */ /* #undef HAVE_CATGETS */ -/* Define to 1 if you have the `closedir' function. */ -/* #undef HAVE_CLOSEDIR */ - /* Define to 1 if you have the header file. */ #define HAVE_CTYPE_H 1 @@ -104,8 +98,7 @@ /* Define if you have the header file. */ #define HAVE_LIMITS_H 1 -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ +/* Define if your system has a working `malloc' function. */ #define HAVE_MALLOC 1 /* Define if you have the header file. */ @@ -138,15 +131,9 @@ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ -/* Define to 1 if you have the `opendir' function. */ -/* #undef HAVE_OPENDIR */ - /* Define if libtool can extract symbol lists from object files. */ /* #undef HAVE_PRELOADED_SYMBOLS */ -/* Define to 1 if you have the `readdir' function. */ -/* #undefine HAVE_READDIR */ - /* Define to 1 if you have the `rindex' function. */ /* #undef HAVE_RINDEX */ @@ -293,13 +280,13 @@ #define PACKAGE_NAME "yasm" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "yasm CVS" +#define PACKAGE_STRING "yasm `date "+%Y%m%d"`" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "yasm" /* Define to the version of this package. */ -#define PACKAGE_VERSION "CVS" +#define PACKAGE_VERSION "`date "+%Y%m%d"`" /* Define if the C compiler supports function prototypes. */ #define PROTOTYPES 1 @@ -311,11 +298,15 @@ /* #undef USE_FORKWAITMSG */ /* Version number of package */ -#define VERSION "CVS" +#define VERSION "0.1.0" /* Define if using the dmalloc debugging malloc package */ /* #undef WITH_DMALLOC */ +/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'. + */ +#define YYTEXT_POINTER 1 + /* Make sure we see all GNU extensions. */ /* #undef _GNU_SOURCE */ @@ -335,9 +326,6 @@ if it is not supported. */ /* #undef inline */ -/* Define to rpl_malloc if the replacement function should be used. */ -/* #undef malloc */ - /* Define to `int' if doesn't define. */ /* #undef pid_t */ diff --git a/yasm/Mkfiles/dj/libyasm/config.h b/yasm/Mkfiles/dj/libyasm/config.h new file mode 100644 index 00000000..8ac0485f --- /dev/null +++ b/yasm/Mkfiles/dj/libyasm/config.h @@ -0,0 +1,336 @@ +/* $IdPath$ */ + +/* */ +/* #undef ENABLE_NLS */ + +/* Define if you have the `abort' function. */ +#define HAVE_ABORT 1 + +/* Define if you have and it should be used (not on Ultrix). */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the `argz_append' function. */ +/* #undef HAVE_ARGZ_APPEND */ + +/* Define to 1 if you have the `argz_create_sep' function. */ +/* #undef HAVE_ARGZ_CREATE_SEP */ + +/* Define if you have the header file. */ +/* #undef HAVE_ARGZ_H */ + +/* Define to 1 if you have the `argz_insert' function. */ +/* #undef HAVE_ARGZ_INSERT */ + +/* Define to 1 if you have the `argz_next' function. */ +/* #undef HAVE_ARGZ_NEXT */ + +/* Define to 1 if you have the `argz_stringify' function. */ +/* #undef HAVE_ARGZ_STRINGIFY */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASSERT_H */ + +/* Define to 1 if you have the `bcopy' function. */ +/* #undef HAVE_BCOPY */ + +/* */ +/* #undef HAVE_CATGETS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_CTYPE_H 1 + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_DIRENT_H */ + +/* Define if you have the GNU dld library. */ +/* #undef HAVE_DLD */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLD_H */ + +/* Define to 1 if you have the `dlerror' function. */ +/* #undef HAVE_DLERROR */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define if you don't have `vprintf' but do have `_doprnt'. */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ERRNO_H 1 + +/* Define to 1 if the system has the type `error_t'. */ +/* #undef HAVE_ERROR_T */ + +/* Define if you have the `fork' function. */ +/* #undef HAVE_FORK */ + +/* */ +/* #undef HAVE_GETTEXT */ + +/* Define if you have the GNU C Library */ +/* #undef HAVE_GNU_C_LIBRARY */ + +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the `index' function. */ +/* #undef HAVE_INDEX */ + +/* Define if you have the header file. */ +/* #undef HAVE_INTTYPES_H */ + +/* */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define if you have the libdl library or equivalent. */ +/* #undef HAVE_LIBDL */ + +/* Define if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define if your system has a working `malloc' function. */ +#define HAVE_MALLOC 1 + +/* Define if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define if you have the `memmove' function. */ +#define HAVE_MEMMOVE 1 + +/* Define if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if you have the `mergesort function. */ +/* #undef HAVE_MERGESORT */ + +/* Define if you have the `msgctl' function. */ +/* #undef HAVE_MSGCTL */ + +/* Define if you have the `msgget' function. */ +/* #undef HAVE_MSGGET */ + +/* Define if you have the `msgrcv' function. */ +/* #undef HAVE_MSGRCV */ + +/* Define if you have the `msgsnd' function. */ +/* #undef HAVE_MSGSND */ + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define if libtool can extract symbol lists from object files. */ +/* #undef HAVE_PRELOADED_SYMBOLS */ + +/* Define to 1 if you have the `rindex' function. */ +/* #undef HAVE_RINDEX */ + +/* Define if you have the shl_load function. */ +/* #undef HAVE_SHL_LOAD */ + +/* Define if you have the `snprintf' function. */ +/* #undef HAVE_SNPRINTF */ + +/* Define if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* */ +#define HAVE_STPCPY 1 + +/* Define if you have the `strcasecmp' function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the `strchr' function. */ +#define HAVE_STRCHR 1 + +/* Define to 1 if you have the `strcmp' function. */ +#define HAVE_STRCMP 1 + +/* Define if you have the `strcmpi' function. */ +/* #undef HAVE_STRCMPI */ + +/* Define if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define if you have the `stricmp' function. */ +/* #undef HAVE_STRICMP */ + +/* Define if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define if you have the `strncasecmp' function. */ +#define HAVE_STRNCASECMP 1 + +/* Define if you have the `strrchr' function. */ +#define HAVE_STRRCHR 1 + +/* Define if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_CDEFS_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DL_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_IPC_H */ + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_MSG_H */ + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the header file. */ +/* #undef HAVE_SYS_QUEUE_H */ + +/* Define if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define if you have the `toascii' function. */ +#define HAVE_TOASCII 1 + +/* Define if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the `vfork' function. */ +/* #undef HAVE_VFORK */ + +/* Define if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +/* #undef HAVE_VSNPRINTF */ + +/* Define if you have the `wait' function. */ +#define HAVE_WAIT 1 + +/* Define if `fork' works. */ +/* #undef HAVE_WORKING_FORK */ + +/* Define if `vfork' works. */ +/* #undef HAVE_WORKING_VFORK */ + +/* Define if the OS needs help to load dependent libraries for dlopen(). */ +#define LTDL_DLOPEN_DEPLIBS 1 + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LTDL_OBJDIR ".libs/" + +/* Define to the name of the environment variable that determines the dynamic + library search path. */ +#define LTDL_SHLIBPATH_VAR "PATH" + +/* Define to the extension used for shared libraries, say, ".so". */ +#define LTDL_SHLIB_EXT ".dll" + +/* Define to the system default library search path. */ +#define LTDL_SYSSEARCHPATH "/lib:/usr/lib" + +/* Define if dlsym() requires a leading underscode in symbol names. */ +/* #undef NEED_USCORE */ + +/* Name of package */ +#define PACKAGE "yasm" + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "bug-yasm@tortall.net" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "yasm" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "yasm `date "+%Y%m%d"`" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "yasm" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "`date "+%Y%m%d"`" + +/* Define if the C compiler supports function prototypes. */ +#define PROTOTYPES 1 + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Combined test for fork/wait/msg* */ +/* #undef USE_FORKWAITMSG */ + +/* Version number of package */ +#define VERSION "0.1.0" + +/* Define if using the dmalloc debugging malloc package */ +/* #undef WITH_DMALLOC */ + +/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'. + */ +#define YYTEXT_POINTER 1 + +/* Make sure we see all GNU extensions. */ +/* #undef _GNU_SOURCE */ + +/* Make sure we see all SVID extensions. */ +/* #undef _SVID_SOURCE */ + +/* Define like PROTOTYPES; this can be used by system headers. */ +#define __PROTOTYPES 1 + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to a type to use for `error_t' if it is not otherwise available. */ +#define error_t int + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +/* #undef inline */ + +/* Define to `int' if doesn't define. */ +/* #undef pid_t */ + +/* Define to `unsigned' if doesn't define. */ +/* #undef size_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ diff --git a/Mkfiles/nightly-build.pl b/yasm/Mkfiles/nightly-build.pl similarity index 100% rename from Mkfiles/nightly-build.pl rename to yasm/Mkfiles/nightly-build.pl diff --git a/Mkfiles/vc/.cvsignore b/yasm/Mkfiles/vc/.cvsignore similarity index 100% rename from Mkfiles/vc/.cvsignore rename to yasm/Mkfiles/vc/.cvsignore diff --git a/Mkfiles/vc/config.h b/yasm/Mkfiles/vc/config.h similarity index 100% rename from Mkfiles/vc/config.h rename to yasm/Mkfiles/vc/config.h diff --git a/Mkfiles/vc/libyasm/.cvsignore b/yasm/Mkfiles/vc/libyasm/.cvsignore similarity index 100% rename from Mkfiles/vc/libyasm/.cvsignore rename to yasm/Mkfiles/vc/libyasm/.cvsignore diff --git a/Mkfiles/vc/libyasm/config.h b/yasm/Mkfiles/vc/libyasm/config.h similarity index 100% rename from Mkfiles/vc/libyasm/config.h rename to yasm/Mkfiles/vc/libyasm/config.h diff --git a/Mkfiles/vc/libyasm/libyasm.dep b/yasm/Mkfiles/vc/libyasm/libyasm.dep similarity index 100% rename from Mkfiles/vc/libyasm/libyasm.dep rename to yasm/Mkfiles/vc/libyasm/libyasm.dep diff --git a/Mkfiles/vc/libyasm/libyasm.dsp b/yasm/Mkfiles/vc/libyasm/libyasm.dsp similarity index 100% rename from Mkfiles/vc/libyasm/libyasm.dsp rename to yasm/Mkfiles/vc/libyasm/libyasm.dsp diff --git a/Mkfiles/vc/libyasm/libyasm.mak b/yasm/Mkfiles/vc/libyasm/libyasm.mak similarity index 100% rename from Mkfiles/vc/libyasm/libyasm.mak rename to yasm/Mkfiles/vc/libyasm/libyasm.mak diff --git a/Mkfiles/vc/modules/.cvsignore b/yasm/Mkfiles/vc/modules/.cvsignore similarity index 100% rename from Mkfiles/vc/modules/.cvsignore rename to yasm/Mkfiles/vc/modules/.cvsignore diff --git a/Mkfiles/vc/modules/modules.dep b/yasm/Mkfiles/vc/modules/modules.dep similarity index 100% rename from Mkfiles/vc/modules/modules.dep rename to yasm/Mkfiles/vc/modules/modules.dep diff --git a/Mkfiles/vc/modules/modules.dsp b/yasm/Mkfiles/vc/modules/modules.dsp similarity index 100% rename from Mkfiles/vc/modules/modules.dsp rename to yasm/Mkfiles/vc/modules/modules.dsp diff --git a/Mkfiles/vc/modules/modules.mak b/yasm/Mkfiles/vc/modules/modules.mak similarity index 100% rename from Mkfiles/vc/modules/modules.mak rename to yasm/Mkfiles/vc/modules/modules.mak diff --git a/Mkfiles/vc/yasm-module.c b/yasm/Mkfiles/vc/yasm-module.c similarity index 97% rename from Mkfiles/vc/yasm-module.c rename to yasm/Mkfiles/vc/yasm-module.c index b1a3da72..319acd7b 100644 --- a/Mkfiles/vc/yasm-module.c +++ b/yasm/Mkfiles/vc/yasm-module.c @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@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}, diff --git a/Mkfiles/vc/yasm.dep b/yasm/Mkfiles/vc/yasm.dep similarity index 100% rename from Mkfiles/vc/yasm.dep rename to yasm/Mkfiles/vc/yasm.dep diff --git a/Mkfiles/vc/yasm.dsp b/yasm/Mkfiles/vc/yasm.dsp similarity index 100% rename from Mkfiles/vc/yasm.dsp rename to yasm/Mkfiles/vc/yasm.dsp diff --git a/Mkfiles/vc/yasm.dsw b/yasm/Mkfiles/vc/yasm.dsw similarity index 100% rename from Mkfiles/vc/yasm.dsw rename to yasm/Mkfiles/vc/yasm.dsw diff --git a/Mkfiles/vc/yasm.mak b/yasm/Mkfiles/vc/yasm.mak 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 diff --git a/README b/yasm/README similarity index 100% rename from README rename to yasm/README diff --git a/autogen.sh b/yasm/autogen.sh similarity index 100% rename from autogen.sh rename to yasm/autogen.sh diff --git a/check/Makefile.inc b/yasm/check/Makefile.inc similarity index 100% rename from check/Makefile.inc rename to yasm/check/Makefile.inc diff --git a/check/NEWS b/yasm/check/NEWS similarity index 100% rename from check/NEWS rename to yasm/check/NEWS diff --git a/check/README b/yasm/check/README similarity index 100% rename from check/README rename to yasm/check/README diff --git a/check/check.c b/yasm/check/check.c similarity index 100% rename from check/check.c rename to yasm/check/check.c diff --git a/check/check.h b/yasm/check/check.h similarity index 100% rename from check/check.h rename to yasm/check/check.h diff --git a/check/check_impl.h b/yasm/check/check_impl.h similarity index 100% rename from check/check_impl.h rename to yasm/check/check_impl.h diff --git a/check/check_log.c b/yasm/check/check_log.c similarity index 100% rename from check/check_log.c rename to yasm/check/check_log.c diff --git a/check/check_log.h b/yasm/check/check_log.h similarity index 100% rename from check/check_log.h rename to yasm/check/check_log.h diff --git a/check/check_msg.c b/yasm/check/check_msg.c similarity index 100% rename from check/check_msg.c rename to yasm/check/check_msg.c diff --git a/check/check_msg.h b/yasm/check/check_msg.h similarity index 100% rename from check/check_msg.h rename to yasm/check/check_msg.h diff --git a/check/check_print.c b/yasm/check/check_print.c similarity index 100% rename from check/check_print.c rename to yasm/check/check_print.c diff --git a/check/check_print.h b/yasm/check/check_print.h similarity index 100% rename from check/check_print.h rename to yasm/check/check_print.h diff --git a/check/check_run.c b/yasm/check/check_run.c similarity index 100% rename from check/check_run.c rename to yasm/check/check_run.c diff --git a/check/error.c b/yasm/check/error.c similarity index 100% rename from check/error.c rename to yasm/check/error.c diff --git a/check/error.h b/yasm/check/error.h similarity index 100% rename from check/error.h rename to yasm/check/error.h diff --git a/check/list.c b/yasm/check/list.c similarity index 100% rename from check/list.c rename to yasm/check/list.c diff --git a/check/list.h b/yasm/check/list.h similarity index 100% rename from check/list.h rename to yasm/check/list.h diff --git a/config/config.guess b/yasm/config/config.guess similarity index 100% rename from config/config.guess rename to yasm/config/config.guess diff --git a/config/config.rpath b/yasm/config/config.rpath similarity index 100% rename from config/config.rpath rename to yasm/config/config.rpath diff --git a/config/config.sub b/yasm/config/config.sub similarity index 100% rename from config/config.sub rename to yasm/config/config.sub diff --git a/config/ltmain.sh b/yasm/config/ltmain.sh similarity index 100% rename from config/ltmain.sh rename to yasm/config/ltmain.sh diff --git a/config/ylwrap b/yasm/config/ylwrap similarity index 100% rename from config/ylwrap rename to yasm/config/ylwrap diff --git a/configure.ac b/yasm/configure.ac similarity index 95% rename from configure.ac rename to yasm/configure.ac index fa37052f..99c2e515 100644 --- a/configure.ac +++ b/yasm/configure.ac @@ -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 diff --git a/doc/programmer/bitvect/.cvsignore b/yasm/doc/programmer/bitvect/.cvsignore similarity index 100% rename from doc/programmer/bitvect/.cvsignore rename to yasm/doc/programmer/bitvect/.cvsignore diff --git a/doc/programmer/queue/.cvsignore b/yasm/doc/programmer/queue/.cvsignore similarity index 100% rename from doc/programmer/queue/.cvsignore rename to yasm/doc/programmer/queue/.cvsignore diff --git a/float/gdtoa/Makefile b/yasm/float/gdtoa/Makefile similarity index 100% rename from float/gdtoa/Makefile rename to yasm/float/gdtoa/Makefile diff --git a/float/gdtoa/README b/yasm/float/gdtoa/README similarity index 100% rename from float/gdtoa/README rename to yasm/float/gdtoa/README diff --git a/float/gdtoa/arithchk.c b/yasm/float/gdtoa/arithchk.c similarity index 100% rename from float/gdtoa/arithchk.c rename to yasm/float/gdtoa/arithchk.c diff --git a/float/gdtoa/dmisc.c b/yasm/float/gdtoa/dmisc.c similarity index 100% rename from float/gdtoa/dmisc.c rename to yasm/float/gdtoa/dmisc.c diff --git a/float/gdtoa/dtoa.c b/yasm/float/gdtoa/dtoa.c similarity index 100% rename from float/gdtoa/dtoa.c rename to yasm/float/gdtoa/dtoa.c diff --git a/float/gdtoa/g_Qfmt.c b/yasm/float/gdtoa/g_Qfmt.c similarity index 100% rename from float/gdtoa/g_Qfmt.c rename to yasm/float/gdtoa/g_Qfmt.c diff --git a/float/gdtoa/g__fmt.c b/yasm/float/gdtoa/g__fmt.c similarity index 100% rename from float/gdtoa/g__fmt.c rename to yasm/float/gdtoa/g__fmt.c diff --git a/float/gdtoa/g_ddfmt.c b/yasm/float/gdtoa/g_ddfmt.c similarity index 100% rename from float/gdtoa/g_ddfmt.c rename to yasm/float/gdtoa/g_ddfmt.c diff --git a/float/gdtoa/g_dfmt.c b/yasm/float/gdtoa/g_dfmt.c similarity index 100% rename from float/gdtoa/g_dfmt.c rename to yasm/float/gdtoa/g_dfmt.c diff --git a/float/gdtoa/g_ffmt.c b/yasm/float/gdtoa/g_ffmt.c similarity index 100% rename from float/gdtoa/g_ffmt.c rename to yasm/float/gdtoa/g_ffmt.c diff --git a/float/gdtoa/g_xLfmt.c b/yasm/float/gdtoa/g_xLfmt.c similarity index 100% rename from float/gdtoa/g_xLfmt.c rename to yasm/float/gdtoa/g_xLfmt.c diff --git a/float/gdtoa/g_xfmt.c b/yasm/float/gdtoa/g_xfmt.c similarity index 100% rename from float/gdtoa/g_xfmt.c rename to yasm/float/gdtoa/g_xfmt.c diff --git a/float/gdtoa/gdtoa.c b/yasm/float/gdtoa/gdtoa.c similarity index 100% rename from float/gdtoa/gdtoa.c rename to yasm/float/gdtoa/gdtoa.c diff --git a/float/gdtoa/gdtoa.h b/yasm/float/gdtoa/gdtoa.h similarity index 100% rename from float/gdtoa/gdtoa.h rename to yasm/float/gdtoa/gdtoa.h diff --git a/float/gdtoa/gdtoaimp.h b/yasm/float/gdtoa/gdtoaimp.h similarity index 100% rename from float/gdtoa/gdtoaimp.h rename to yasm/float/gdtoa/gdtoaimp.h diff --git a/float/gdtoa/gethex.c b/yasm/float/gdtoa/gethex.c similarity index 100% rename from float/gdtoa/gethex.c rename to yasm/float/gdtoa/gethex.c diff --git a/float/gdtoa/gmisc.c b/yasm/float/gdtoa/gmisc.c similarity index 100% rename from float/gdtoa/gmisc.c rename to yasm/float/gdtoa/gmisc.c diff --git a/float/gdtoa/hd_init.c b/yasm/float/gdtoa/hd_init.c similarity index 100% rename from float/gdtoa/hd_init.c rename to yasm/float/gdtoa/hd_init.c diff --git a/float/gdtoa/hexnan.c b/yasm/float/gdtoa/hexnan.c similarity index 100% rename from float/gdtoa/hexnan.c rename to yasm/float/gdtoa/hexnan.c diff --git a/float/gdtoa/misc.c b/yasm/float/gdtoa/misc.c similarity index 100% rename from float/gdtoa/misc.c rename to yasm/float/gdtoa/misc.c diff --git a/float/gdtoa/smisc.c b/yasm/float/gdtoa/smisc.c similarity index 100% rename from float/gdtoa/smisc.c rename to yasm/float/gdtoa/smisc.c diff --git a/float/gdtoa/strtoIQ.c b/yasm/float/gdtoa/strtoIQ.c similarity index 100% rename from float/gdtoa/strtoIQ.c rename to yasm/float/gdtoa/strtoIQ.c diff --git a/float/gdtoa/strtoId.c b/yasm/float/gdtoa/strtoId.c similarity index 100% rename from float/gdtoa/strtoId.c rename to yasm/float/gdtoa/strtoId.c diff --git a/float/gdtoa/strtoIdd.c b/yasm/float/gdtoa/strtoIdd.c similarity index 100% rename from float/gdtoa/strtoIdd.c rename to yasm/float/gdtoa/strtoIdd.c diff --git a/float/gdtoa/strtoIf.c b/yasm/float/gdtoa/strtoIf.c similarity index 100% rename from float/gdtoa/strtoIf.c rename to yasm/float/gdtoa/strtoIf.c diff --git a/float/gdtoa/strtoIg.c b/yasm/float/gdtoa/strtoIg.c similarity index 100% rename from float/gdtoa/strtoIg.c rename to yasm/float/gdtoa/strtoIg.c diff --git a/float/gdtoa/strtoIx.c b/yasm/float/gdtoa/strtoIx.c similarity index 100% rename from float/gdtoa/strtoIx.c rename to yasm/float/gdtoa/strtoIx.c diff --git a/float/gdtoa/strtoIxL.c b/yasm/float/gdtoa/strtoIxL.c similarity index 100% rename from float/gdtoa/strtoIxL.c rename to yasm/float/gdtoa/strtoIxL.c diff --git a/float/gdtoa/strtod.c b/yasm/float/gdtoa/strtod.c similarity index 100% rename from float/gdtoa/strtod.c rename to yasm/float/gdtoa/strtod.c diff --git a/float/gdtoa/strtodI.c b/yasm/float/gdtoa/strtodI.c similarity index 100% rename from float/gdtoa/strtodI.c rename to yasm/float/gdtoa/strtodI.c diff --git a/float/gdtoa/strtodg.c b/yasm/float/gdtoa/strtodg.c similarity index 100% rename from float/gdtoa/strtodg.c rename to yasm/float/gdtoa/strtodg.c diff --git a/float/gdtoa/strtof.c b/yasm/float/gdtoa/strtof.c similarity index 100% rename from float/gdtoa/strtof.c rename to yasm/float/gdtoa/strtof.c diff --git a/float/gdtoa/strtopQ.c b/yasm/float/gdtoa/strtopQ.c similarity index 100% rename from float/gdtoa/strtopQ.c rename to yasm/float/gdtoa/strtopQ.c diff --git a/float/gdtoa/strtopd.c b/yasm/float/gdtoa/strtopd.c similarity index 100% rename from float/gdtoa/strtopd.c rename to yasm/float/gdtoa/strtopd.c diff --git a/float/gdtoa/strtopdd.c b/yasm/float/gdtoa/strtopdd.c similarity index 100% rename from float/gdtoa/strtopdd.c rename to yasm/float/gdtoa/strtopdd.c diff --git a/float/gdtoa/strtopf.c b/yasm/float/gdtoa/strtopf.c similarity index 100% rename from float/gdtoa/strtopf.c rename to yasm/float/gdtoa/strtopf.c diff --git a/float/gdtoa/strtopx.c b/yasm/float/gdtoa/strtopx.c similarity index 100% rename from float/gdtoa/strtopx.c rename to yasm/float/gdtoa/strtopx.c diff --git a/float/gdtoa/strtopxL.c b/yasm/float/gdtoa/strtopxL.c similarity index 100% rename from float/gdtoa/strtopxL.c rename to yasm/float/gdtoa/strtopxL.c diff --git a/float/gdtoa/strtorQ.c b/yasm/float/gdtoa/strtorQ.c similarity index 100% rename from float/gdtoa/strtorQ.c rename to yasm/float/gdtoa/strtorQ.c diff --git a/float/gdtoa/strtord.c b/yasm/float/gdtoa/strtord.c similarity index 100% rename from float/gdtoa/strtord.c rename to yasm/float/gdtoa/strtord.c diff --git a/float/gdtoa/strtordd.c b/yasm/float/gdtoa/strtordd.c similarity index 100% rename from float/gdtoa/strtordd.c rename to yasm/float/gdtoa/strtordd.c diff --git a/float/gdtoa/strtorf.c b/yasm/float/gdtoa/strtorf.c similarity index 100% rename from float/gdtoa/strtorf.c rename to yasm/float/gdtoa/strtorf.c diff --git a/float/gdtoa/strtorx.c b/yasm/float/gdtoa/strtorx.c similarity index 100% rename from float/gdtoa/strtorx.c rename to yasm/float/gdtoa/strtorx.c diff --git a/float/gdtoa/strtorxL.c b/yasm/float/gdtoa/strtorxL.c similarity index 100% rename from float/gdtoa/strtorxL.c rename to yasm/float/gdtoa/strtorxL.c diff --git a/float/gdtoa/sum.c b/yasm/float/gdtoa/sum.c similarity index 100% rename from float/gdtoa/sum.c rename to yasm/float/gdtoa/sum.c diff --git a/float/gdtoa/test/Makefile b/yasm/float/gdtoa/test/Makefile similarity index 100% rename from float/gdtoa/test/Makefile rename to yasm/float/gdtoa/test/Makefile diff --git a/float/gdtoa/test/Q.ou0 b/yasm/float/gdtoa/test/Q.ou0 similarity index 100% rename from float/gdtoa/test/Q.ou0 rename to yasm/float/gdtoa/test/Q.ou0 diff --git a/float/gdtoa/test/Q.ou1 b/yasm/float/gdtoa/test/Q.ou1 similarity index 100% rename from float/gdtoa/test/Q.ou1 rename to yasm/float/gdtoa/test/Q.ou1 diff --git a/float/gdtoa/test/Qtest.c b/yasm/float/gdtoa/test/Qtest.c similarity index 100% rename from float/gdtoa/test/Qtest.c rename to yasm/float/gdtoa/test/Qtest.c diff --git a/float/gdtoa/test/README b/yasm/float/gdtoa/test/README similarity index 100% rename from float/gdtoa/test/README rename to yasm/float/gdtoa/test/README diff --git a/float/gdtoa/test/d.out b/yasm/float/gdtoa/test/d.out similarity index 100% rename from float/gdtoa/test/d.out rename to yasm/float/gdtoa/test/d.out diff --git a/float/gdtoa/test/dI.out b/yasm/float/gdtoa/test/dI.out similarity index 100% rename from float/gdtoa/test/dI.out rename to yasm/float/gdtoa/test/dI.out diff --git a/float/gdtoa/test/dIsi.out b/yasm/float/gdtoa/test/dIsi.out similarity index 100% rename from float/gdtoa/test/dIsi.out rename to yasm/float/gdtoa/test/dIsi.out diff --git a/float/gdtoa/test/dItest.c b/yasm/float/gdtoa/test/dItest.c similarity index 100% rename from float/gdtoa/test/dItest.c rename to yasm/float/gdtoa/test/dItest.c diff --git a/float/gdtoa/test/dd.out b/yasm/float/gdtoa/test/dd.out similarity index 100% rename from float/gdtoa/test/dd.out rename to yasm/float/gdtoa/test/dd.out diff --git a/float/gdtoa/test/ddsi.out b/yasm/float/gdtoa/test/ddsi.out similarity index 100% rename from float/gdtoa/test/ddsi.out rename to yasm/float/gdtoa/test/ddsi.out diff --git a/float/gdtoa/test/ddtest.c b/yasm/float/gdtoa/test/ddtest.c similarity index 100% rename from float/gdtoa/test/ddtest.c rename to yasm/float/gdtoa/test/ddtest.c diff --git a/float/gdtoa/test/dt.c b/yasm/float/gdtoa/test/dt.c similarity index 100% rename from float/gdtoa/test/dt.c rename to yasm/float/gdtoa/test/dt.c diff --git a/float/gdtoa/test/dtest.c b/yasm/float/gdtoa/test/dtest.c similarity index 100% rename from float/gdtoa/test/dtest.c rename to yasm/float/gdtoa/test/dtest.c diff --git a/float/gdtoa/test/dtst.out b/yasm/float/gdtoa/test/dtst.out similarity index 100% rename from float/gdtoa/test/dtst.out rename to yasm/float/gdtoa/test/dtst.out diff --git a/float/gdtoa/test/f.out b/yasm/float/gdtoa/test/f.out similarity index 100% rename from float/gdtoa/test/f.out rename to yasm/float/gdtoa/test/f.out diff --git a/float/gdtoa/test/ftest.c b/yasm/float/gdtoa/test/ftest.c similarity index 100% rename from float/gdtoa/test/ftest.c rename to yasm/float/gdtoa/test/ftest.c diff --git a/float/gdtoa/test/getround.c b/yasm/float/gdtoa/test/getround.c similarity index 100% rename from float/gdtoa/test/getround.c rename to yasm/float/gdtoa/test/getround.c diff --git a/float/gdtoa/test/rtestnos b/yasm/float/gdtoa/test/rtestnos similarity index 100% rename from float/gdtoa/test/rtestnos rename to yasm/float/gdtoa/test/rtestnos diff --git a/float/gdtoa/test/strtoIdSI.c b/yasm/float/gdtoa/test/strtoIdSI.c similarity index 100% rename from float/gdtoa/test/strtoIdSI.c rename to yasm/float/gdtoa/test/strtoIdSI.c diff --git a/float/gdtoa/test/strtoIddSI.c b/yasm/float/gdtoa/test/strtoIddSI.c similarity index 100% rename from float/gdtoa/test/strtoIddSI.c rename to yasm/float/gdtoa/test/strtoIddSI.c diff --git a/float/gdtoa/test/strtodISI.c b/yasm/float/gdtoa/test/strtodISI.c similarity index 100% rename from float/gdtoa/test/strtodISI.c rename to yasm/float/gdtoa/test/strtodISI.c diff --git a/float/gdtoa/test/strtodt.c b/yasm/float/gdtoa/test/strtodt.c similarity index 100% rename from float/gdtoa/test/strtodt.c rename to yasm/float/gdtoa/test/strtodt.c diff --git a/float/gdtoa/test/strtopddSI.c b/yasm/float/gdtoa/test/strtopddSI.c similarity index 100% rename from float/gdtoa/test/strtopddSI.c rename to yasm/float/gdtoa/test/strtopddSI.c diff --git a/float/gdtoa/test/strtorddSI.c b/yasm/float/gdtoa/test/strtorddSI.c similarity index 100% rename from float/gdtoa/test/strtorddSI.c rename to yasm/float/gdtoa/test/strtorddSI.c diff --git a/float/gdtoa/test/testnos b/yasm/float/gdtoa/test/testnos similarity index 100% rename from float/gdtoa/test/testnos rename to yasm/float/gdtoa/test/testnos diff --git a/float/gdtoa/test/testnos1 b/yasm/float/gdtoa/test/testnos1 similarity index 100% rename from float/gdtoa/test/testnos1 rename to yasm/float/gdtoa/test/testnos1 diff --git a/float/gdtoa/test/testnos3 b/yasm/float/gdtoa/test/testnos3 similarity index 100% rename from float/gdtoa/test/testnos3 rename to yasm/float/gdtoa/test/testnos3 diff --git a/float/gdtoa/test/x.ou0 b/yasm/float/gdtoa/test/x.ou0 similarity index 100% rename from float/gdtoa/test/x.ou0 rename to yasm/float/gdtoa/test/x.ou0 diff --git a/float/gdtoa/test/x.ou1 b/yasm/float/gdtoa/test/x.ou1 similarity index 100% rename from float/gdtoa/test/x.ou1 rename to yasm/float/gdtoa/test/x.ou1 diff --git a/float/gdtoa/test/xL.ou0 b/yasm/float/gdtoa/test/xL.ou0 similarity index 100% rename from float/gdtoa/test/xL.ou0 rename to yasm/float/gdtoa/test/xL.ou0 diff --git a/float/gdtoa/test/xL.ou1 b/yasm/float/gdtoa/test/xL.ou1 similarity index 100% rename from float/gdtoa/test/xL.ou1 rename to yasm/float/gdtoa/test/xL.ou1 diff --git a/float/gdtoa/test/xLtest.c b/yasm/float/gdtoa/test/xLtest.c similarity index 100% rename from float/gdtoa/test/xLtest.c rename to yasm/float/gdtoa/test/xLtest.c diff --git a/float/gdtoa/test/xQtest.c b/yasm/float/gdtoa/test/xQtest.c similarity index 100% rename from float/gdtoa/test/xQtest.c rename to yasm/float/gdtoa/test/xQtest.c diff --git a/float/gdtoa/test/xsum0.out b/yasm/float/gdtoa/test/xsum0.out similarity index 100% rename from float/gdtoa/test/xsum0.out rename to yasm/float/gdtoa/test/xsum0.out diff --git a/float/gdtoa/test/xtest.c b/yasm/float/gdtoa/test/xtest.c similarity index 100% rename from float/gdtoa/test/xtest.c rename to yasm/float/gdtoa/test/xtest.c diff --git a/float/gdtoa/ulp.c b/yasm/float/gdtoa/ulp.c similarity index 100% rename from float/gdtoa/ulp.c rename to yasm/float/gdtoa/ulp.c diff --git a/float/gdtoa/xsum0.out b/yasm/float/gdtoa/xsum0.out similarity index 100% rename from float/gdtoa/xsum0.out rename to yasm/float/gdtoa/xsum0.out diff --git a/float/softfloat/processors/386-GCC.h b/yasm/float/softfloat/processors/386-GCC.h similarity index 100% rename from float/softfloat/processors/386-GCC.h rename to yasm/float/softfloat/processors/386-GCC.h diff --git a/float/softfloat/processors/SPARC-GCC.h b/yasm/float/softfloat/processors/SPARC-GCC.h similarity index 100% rename from float/softfloat/processors/SPARC-GCC.h rename to yasm/float/softfloat/processors/SPARC-GCC.h diff --git a/float/softfloat/softfloat/README.txt b/yasm/float/softfloat/softfloat/README.txt similarity index 100% rename from float/softfloat/softfloat/README.txt rename to yasm/float/softfloat/softfloat/README.txt diff --git a/float/softfloat/softfloat/SoftFloat-history.txt b/yasm/float/softfloat/softfloat/SoftFloat-history.txt similarity index 100% rename from float/softfloat/softfloat/SoftFloat-history.txt rename to yasm/float/softfloat/softfloat/SoftFloat-history.txt diff --git a/float/softfloat/softfloat/SoftFloat-source.txt b/yasm/float/softfloat/softfloat/SoftFloat-source.txt similarity index 100% rename from float/softfloat/softfloat/SoftFloat-source.txt rename to yasm/float/softfloat/softfloat/SoftFloat-source.txt diff --git a/float/softfloat/softfloat/SoftFloat.txt b/yasm/float/softfloat/softfloat/SoftFloat.txt similarity index 100% rename from float/softfloat/softfloat/SoftFloat.txt rename to yasm/float/softfloat/softfloat/SoftFloat.txt diff --git a/float/softfloat/softfloat/bits32/386-Win32-GCC/milieu.h b/yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/milieu.h similarity index 100% rename from float/softfloat/softfloat/bits32/386-Win32-GCC/milieu.h rename to yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/milieu.h diff --git a/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat-specialize b/yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat-specialize similarity index 100% rename from float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat-specialize rename to yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat-specialize diff --git a/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat.h b/yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat.h similarity index 100% rename from float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat.h rename to yasm/float/softfloat/softfloat/bits32/386-Win32-GCC/softfloat.h diff --git a/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/milieu.h b/yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/milieu.h similarity index 100% rename from float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/milieu.h rename to yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/milieu.h diff --git a/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat-specialize b/yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat-specialize similarity index 100% rename from float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat-specialize rename to yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat-specialize diff --git a/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat.h b/yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat.h similarity index 100% rename from float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat.h rename to yasm/float/softfloat/softfloat/bits32/SPARC-Solaris-GCC/softfloat.h diff --git a/float/softfloat/softfloat/bits32/softfloat-macros b/yasm/float/softfloat/softfloat/bits32/softfloat-macros similarity index 100% rename from float/softfloat/softfloat/bits32/softfloat-macros rename to yasm/float/softfloat/softfloat/bits32/softfloat-macros diff --git a/float/softfloat/softfloat/bits32/softfloat.c b/yasm/float/softfloat/softfloat/bits32/softfloat.c similarity index 100% rename from float/softfloat/softfloat/bits32/softfloat.c rename to yasm/float/softfloat/softfloat/bits32/softfloat.c diff --git a/float/softfloat/softfloat/bits32/templates/milieu.h b/yasm/float/softfloat/softfloat/bits32/templates/milieu.h similarity index 100% rename from float/softfloat/softfloat/bits32/templates/milieu.h rename to yasm/float/softfloat/softfloat/bits32/templates/milieu.h diff --git a/float/softfloat/softfloat/bits32/templates/softfloat-specialize b/yasm/float/softfloat/softfloat/bits32/templates/softfloat-specialize similarity index 100% rename from float/softfloat/softfloat/bits32/templates/softfloat-specialize rename to yasm/float/softfloat/softfloat/bits32/templates/softfloat-specialize diff --git a/float/softfloat/softfloat/bits32/templates/softfloat.h b/yasm/float/softfloat/softfloat/bits32/templates/softfloat.h similarity index 100% rename from float/softfloat/softfloat/bits32/templates/softfloat.h rename to yasm/float/softfloat/softfloat/bits32/templates/softfloat.h diff --git a/float/softfloat/softfloat/bits32/timesoftfloat.c b/yasm/float/softfloat/softfloat/bits32/timesoftfloat.c similarity index 100% rename from float/softfloat/softfloat/bits32/timesoftfloat.c rename to yasm/float/softfloat/softfloat/bits32/timesoftfloat.c diff --git a/float/softfloat/softfloat/bits64/386-Win32-GCC/milieu.h b/yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/milieu.h similarity index 100% rename from float/softfloat/softfloat/bits64/386-Win32-GCC/milieu.h rename to yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/milieu.h diff --git a/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat-specialize b/yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat-specialize similarity index 100% rename from float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat-specialize rename to yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat-specialize diff --git a/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat.h b/yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat.h similarity index 100% rename from float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat.h rename to yasm/float/softfloat/softfloat/bits64/386-Win32-GCC/softfloat.h diff --git a/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/milieu.h b/yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/milieu.h similarity index 100% rename from float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/milieu.h rename to yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/milieu.h diff --git a/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat-specialize b/yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat-specialize similarity index 100% rename from float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat-specialize rename to yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat-specialize diff --git a/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat.h b/yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat.h similarity index 100% rename from float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat.h rename to yasm/float/softfloat/softfloat/bits64/SPARC-Solaris-GCC/softfloat.h diff --git a/float/softfloat/softfloat/bits64/softfloat-macros b/yasm/float/softfloat/softfloat/bits64/softfloat-macros similarity index 100% rename from float/softfloat/softfloat/bits64/softfloat-macros rename to yasm/float/softfloat/softfloat/bits64/softfloat-macros diff --git a/float/softfloat/softfloat/bits64/softfloat.c b/yasm/float/softfloat/softfloat/bits64/softfloat.c similarity index 100% rename from float/softfloat/softfloat/bits64/softfloat.c rename to yasm/float/softfloat/softfloat/bits64/softfloat.c diff --git a/float/softfloat/softfloat/bits64/templates/milieu.h b/yasm/float/softfloat/softfloat/bits64/templates/milieu.h similarity index 100% rename from float/softfloat/softfloat/bits64/templates/milieu.h rename to yasm/float/softfloat/softfloat/bits64/templates/milieu.h diff --git a/float/softfloat/softfloat/bits64/templates/softfloat-specialize b/yasm/float/softfloat/softfloat/bits64/templates/softfloat-specialize similarity index 100% rename from float/softfloat/softfloat/bits64/templates/softfloat-specialize rename to yasm/float/softfloat/softfloat/bits64/templates/softfloat-specialize diff --git a/float/softfloat/softfloat/bits64/templates/softfloat.h b/yasm/float/softfloat/softfloat/bits64/templates/softfloat.h similarity index 100% rename from float/softfloat/softfloat/bits64/templates/softfloat.h rename to yasm/float/softfloat/softfloat/bits64/templates/softfloat.h diff --git a/float/softfloat/softfloat/bits64/timesoftfloat.c b/yasm/float/softfloat/softfloat/bits64/timesoftfloat.c similarity index 100% rename from float/softfloat/softfloat/bits64/timesoftfloat.c rename to yasm/float/softfloat/softfloat/bits64/timesoftfloat.c diff --git a/float/softfloat/softfloat/timesoftfloat.txt b/yasm/float/softfloat/softfloat/timesoftfloat.txt similarity index 100% rename from float/softfloat/softfloat/timesoftfloat.txt rename to yasm/float/softfloat/softfloat/timesoftfloat.txt diff --git a/frontends/Makefile.inc b/yasm/frontends/Makefile.inc similarity index 100% rename from frontends/Makefile.inc rename to yasm/frontends/Makefile.inc diff --git a/frontends/yasm/Makefile.inc b/yasm/frontends/yasm/Makefile.inc similarity index 100% rename from frontends/yasm/Makefile.inc rename to yasm/frontends/yasm/Makefile.inc diff --git a/frontends/yasm/yasm-module.c b/yasm/frontends/yasm/yasm-module.c similarity index 99% rename from frontends/yasm/yasm-module.c rename to yasm/frontends/yasm/yasm-module.c index 432b2358..cfe19d53 100644 --- a/frontends/yasm/yasm-module.c +++ b/yasm/frontends/yasm/yasm-module.c @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@unused@*/ RCSID("$IdPath$"); #include "ltdl.h" diff --git a/frontends/yasm/yasm-module.h b/yasm/frontends/yasm/yasm-module.h similarity index 100% rename from frontends/yasm/yasm-module.h rename to yasm/frontends/yasm/yasm-module.h diff --git a/frontends/yasm/yasm-options.c b/yasm/frontends/yasm/yasm-options.c similarity index 99% rename from frontends/yasm/yasm-options.c rename to yasm/frontends/yasm/yasm-options.c index fd8ba560..5b309acb 100644 --- a/frontends/yasm/yasm-options.c +++ b/yasm/frontends/yasm/yasm-options.c @@ -28,7 +28,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@unused@*/ RCSID("$IdPath$"); #include "yasm-options.h" diff --git a/frontends/yasm/yasm-options.h b/yasm/frontends/yasm/yasm-options.h similarity index 100% rename from frontends/yasm/yasm-options.h rename to yasm/frontends/yasm/yasm-options.h diff --git a/frontends/yasm/yasm.c b/yasm/frontends/yasm/yasm.c similarity index 98% rename from frontends/yasm/yasm.c rename to yasm/frontends/yasm/yasm.c index 6bd6e46d..1463a066 100644 --- a/frontends/yasm/yasm.c +++ b/yasm/frontends/yasm/yasm.c @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@unused@*/ RCSID("$IdPath$"); #ifndef WIN32 @@ -40,6 +40,10 @@ # 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) diff --git a/libltdl/.cvsignore b/yasm/libltdl/.cvsignore similarity index 100% rename from libltdl/.cvsignore rename to yasm/libltdl/.cvsignore diff --git a/libltdl/COPYING.LIB b/yasm/libltdl/COPYING.LIB similarity index 100% rename from libltdl/COPYING.LIB rename to yasm/libltdl/COPYING.LIB diff --git a/libltdl/Makefile.am b/yasm/libltdl/Makefile.am similarity index 100% rename from libltdl/Makefile.am rename to yasm/libltdl/Makefile.am diff --git a/libltdl/README b/yasm/libltdl/README similarity index 100% rename from libltdl/README rename to yasm/libltdl/README diff --git a/libltdl/ltdl.c b/yasm/libltdl/ltdl.c similarity index 100% rename from libltdl/ltdl.c rename to yasm/libltdl/ltdl.c diff --git a/libltdl/ltdl.h b/yasm/libltdl/ltdl.h similarity index 100% rename from libltdl/ltdl.h rename to yasm/libltdl/ltdl.h diff --git a/libyasm.h b/yasm/libyasm.h similarity index 81% rename from libyasm.h rename to yasm/libyasm.h index 9206f279..74fa288d 100644 --- a/libyasm.h +++ b/yasm/libyasm.h @@ -45,35 +45,35 @@ * (used when compiling the library itself) */ -#include "libyasm/util.h" -#include "libyasm/linemgr.h" +#include +#include -#include "libyasm/errwarn.h" -#include "libyasm/intnum.h" -#include "libyasm/floatnum.h" -#include "libyasm/expr.h" -#include "libyasm/symrec.h" +#include +#include +#include +#include +#include -#include "libyasm/bytecode.h" -#include "libyasm/section.h" +#include +#include -#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 +#include +#include +#include +#include +#include #ifdef YASM_INTERNAL #ifdef YASM_BC_INTERNAL -#include "libyasm/bc-int.h" +#include #endif #ifdef YASM_EXPR_INTERNAL -#include "libyasm/expr-int.h" +#include #endif -#include "libyasm/file.h" -#include "libyasm/hamt.h" -#include "libyasm/bitvect.h" +#include +#include +#include #endif #endif diff --git a/libyasm/.cvsignore b/yasm/libyasm/.cvsignore similarity index 100% rename from libyasm/.cvsignore rename to yasm/libyasm/.cvsignore diff --git a/libyasm/Makefile.inc b/yasm/libyasm/Makefile.inc similarity index 100% rename from libyasm/Makefile.inc rename to yasm/libyasm/Makefile.inc diff --git a/libyasm/arch.c b/yasm/libyasm/arch.c similarity index 100% rename from libyasm/arch.c rename to yasm/libyasm/arch.c diff --git a/libyasm/arch.h b/yasm/libyasm/arch.h similarity index 100% rename from libyasm/arch.h rename to yasm/libyasm/arch.h diff --git a/libyasm/bc-int.h b/yasm/libyasm/bc-int.h similarity index 100% rename from libyasm/bc-int.h rename to yasm/libyasm/bc-int.h diff --git a/libyasm/bitvect.c b/yasm/libyasm/bitvect.c similarity index 100% rename from libyasm/bitvect.c rename to yasm/libyasm/bitvect.c diff --git a/libyasm/bitvect.h b/yasm/libyasm/bitvect.h similarity index 100% rename from libyasm/bitvect.h rename to yasm/libyasm/bitvect.h diff --git a/libyasm/bytecode.c b/yasm/libyasm/bytecode.c similarity index 96% rename from libyasm/bytecode.c rename to yasm/libyasm/bytecode.c index 808677e7..0f102b52 100644 --- a/libyasm/bytecode.c +++ b/yasm/libyasm/bytecode.c @@ -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 diff --git a/libyasm/bytecode.h b/yasm/libyasm/bytecode.h similarity index 97% rename from libyasm/bytecode.h rename to yasm/libyasm/bytecode.h index 276633d5..30570221 100644 --- a/libyasm/bytecode.h +++ b/yasm/libyasm/bytecode.h @@ -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, diff --git a/libyasm/compat-queue.h b/yasm/libyasm/compat-queue.h similarity index 100% rename from libyasm/compat-queue.h rename to yasm/libyasm/compat-queue.h diff --git a/libyasm/coretype.h b/yasm/libyasm/coretype.h similarity index 98% rename from libyasm/coretype.h rename to yasm/libyasm/coretype.h index 75d9f88d..3cd2b5bc 100644 --- a/libyasm/coretype.h +++ b/yasm/libyasm/coretype.h @@ -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 diff --git a/libyasm/dbgfmt.h b/yasm/libyasm/dbgfmt.h similarity index 93% rename from libyasm/dbgfmt.h rename to yasm/libyasm/dbgfmt.h index d3467689..14db4b87 100644 --- a/libyasm/dbgfmt.h +++ b/yasm/libyasm/dbgfmt.h @@ -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 diff --git a/libyasm/errwarn.c b/yasm/libyasm/errwarn.c similarity index 99% rename from libyasm/errwarn.c rename to yasm/libyasm/errwarn.c index ac30639c..3156b8fc 100644 --- a/libyasm/errwarn.c +++ b/yasm/libyasm/errwarn.c @@ -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; diff --git a/libyasm/errwarn.h b/yasm/libyasm/errwarn.h similarity index 99% rename from libyasm/errwarn.h rename to yasm/libyasm/errwarn.h index dd46adc8..e706b8b0 100644 --- a/libyasm/errwarn.h +++ b/yasm/libyasm/errwarn.h @@ -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. */ diff --git a/libyasm/expr-int.h b/yasm/libyasm/expr-int.h similarity index 100% rename from libyasm/expr-int.h rename to yasm/libyasm/expr-int.h diff --git a/libyasm/expr.c b/yasm/libyasm/expr.c similarity index 100% rename from libyasm/expr.c rename to yasm/libyasm/expr.c diff --git a/libyasm/expr.h b/yasm/libyasm/expr.h similarity index 100% rename from libyasm/expr.h rename to yasm/libyasm/expr.h diff --git a/libyasm/file.c b/yasm/libyasm/file.c similarity index 100% rename from libyasm/file.c rename to yasm/libyasm/file.c diff --git a/libyasm/file.h b/yasm/libyasm/file.h similarity index 100% rename from libyasm/file.h rename to yasm/libyasm/file.h diff --git a/libyasm/floatnum.c b/yasm/libyasm/floatnum.c similarity index 100% rename from libyasm/floatnum.c rename to yasm/libyasm/floatnum.c diff --git a/libyasm/floatnum.h b/yasm/libyasm/floatnum.h similarity index 100% rename from libyasm/floatnum.h rename to yasm/libyasm/floatnum.h diff --git a/libyasm/hamt.c b/yasm/libyasm/hamt.c similarity index 100% rename from libyasm/hamt.c rename to yasm/libyasm/hamt.c diff --git a/libyasm/hamt.h b/yasm/libyasm/hamt.h similarity index 100% rename from libyasm/hamt.h rename to yasm/libyasm/hamt.h diff --git a/libyasm/intnum.c b/yasm/libyasm/intnum.c similarity index 99% rename from libyasm/intnum.c rename to yasm/libyasm/intnum.c index 26312a48..81b46d59 100644 --- a/libyasm/intnum.c +++ b/yasm/libyasm/intnum.c @@ -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; diff --git a/libyasm/intnum.h b/yasm/libyasm/intnum.h similarity index 100% rename from libyasm/intnum.h rename to yasm/libyasm/intnum.h diff --git a/libyasm/linemgr.c b/yasm/libyasm/linemgr.c similarity index 99% rename from libyasm/linemgr.c rename to yasm/libyasm/linemgr.c index df6beac2..1983ad6d 100644 --- a/libyasm/linemgr.c +++ b/yasm/libyasm/linemgr.c @@ -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; jsize; 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, diff --git a/libyasm/linemgr.h b/yasm/libyasm/linemgr.h similarity index 100% rename from libyasm/linemgr.h rename to yasm/libyasm/linemgr.h diff --git a/libyasm/mergesort.c b/yasm/libyasm/mergesort.c similarity index 100% rename from libyasm/mergesort.c rename to yasm/libyasm/mergesort.c diff --git a/libyasm/objfmt.h b/yasm/libyasm/objfmt.h similarity index 98% rename from libyasm/objfmt.h rename to yasm/libyasm/objfmt.h index 45522c56..7cc73a53 100644 --- a/libyasm/objfmt.h +++ b/yasm/libyasm/objfmt.h @@ -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. diff --git a/libyasm/optimizer.h b/yasm/libyasm/optimizer.h similarity index 100% rename from libyasm/optimizer.h rename to yasm/libyasm/optimizer.h diff --git a/libyasm/parser.h b/yasm/libyasm/parser.h similarity index 100% rename from libyasm/parser.h rename to yasm/libyasm/parser.h diff --git a/libyasm/preproc.h b/yasm/libyasm/preproc.h similarity index 100% rename from libyasm/preproc.h rename to yasm/libyasm/preproc.h diff --git a/libyasm/section.c b/yasm/libyasm/section.c similarity index 100% rename from libyasm/section.c rename to yasm/libyasm/section.c diff --git a/libyasm/section.h b/yasm/libyasm/section.h similarity index 100% rename from libyasm/section.h rename to yasm/libyasm/section.h diff --git a/libyasm/strcasecmp.c b/yasm/libyasm/strcasecmp.c similarity index 100% rename from libyasm/strcasecmp.c rename to yasm/libyasm/strcasecmp.c diff --git a/libyasm/strsep.c b/yasm/libyasm/strsep.c similarity index 100% rename from libyasm/strsep.c rename to yasm/libyasm/strsep.c diff --git a/libyasm/symrec.c b/yasm/libyasm/symrec.c similarity index 100% rename from libyasm/symrec.c rename to yasm/libyasm/symrec.c diff --git a/libyasm/symrec.h b/yasm/libyasm/symrec.h similarity index 100% rename from libyasm/symrec.h rename to yasm/libyasm/symrec.h diff --git a/libyasm/tests/Makefile.inc b/yasm/libyasm/tests/Makefile.inc similarity index 100% rename from libyasm/tests/Makefile.inc rename to yasm/libyasm/tests/Makefile.inc diff --git a/libyasm/tests/bitvect_test.c b/yasm/libyasm/tests/bitvect_test.c similarity index 100% rename from libyasm/tests/bitvect_test.c rename to yasm/libyasm/tests/bitvect_test.c diff --git a/libyasm/tests/bytecode_test.c b/yasm/libyasm/tests/bytecode_test.c similarity index 100% rename from libyasm/tests/bytecode_test.c rename to yasm/libyasm/tests/bytecode_test.c diff --git a/libyasm/tests/floatnum_test.c b/yasm/libyasm/tests/floatnum_test.c similarity index 100% rename from libyasm/tests/floatnum_test.c rename to yasm/libyasm/tests/floatnum_test.c diff --git a/libyasm/tests/memexpr_test.c b/yasm/libyasm/tests/memexpr_test.c similarity index 100% rename from libyasm/tests/memexpr_test.c rename to yasm/libyasm/tests/memexpr_test.c diff --git a/util.h b/yasm/libyasm/util.h similarity index 97% rename from util.h rename to yasm/libyasm/util.h index 9cf5a0bc..ca3e2623 100644 --- a/util.h +++ b/yasm/libyasm/util.h @@ -42,7 +42,7 @@ # include #if defined(YASM_LIB_AC_INTERNAL) && defined(HAVE_CONFIG_H) -# include "libyasm/config.h" +# include #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 #if defined(YASM_AUTOCONF_INTERNAL) && defined(HAVE_SYS_CDEFS_H) # include @@ -195,8 +195,8 @@ extern void (*yasm_xfree) (/*@only@*/ /*@out@*/ /*@null@*/ void *p) #endif /*YASM_INTERNAL*/ -#include "libyasm/coretype.h" +#include -#include "libyasm/valparam.h" +#include #endif diff --git a/libyasm/valparam.c b/yasm/libyasm/valparam.c similarity index 98% rename from libyasm/valparam.c rename to yasm/libyasm/valparam.c index 92faf8e7..59ccfebb 100644 --- a/libyasm/valparam.c +++ b/yasm/libyasm/valparam.c @@ -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; diff --git a/libyasm/valparam.h b/yasm/libyasm/valparam.h similarity index 97% rename from libyasm/valparam.h rename to yasm/libyasm/valparam.h index 0d5a2620..34f282d3 100644 --- a/libyasm/valparam.h +++ b/yasm/libyasm/valparam.h @@ -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 diff --git a/libyasm/xmalloc.c b/yasm/libyasm/xmalloc.c similarity index 100% rename from libyasm/xmalloc.c rename to yasm/libyasm/xmalloc.c diff --git a/libyasm/xstrdup.c b/yasm/libyasm/xstrdup.c similarity index 100% rename from libyasm/xstrdup.c rename to yasm/libyasm/xstrdup.c diff --git a/m4/Makefile.am b/yasm/m4/Makefile.am similarity index 100% rename from m4/Makefile.am rename to yasm/m4/Makefile.am diff --git a/m4/codeset.m4 b/yasm/m4/codeset.m4 similarity index 100% rename from m4/codeset.m4 rename to yasm/m4/codeset.m4 diff --git a/m4/gettext.m4 b/yasm/m4/gettext.m4 similarity index 100% rename from m4/gettext.m4 rename to yasm/m4/gettext.m4 diff --git a/m4/glibc21.m4 b/yasm/m4/glibc21.m4 similarity index 100% rename from m4/glibc21.m4 rename to yasm/m4/glibc21.m4 diff --git a/m4/iconv.m4 b/yasm/m4/iconv.m4 similarity index 100% rename from m4/iconv.m4 rename to yasm/m4/iconv.m4 diff --git a/m4/intdiv0.m4 b/yasm/m4/intdiv0.m4 similarity index 100% rename from m4/intdiv0.m4 rename to yasm/m4/intdiv0.m4 diff --git a/m4/inttypes-pri.m4 b/yasm/m4/inttypes-pri.m4 similarity index 100% rename from m4/inttypes-pri.m4 rename to yasm/m4/inttypes-pri.m4 diff --git a/m4/inttypes.m4 b/yasm/m4/inttypes.m4 similarity index 100% rename from m4/inttypes.m4 rename to yasm/m4/inttypes.m4 diff --git a/m4/inttypes_h.m4 b/yasm/m4/inttypes_h.m4 similarity index 100% rename from m4/inttypes_h.m4 rename to yasm/m4/inttypes_h.m4 diff --git a/m4/isc-posix.m4 b/yasm/m4/isc-posix.m4 similarity index 100% rename from m4/isc-posix.m4 rename to yasm/m4/isc-posix.m4 diff --git a/m4/lcmessage.m4 b/yasm/m4/lcmessage.m4 similarity index 100% rename from m4/lcmessage.m4 rename to yasm/m4/lcmessage.m4 diff --git a/m4/lib-ld.m4 b/yasm/m4/lib-ld.m4 similarity index 100% rename from m4/lib-ld.m4 rename to yasm/m4/lib-ld.m4 diff --git a/m4/lib-link.m4 b/yasm/m4/lib-link.m4 similarity index 100% rename from m4/lib-link.m4 rename to yasm/m4/lib-link.m4 diff --git a/m4/lib-prefix.m4 b/yasm/m4/lib-prefix.m4 similarity index 100% rename from m4/lib-prefix.m4 rename to yasm/m4/lib-prefix.m4 diff --git a/m4/libtool.m4 b/yasm/m4/libtool.m4 similarity index 99% rename from m4/libtool.m4 rename to yasm/m4/libtool.m4 index 5de2188d..e6e50603 100644 --- a/m4/libtool.m4 +++ b/yasm/m4/libtool.m4 @@ -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 diff --git a/m4/longlong.m4 b/yasm/m4/longlong.m4 similarity index 100% rename from m4/longlong.m4 rename to yasm/m4/longlong.m4 diff --git a/m4/ltdl.m4 b/yasm/m4/ltdl.m4 similarity index 100% rename from m4/ltdl.m4 rename to yasm/m4/ltdl.m4 diff --git a/m4/progtest.m4 b/yasm/m4/progtest.m4 similarity index 100% rename from m4/progtest.m4 rename to yasm/m4/progtest.m4 diff --git a/m4/stdint_h.m4 b/yasm/m4/stdint_h.m4 similarity index 100% rename from m4/stdint_h.m4 rename to yasm/m4/stdint_h.m4 diff --git a/m4/uintmax_t.m4 b/yasm/m4/uintmax_t.m4 similarity index 100% rename from m4/uintmax_t.m4 rename to yasm/m4/uintmax_t.m4 diff --git a/modules/Makefile.inc b/yasm/modules/Makefile.inc similarity index 100% rename from modules/Makefile.inc rename to yasm/modules/Makefile.inc diff --git a/modules/arch/Makefile.inc b/yasm/modules/arch/Makefile.inc similarity index 100% rename from modules/arch/Makefile.inc rename to yasm/modules/arch/Makefile.inc diff --git a/modules/arch/x86/Makefile.inc b/yasm/modules/arch/x86/Makefile.inc similarity index 91% rename from modules/arch/x86/Makefile.inc rename to yasm/modules/arch/x86/Makefile.inc index 5e5be8f8..bee5f93b 100644 --- a/modules/arch/x86/Makefile.inc +++ b/yasm/modules/arch/x86/Makefile.inc @@ -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 diff --git a/modules/arch/x86/README b/yasm/modules/arch/x86/README similarity index 100% rename from modules/arch/x86/README rename to yasm/modules/arch/x86/README diff --git a/modules/arch/x86/tests/Makefile.inc b/yasm/modules/arch/x86/tests/Makefile.inc similarity index 100% rename from modules/arch/x86/tests/Makefile.inc rename to yasm/modules/arch/x86/tests/Makefile.inc diff --git a/modules/arch/x86/tests/addbyte.asm b/yasm/modules/arch/x86/tests/addbyte.asm similarity index 100% rename from modules/arch/x86/tests/addbyte.asm rename to yasm/modules/arch/x86/tests/addbyte.asm diff --git a/modules/arch/x86/tests/addbyte.errwarn b/yasm/modules/arch/x86/tests/addbyte.errwarn similarity index 100% rename from modules/arch/x86/tests/addbyte.errwarn rename to yasm/modules/arch/x86/tests/addbyte.errwarn diff --git a/modules/arch/x86/tests/addbyte.hex b/yasm/modules/arch/x86/tests/addbyte.hex similarity index 100% rename from modules/arch/x86/tests/addbyte.hex rename to yasm/modules/arch/x86/tests/addbyte.hex diff --git a/modules/arch/x86/tests/addrop-err.asm b/yasm/modules/arch/x86/tests/addrop-err.asm similarity index 100% rename from modules/arch/x86/tests/addrop-err.asm rename to yasm/modules/arch/x86/tests/addrop-err.asm diff --git a/modules/arch/x86/tests/addrop-err.errwarn b/yasm/modules/arch/x86/tests/addrop-err.errwarn similarity index 100% rename from modules/arch/x86/tests/addrop-err.errwarn rename to yasm/modules/arch/x86/tests/addrop-err.errwarn diff --git a/modules/arch/x86/tests/addrop.asm b/yasm/modules/arch/x86/tests/addrop.asm similarity index 100% rename from modules/arch/x86/tests/addrop.asm rename to yasm/modules/arch/x86/tests/addrop.asm diff --git a/modules/arch/x86/tests/addrop.errwarn b/yasm/modules/arch/x86/tests/addrop.errwarn similarity index 100% rename from modules/arch/x86/tests/addrop.errwarn rename to yasm/modules/arch/x86/tests/addrop.errwarn diff --git a/modules/arch/x86/tests/addrop.hex b/yasm/modules/arch/x86/tests/addrop.hex similarity index 100% rename from modules/arch/x86/tests/addrop.hex rename to yasm/modules/arch/x86/tests/addrop.hex diff --git a/modules/arch/x86/tests/cpubasic-err.asm b/yasm/modules/arch/x86/tests/cpubasic-err.asm similarity index 100% rename from modules/arch/x86/tests/cpubasic-err.asm rename to yasm/modules/arch/x86/tests/cpubasic-err.asm diff --git a/modules/arch/x86/tests/cpubasic-err.errwarn b/yasm/modules/arch/x86/tests/cpubasic-err.errwarn similarity index 100% rename from modules/arch/x86/tests/cpubasic-err.errwarn rename to yasm/modules/arch/x86/tests/cpubasic-err.errwarn diff --git a/modules/arch/x86/tests/div-err.asm b/yasm/modules/arch/x86/tests/div-err.asm similarity index 100% rename from modules/arch/x86/tests/div-err.asm rename to yasm/modules/arch/x86/tests/div-err.asm diff --git a/modules/arch/x86/tests/div-err.errwarn b/yasm/modules/arch/x86/tests/div-err.errwarn similarity index 100% rename from modules/arch/x86/tests/div-err.errwarn rename to yasm/modules/arch/x86/tests/div-err.errwarn diff --git a/modules/arch/x86/tests/effaddr.asm b/yasm/modules/arch/x86/tests/effaddr.asm similarity index 100% rename from modules/arch/x86/tests/effaddr.asm rename to yasm/modules/arch/x86/tests/effaddr.asm diff --git a/modules/arch/x86/tests/effaddr.errwarn b/yasm/modules/arch/x86/tests/effaddr.errwarn similarity index 100% rename from modules/arch/x86/tests/effaddr.errwarn rename to yasm/modules/arch/x86/tests/effaddr.errwarn diff --git a/modules/arch/x86/tests/effaddr.hex b/yasm/modules/arch/x86/tests/effaddr.hex similarity index 100% rename from modules/arch/x86/tests/effaddr.hex rename to yasm/modules/arch/x86/tests/effaddr.hex diff --git a/modules/arch/x86/tests/genopcode.asm b/yasm/modules/arch/x86/tests/genopcode.asm similarity index 100% rename from modules/arch/x86/tests/genopcode.asm rename to yasm/modules/arch/x86/tests/genopcode.asm diff --git a/modules/arch/x86/tests/genopcode.errwarn b/yasm/modules/arch/x86/tests/genopcode.errwarn similarity index 100% rename from modules/arch/x86/tests/genopcode.errwarn rename to yasm/modules/arch/x86/tests/genopcode.errwarn diff --git a/modules/arch/x86/tests/genopcode.hex b/yasm/modules/arch/x86/tests/genopcode.hex similarity index 100% rename from modules/arch/x86/tests/genopcode.hex rename to yasm/modules/arch/x86/tests/genopcode.hex diff --git a/modules/arch/x86/tests/lds-err.asm b/yasm/modules/arch/x86/tests/lds-err.asm similarity index 100% rename from modules/arch/x86/tests/lds-err.asm rename to yasm/modules/arch/x86/tests/lds-err.asm diff --git a/modules/arch/x86/tests/lds-err.errwarn b/yasm/modules/arch/x86/tests/lds-err.errwarn similarity index 100% rename from modules/arch/x86/tests/lds-err.errwarn rename to yasm/modules/arch/x86/tests/lds-err.errwarn diff --git a/modules/arch/x86/tests/loopadsz.asm b/yasm/modules/arch/x86/tests/loopadsz.asm similarity index 100% rename from modules/arch/x86/tests/loopadsz.asm rename to yasm/modules/arch/x86/tests/loopadsz.asm diff --git a/modules/arch/x86/tests/loopadsz.errwarn b/yasm/modules/arch/x86/tests/loopadsz.errwarn similarity index 100% rename from modules/arch/x86/tests/loopadsz.errwarn rename to yasm/modules/arch/x86/tests/loopadsz.errwarn diff --git a/modules/arch/x86/tests/loopadsz.hex b/yasm/modules/arch/x86/tests/loopadsz.hex similarity index 100% rename from modules/arch/x86/tests/loopadsz.hex rename to yasm/modules/arch/x86/tests/loopadsz.hex diff --git a/modules/arch/x86/tests/mem64-err.asm b/yasm/modules/arch/x86/tests/mem64-err.asm similarity index 100% rename from modules/arch/x86/tests/mem64-err.asm rename to yasm/modules/arch/x86/tests/mem64-err.asm diff --git a/modules/arch/x86/tests/mem64-err.errwarn b/yasm/modules/arch/x86/tests/mem64-err.errwarn similarity index 100% rename from modules/arch/x86/tests/mem64-err.errwarn rename to yasm/modules/arch/x86/tests/mem64-err.errwarn diff --git a/modules/arch/x86/tests/mem64.asm b/yasm/modules/arch/x86/tests/mem64.asm similarity index 100% rename from modules/arch/x86/tests/mem64.asm rename to yasm/modules/arch/x86/tests/mem64.asm diff --git a/modules/arch/x86/tests/mem64.errwarn b/yasm/modules/arch/x86/tests/mem64.errwarn similarity index 100% rename from modules/arch/x86/tests/mem64.errwarn rename to yasm/modules/arch/x86/tests/mem64.errwarn diff --git a/modules/arch/x86/tests/mem64.hex b/yasm/modules/arch/x86/tests/mem64.hex similarity index 100% rename from modules/arch/x86/tests/mem64.hex rename to yasm/modules/arch/x86/tests/mem64.hex diff --git a/modules/arch/x86/tests/negequ.asm b/yasm/modules/arch/x86/tests/negequ.asm similarity index 100% rename from modules/arch/x86/tests/negequ.asm rename to yasm/modules/arch/x86/tests/negequ.asm diff --git a/modules/arch/x86/tests/negequ.errwarn b/yasm/modules/arch/x86/tests/negequ.errwarn similarity index 100% rename from modules/arch/x86/tests/negequ.errwarn rename to yasm/modules/arch/x86/tests/negequ.errwarn diff --git a/modules/arch/x86/tests/negequ.hex b/yasm/modules/arch/x86/tests/negequ.hex similarity index 100% rename from modules/arch/x86/tests/negequ.hex rename to yasm/modules/arch/x86/tests/negequ.hex diff --git a/modules/arch/x86/tests/nomem64-err.asm b/yasm/modules/arch/x86/tests/nomem64-err.asm similarity index 100% rename from modules/arch/x86/tests/nomem64-err.asm rename to yasm/modules/arch/x86/tests/nomem64-err.asm diff --git a/modules/arch/x86/tests/nomem64-err.errwarn b/yasm/modules/arch/x86/tests/nomem64-err.errwarn similarity index 100% rename from modules/arch/x86/tests/nomem64-err.errwarn rename to yasm/modules/arch/x86/tests/nomem64-err.errwarn diff --git a/modules/arch/x86/tests/nomem64.asm b/yasm/modules/arch/x86/tests/nomem64.asm similarity index 100% rename from modules/arch/x86/tests/nomem64.asm rename to yasm/modules/arch/x86/tests/nomem64.asm diff --git a/modules/arch/x86/tests/nomem64.errwarn b/yasm/modules/arch/x86/tests/nomem64.errwarn similarity index 100% rename from modules/arch/x86/tests/nomem64.errwarn rename to yasm/modules/arch/x86/tests/nomem64.errwarn diff --git a/modules/arch/x86/tests/nomem64.hex b/yasm/modules/arch/x86/tests/nomem64.hex similarity index 100% rename from modules/arch/x86/tests/nomem64.hex rename to yasm/modules/arch/x86/tests/nomem64.hex diff --git a/modules/arch/x86/tests/opersize.asm b/yasm/modules/arch/x86/tests/opersize.asm similarity index 100% rename from modules/arch/x86/tests/opersize.asm rename to yasm/modules/arch/x86/tests/opersize.asm diff --git a/modules/arch/x86/tests/opersize.errwarn b/yasm/modules/arch/x86/tests/opersize.errwarn similarity index 100% rename from modules/arch/x86/tests/opersize.errwarn rename to yasm/modules/arch/x86/tests/opersize.errwarn diff --git a/modules/arch/x86/tests/opersize.hex b/yasm/modules/arch/x86/tests/opersize.hex similarity index 100% rename from modules/arch/x86/tests/opersize.hex rename to yasm/modules/arch/x86/tests/opersize.hex diff --git a/modules/arch/x86/tests/opsize-err.asm b/yasm/modules/arch/x86/tests/opsize-err.asm similarity index 100% rename from modules/arch/x86/tests/opsize-err.asm rename to yasm/modules/arch/x86/tests/opsize-err.asm diff --git a/modules/arch/x86/tests/opsize-err.errwarn b/yasm/modules/arch/x86/tests/opsize-err.errwarn similarity index 100% rename from modules/arch/x86/tests/opsize-err.errwarn rename to yasm/modules/arch/x86/tests/opsize-err.errwarn diff --git a/modules/arch/x86/tests/ret.asm b/yasm/modules/arch/x86/tests/ret.asm similarity index 100% rename from modules/arch/x86/tests/ret.asm rename to yasm/modules/arch/x86/tests/ret.asm diff --git a/modules/arch/x86/tests/ret.errwarn b/yasm/modules/arch/x86/tests/ret.errwarn similarity index 100% rename from modules/arch/x86/tests/ret.errwarn rename to yasm/modules/arch/x86/tests/ret.errwarn diff --git a/modules/arch/x86/tests/ret.hex b/yasm/modules/arch/x86/tests/ret.hex similarity index 100% rename from modules/arch/x86/tests/ret.hex rename to yasm/modules/arch/x86/tests/ret.hex diff --git a/modules/arch/x86/tests/segmov.asm b/yasm/modules/arch/x86/tests/segmov.asm similarity index 100% rename from modules/arch/x86/tests/segmov.asm rename to yasm/modules/arch/x86/tests/segmov.asm diff --git a/modules/arch/x86/tests/segmov.errwarn b/yasm/modules/arch/x86/tests/segmov.errwarn similarity index 100% rename from modules/arch/x86/tests/segmov.errwarn rename to yasm/modules/arch/x86/tests/segmov.errwarn diff --git a/modules/arch/x86/tests/segmov.hex b/yasm/modules/arch/x86/tests/segmov.hex similarity index 100% rename from modules/arch/x86/tests/segmov.hex rename to yasm/modules/arch/x86/tests/segmov.hex diff --git a/modules/arch/x86/tests/shift.asm b/yasm/modules/arch/x86/tests/shift.asm similarity index 100% rename from modules/arch/x86/tests/shift.asm rename to yasm/modules/arch/x86/tests/shift.asm diff --git a/modules/arch/x86/tests/shift.errwarn b/yasm/modules/arch/x86/tests/shift.errwarn similarity index 100% rename from modules/arch/x86/tests/shift.errwarn rename to yasm/modules/arch/x86/tests/shift.errwarn diff --git a/modules/arch/x86/tests/shift.hex b/yasm/modules/arch/x86/tests/shift.hex similarity index 100% rename from modules/arch/x86/tests/shift.hex rename to yasm/modules/arch/x86/tests/shift.hex diff --git a/modules/arch/x86/tests/x86_test.sh b/yasm/modules/arch/x86/tests/x86_test.sh similarity index 100% rename from modules/arch/x86/tests/x86_test.sh rename to yasm/modules/arch/x86/tests/x86_test.sh diff --git a/modules/arch/x86/tests/x86label.asm b/yasm/modules/arch/x86/tests/x86label.asm similarity index 100% rename from modules/arch/x86/tests/x86label.asm rename to yasm/modules/arch/x86/tests/x86label.asm diff --git a/modules/arch/x86/tests/x86label.errwarn b/yasm/modules/arch/x86/tests/x86label.errwarn similarity index 100% rename from modules/arch/x86/tests/x86label.errwarn rename to yasm/modules/arch/x86/tests/x86label.errwarn diff --git a/modules/arch/x86/tests/x86label.hex b/yasm/modules/arch/x86/tests/x86label.hex similarity index 100% rename from modules/arch/x86/tests/x86label.hex rename to yasm/modules/arch/x86/tests/x86label.hex diff --git a/modules/arch/x86/x86arch.c b/yasm/modules/arch/x86/x86arch.c similarity index 94% rename from modules/arch/x86/x86arch.c rename to yasm/modules/arch/x86/x86arch.c index 5441b279..138a8caf 100644 --- a/modules/arch/x86/x86arch.c +++ b/yasm/modules/arch/x86/x86arch.c @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@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; } } diff --git a/modules/arch/x86/x86arch.h b/yasm/modules/arch/x86/x86arch.h similarity index 94% rename from modules/arch/x86/x86arch.h rename to yasm/modules/arch/x86/x86arch.h index 26cf2fb7..ec974693 100644 --- a/modules/arch/x86/x86arch.h +++ b/yasm/modules/arch/x86/x86arch.h @@ -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); diff --git a/modules/arch/x86/x86bc.c b/yasm/modules/arch/x86/x86bc.c similarity index 96% rename from modules/arch/x86/x86bc.c rename to yasm/modules/arch/x86/x86bc.c index fd4cf461..ff78ba0e 100644 --- a/modules/arch/x86/x86bc.c +++ b/yasm/modules/arch/x86/x86bc.c @@ -26,7 +26,7 @@ */ #define YASM_LIB_INTERNAL #define YASM_BC_INTERNAL -#include "libyasm.h" +#include /*@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; diff --git a/modules/arch/x86/x86expr.c b/yasm/modules/arch/x86/x86expr.c similarity index 97% rename from modules/arch/x86/x86expr.c rename to yasm/modules/arch/x86/x86expr.c index 972ff953..1cd0a275 100644 --- a/modules/arch/x86/x86expr.c +++ b/yasm/modules/arch/x86/x86expr.c @@ -26,7 +26,7 @@ */ #define YASM_LIB_INTERNAL #define YASM_EXPR_INTERNAL -#include "libyasm.h" +#include /*@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")); diff --git a/modules/arch/x86/x86id.re b/yasm/modules/arch/x86/x86id.re similarity index 99% rename from modules/arch/x86/x86id.re rename to yasm/modules/arch/x86/x86id.re index 37d55564..d7a8bc74 100644 --- a/modules/arch/x86/x86id.re +++ b/yasm/modules/arch/x86/x86id.re @@ -27,7 +27,7 @@ #define YASM_LIB_INTERNAL #define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL -#include "libyasm.h" +#include 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 && inum_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 && inum_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); } diff --git a/modules/dbgfmts/Makefile.inc b/yasm/modules/dbgfmts/Makefile.inc similarity index 100% rename from modules/dbgfmts/Makefile.inc rename to yasm/modules/dbgfmts/Makefile.inc diff --git a/modules/dbgfmts/null/Makefile.inc b/yasm/modules/dbgfmts/null/Makefile.inc similarity index 100% rename from modules/dbgfmts/null/Makefile.inc rename to yasm/modules/dbgfmts/null/Makefile.inc diff --git a/modules/dbgfmts/null/null-dbgfmt.c b/yasm/modules/dbgfmts/null/null-dbgfmt.c similarity index 91% rename from modules/dbgfmts/null/null-dbgfmt.c rename to yasm/modules/dbgfmts/null/null-dbgfmt.c index 8cc9617f..a3b6b9b3 100644 --- a/modules/dbgfmts/null/null-dbgfmt.c +++ b/yasm/modules/dbgfmts/null/null-dbgfmt.c @@ -25,14 +25,15 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@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*/ }; diff --git a/modules/objfmts/Makefile.inc b/yasm/modules/objfmts/Makefile.inc similarity index 65% rename from modules/objfmts/Makefile.inc rename to yasm/modules/objfmts/Makefile.inc index dc191c0f..82c45658 100644 --- a/modules/objfmts/Makefile.inc +++ b/yasm/modules/objfmts/Makefile.inc @@ -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 diff --git a/modules/objfmts/bin/Makefile.inc b/yasm/modules/objfmts/bin/Makefile.inc similarity index 100% rename from modules/objfmts/bin/Makefile.inc rename to yasm/modules/objfmts/bin/Makefile.inc diff --git a/modules/objfmts/bin/bin-objfmt.c b/yasm/modules/objfmts/bin/bin-objfmt.c similarity index 99% rename from modules/objfmts/bin/bin-objfmt.c rename to yasm/modules/objfmts/bin/bin-objfmt.c index adb9e307..23d57b7f 100644 --- a/modules/objfmts/bin/bin-objfmt.c +++ b/yasm/modules/objfmts/bin/bin-objfmt.c @@ -27,7 +27,7 @@ #define YASM_LIB_INTERNAL #define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL -#include "libyasm.h" +#include /*@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; diff --git a/modules/objfmts/bin/tests/Makefile.inc b/yasm/modules/objfmts/bin/tests/Makefile.inc similarity index 100% rename from modules/objfmts/bin/tests/Makefile.inc rename to yasm/modules/objfmts/bin/tests/Makefile.inc diff --git a/modules/objfmts/bin/tests/abs.asm b/yasm/modules/objfmts/bin/tests/abs.asm similarity index 100% rename from modules/objfmts/bin/tests/abs.asm rename to yasm/modules/objfmts/bin/tests/abs.asm diff --git a/modules/objfmts/bin/tests/abs.errwarn b/yasm/modules/objfmts/bin/tests/abs.errwarn similarity index 100% rename from modules/objfmts/bin/tests/abs.errwarn rename to yasm/modules/objfmts/bin/tests/abs.errwarn diff --git a/modules/objfmts/bin/tests/abs.hex b/yasm/modules/objfmts/bin/tests/abs.hex similarity index 100% rename from modules/objfmts/bin/tests/abs.hex rename to yasm/modules/objfmts/bin/tests/abs.hex diff --git a/modules/objfmts/bin/tests/bin_test.sh b/yasm/modules/objfmts/bin/tests/bin_test.sh similarity index 100% rename from modules/objfmts/bin/tests/bin_test.sh rename to yasm/modules/objfmts/bin/tests/bin_test.sh diff --git a/modules/objfmts/bin/tests/bintest.asm b/yasm/modules/objfmts/bin/tests/bintest.asm similarity index 100% rename from modules/objfmts/bin/tests/bintest.asm rename to yasm/modules/objfmts/bin/tests/bintest.asm diff --git a/modules/objfmts/bin/tests/bintest.errwarn b/yasm/modules/objfmts/bin/tests/bintest.errwarn similarity index 100% rename from modules/objfmts/bin/tests/bintest.errwarn rename to yasm/modules/objfmts/bin/tests/bintest.errwarn diff --git a/modules/objfmts/bin/tests/bintest.hex b/yasm/modules/objfmts/bin/tests/bintest.hex similarity index 100% rename from modules/objfmts/bin/tests/bintest.hex rename to yasm/modules/objfmts/bin/tests/bintest.hex diff --git a/modules/objfmts/bin/tests/float-err.asm b/yasm/modules/objfmts/bin/tests/float-err.asm similarity index 100% rename from modules/objfmts/bin/tests/float-err.asm rename to yasm/modules/objfmts/bin/tests/float-err.asm diff --git a/modules/objfmts/bin/tests/float-err.errwarn b/yasm/modules/objfmts/bin/tests/float-err.errwarn similarity index 100% rename from modules/objfmts/bin/tests/float-err.errwarn rename to yasm/modules/objfmts/bin/tests/float-err.errwarn diff --git a/modules/objfmts/bin/tests/float.asm b/yasm/modules/objfmts/bin/tests/float.asm similarity index 100% rename from modules/objfmts/bin/tests/float.asm rename to yasm/modules/objfmts/bin/tests/float.asm diff --git a/modules/objfmts/bin/tests/float.errwarn b/yasm/modules/objfmts/bin/tests/float.errwarn similarity index 100% rename from modules/objfmts/bin/tests/float.errwarn rename to yasm/modules/objfmts/bin/tests/float.errwarn diff --git a/modules/objfmts/bin/tests/float.hex b/yasm/modules/objfmts/bin/tests/float.hex similarity index 100% rename from modules/objfmts/bin/tests/float.hex rename to yasm/modules/objfmts/bin/tests/float.hex diff --git a/modules/objfmts/bin/tests/integer-warn.asm b/yasm/modules/objfmts/bin/tests/integer-warn.asm similarity index 100% rename from modules/objfmts/bin/tests/integer-warn.asm rename to yasm/modules/objfmts/bin/tests/integer-warn.asm diff --git a/modules/objfmts/bin/tests/integer-warn.errwarn b/yasm/modules/objfmts/bin/tests/integer-warn.errwarn similarity index 100% rename from modules/objfmts/bin/tests/integer-warn.errwarn rename to yasm/modules/objfmts/bin/tests/integer-warn.errwarn diff --git a/modules/objfmts/bin/tests/integer-warn.hex b/yasm/modules/objfmts/bin/tests/integer-warn.hex similarity index 100% rename from modules/objfmts/bin/tests/integer-warn.hex rename to yasm/modules/objfmts/bin/tests/integer-warn.hex diff --git a/modules/objfmts/bin/tests/integer.asm b/yasm/modules/objfmts/bin/tests/integer.asm similarity index 100% rename from modules/objfmts/bin/tests/integer.asm rename to yasm/modules/objfmts/bin/tests/integer.asm diff --git a/modules/objfmts/bin/tests/integer.errwarn b/yasm/modules/objfmts/bin/tests/integer.errwarn similarity index 100% rename from modules/objfmts/bin/tests/integer.errwarn rename to yasm/modules/objfmts/bin/tests/integer.errwarn diff --git a/modules/objfmts/bin/tests/integer.hex b/yasm/modules/objfmts/bin/tests/integer.hex similarity index 100% rename from modules/objfmts/bin/tests/integer.hex rename to yasm/modules/objfmts/bin/tests/integer.hex diff --git a/modules/objfmts/bin/tests/reserve-err.asm b/yasm/modules/objfmts/bin/tests/reserve-err.asm similarity index 100% rename from modules/objfmts/bin/tests/reserve-err.asm rename to yasm/modules/objfmts/bin/tests/reserve-err.asm diff --git a/modules/objfmts/bin/tests/reserve-err.errwarn b/yasm/modules/objfmts/bin/tests/reserve-err.errwarn similarity index 100% rename from modules/objfmts/bin/tests/reserve-err.errwarn rename to yasm/modules/objfmts/bin/tests/reserve-err.errwarn diff --git a/modules/objfmts/bin/tests/reserve.asm b/yasm/modules/objfmts/bin/tests/reserve.asm similarity index 100% rename from modules/objfmts/bin/tests/reserve.asm rename to yasm/modules/objfmts/bin/tests/reserve.asm diff --git a/modules/objfmts/bin/tests/reserve.errwarn b/yasm/modules/objfmts/bin/tests/reserve.errwarn similarity index 100% rename from modules/objfmts/bin/tests/reserve.errwarn rename to yasm/modules/objfmts/bin/tests/reserve.errwarn diff --git a/modules/objfmts/bin/tests/reserve.hex b/yasm/modules/objfmts/bin/tests/reserve.hex similarity index 100% rename from modules/objfmts/bin/tests/reserve.hex rename to yasm/modules/objfmts/bin/tests/reserve.hex diff --git a/modules/objfmts/coff/Makefile.inc b/yasm/modules/objfmts/coff/Makefile.inc similarity index 100% rename from modules/objfmts/coff/Makefile.inc rename to yasm/modules/objfmts/coff/Makefile.inc diff --git a/modules/objfmts/coff/coff-objfmt.c b/yasm/modules/objfmts/coff/coff-objfmt.c similarity index 74% rename from modules/objfmts/coff/coff-objfmt.c rename to yasm/modules/objfmts/coff/coff-objfmt.c index cc26ca43..2095a4d6 100644 --- a/modules/objfmts/coff/coff-objfmt.c +++ b/yasm/modules/objfmts/coff/coff-objfmt.c @@ -27,7 +27,7 @@ #define YASM_LIB_INTERNAL #define YASM_BC_INTERNAL #define YASM_EXPR_INTERNAL -#include "libyasm.h" +#include /*@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<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; ival, 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<>= 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*/ +}; diff --git a/modules/objfmts/coff/tests/Makefile.inc b/yasm/modules/objfmts/coff/tests/Makefile.inc similarity index 100% rename from modules/objfmts/coff/tests/Makefile.inc rename to yasm/modules/objfmts/coff/tests/Makefile.inc diff --git a/modules/objfmts/coff/tests/coff_test.sh b/yasm/modules/objfmts/coff/tests/coff_test.sh similarity index 100% rename from modules/objfmts/coff/tests/coff_test.sh rename to yasm/modules/objfmts/coff/tests/coff_test.sh diff --git a/modules/objfmts/coff/tests/cofftest.asm b/yasm/modules/objfmts/coff/tests/cofftest.asm similarity index 100% rename from modules/objfmts/coff/tests/cofftest.asm rename to yasm/modules/objfmts/coff/tests/cofftest.asm diff --git a/modules/objfmts/coff/tests/cofftest.c b/yasm/modules/objfmts/coff/tests/cofftest.c similarity index 100% rename from modules/objfmts/coff/tests/cofftest.c rename to yasm/modules/objfmts/coff/tests/cofftest.c diff --git a/modules/objfmts/coff/tests/cofftest.errwarn b/yasm/modules/objfmts/coff/tests/cofftest.errwarn similarity index 100% rename from modules/objfmts/coff/tests/cofftest.errwarn rename to yasm/modules/objfmts/coff/tests/cofftest.errwarn diff --git a/modules/objfmts/coff/tests/cofftest.hex b/yasm/modules/objfmts/coff/tests/cofftest.hex similarity index 100% rename from modules/objfmts/coff/tests/cofftest.hex rename to yasm/modules/objfmts/coff/tests/cofftest.hex diff --git a/modules/objfmts/dbg/Makefile.inc b/yasm/modules/objfmts/dbg/Makefile.inc similarity index 100% rename from modules/objfmts/dbg/Makefile.inc rename to yasm/modules/objfmts/dbg/Makefile.inc diff --git a/modules/objfmts/dbg/dbg-objfmt.c b/yasm/modules/objfmts/dbg/dbg-objfmt.c similarity index 98% rename from modules/objfmts/dbg/dbg-objfmt.c rename to yasm/modules/objfmts/dbg/dbg-objfmt.c index 2cc1c13a..dbdf5a32 100644 --- a/modules/objfmts/dbg/dbg-objfmt.c +++ b/yasm/modules/objfmts/dbg/dbg-objfmt.c @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@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 index 00000000..4a830de0 --- /dev/null +++ b/yasm/modules/objfmts/elf/elf32.c @@ -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; ie_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); +} diff --git a/modules/objfmts/elf/elf32.h b/yasm/modules/objfmts/elf/elf32.h similarity index 94% rename from modules/objfmts/elf/elf32.h rename to yasm/modules/objfmts/elf/elf32.h index 2e80f84d..bacb6613 100644 --- a/modules/objfmts/elf/elf32.h +++ b/yasm/modules/objfmts/elf/elf32.h @@ -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/modules/objfmts/elf/elf_common.h b/yasm/modules/objfmts/elf/elf_common.h similarity index 100% rename from modules/objfmts/elf/elf_common.h rename to yasm/modules/objfmts/elf/elf_common.h diff --git a/yasm/modules/objfmts/win32/Makefile.inc b/yasm/modules/objfmts/win32/Makefile.inc new file mode 100644 index 00000000..8cc8aadc --- /dev/null +++ b/yasm/modules/objfmts/win32/Makefile.inc @@ -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 index 00000000..5e66fc71 --- /dev/null +++ b/yasm/modules/objfmts/win32/tests/Makefile.inc @@ -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 index 00000000..8fe28557 --- /dev/null +++ b/yasm/modules/objfmts/win32/tests/win32_test.sh @@ -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 index 00000000..17b93f9e --- /dev/null +++ b/yasm/modules/objfmts/win32/tests/win32test.asm @@ -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 index 00000000..f7446b8a --- /dev/null +++ b/yasm/modules/objfmts/win32/tests/win32test.c @@ -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 + +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/modules/parsers/nasm/tests/equlocal.errwarn b/yasm/modules/objfmts/win32/tests/win32test.errwarn similarity index 100% rename from modules/parsers/nasm/tests/equlocal.errwarn rename to yasm/modules/objfmts/win32/tests/win32test.errwarn diff --git a/yasm/modules/objfmts/win32/tests/win32test.hex b/yasm/modules/objfmts/win32/tests/win32test.hex new file mode 100644 index 00000000..3697acb6 --- /dev/null +++ b/yasm/modules/objfmts/win32/tests/win32test.hex @@ -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 diff --git a/modules/optimizers/Makefile.inc b/yasm/modules/optimizers/Makefile.inc similarity index 100% rename from modules/optimizers/Makefile.inc rename to yasm/modules/optimizers/Makefile.inc diff --git a/modules/optimizers/basic/Makefile.inc b/yasm/modules/optimizers/basic/Makefile.inc similarity index 100% rename from modules/optimizers/basic/Makefile.inc rename to yasm/modules/optimizers/basic/Makefile.inc diff --git a/modules/optimizers/basic/basic-optimizer.c b/yasm/modules/optimizers/basic/basic-optimizer.c similarity index 99% rename from modules/optimizers/basic/basic-optimizer.c rename to yasm/modules/optimizers/basic/basic-optimizer.c index fea7f8fc..ff47e175 100644 --- a/modules/optimizers/basic/basic-optimizer.c +++ b/yasm/modules/optimizers/basic/basic-optimizer.c @@ -26,7 +26,7 @@ */ #define YASM_LIB_INTERNAL #define YASM_BC_INTERNAL -#include "libyasm.h" +#include /*@unused@*/ RCSID("$IdPath$"); diff --git a/modules/parsers/Makefile.inc b/yasm/modules/parsers/Makefile.inc similarity index 100% rename from modules/parsers/Makefile.inc rename to yasm/modules/parsers/Makefile.inc diff --git a/modules/parsers/nasm/Makefile.inc b/yasm/modules/parsers/nasm/Makefile.inc similarity index 100% rename from modules/parsers/nasm/Makefile.inc rename to yasm/modules/parsers/nasm/Makefile.inc diff --git a/modules/parsers/nasm/nasm-bison.y b/yasm/modules/parsers/nasm/nasm-bison.y similarity index 99% rename from modules/parsers/nasm/nasm-bison.y rename to yasm/modules/parsers/nasm/nasm-bison.y index 3032d501..0e0203de 100644 --- a/modules/parsers/nasm/nasm-bison.y +++ b/yasm/modules/parsers/nasm/nasm-bison.y @@ -27,7 +27,7 @@ %{ #define YASM_LIB_INTERNAL #define YASM_EXPR_INTERNAL -#include "libyasm.h" +#include RCSID("$IdPath$"); #ifdef STDC_HEADERS diff --git a/modules/parsers/nasm/nasm-defs.h b/yasm/modules/parsers/nasm/nasm-defs.h similarity index 100% rename from modules/parsers/nasm/nasm-defs.h rename to yasm/modules/parsers/nasm/nasm-defs.h diff --git a/modules/parsers/nasm/nasm-parser.c b/yasm/modules/parsers/nasm/nasm-parser.c similarity index 98% rename from modules/parsers/nasm/nasm-parser.c rename to yasm/modules/parsers/nasm/nasm-parser.c index 5f8edece..a9796abe 100644 --- a/modules/parsers/nasm/nasm-parser.c +++ b/yasm/modules/parsers/nasm/nasm-parser.c @@ -25,7 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include /*@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 }; diff --git a/modules/parsers/nasm/nasm-parser.h b/yasm/modules/parsers/nasm/nasm-parser.h similarity index 100% rename from modules/parsers/nasm/nasm-parser.h rename to yasm/modules/parsers/nasm/nasm-parser.h diff --git a/modules/parsers/nasm/nasm-token.re b/yasm/modules/parsers/nasm/nasm-token.re similarity index 98% rename from modules/parsers/nasm/nasm-token.re rename to yasm/modules/parsers/nasm/nasm-token.re index 854ecc06..50b1bedc 100644 --- a/modules/parsers/nasm/nasm-token.re +++ b/yasm/modules/parsers/nasm/nasm-token.re @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #define YASM_LIB_INTERNAL -#include "libyasm.h" +#include 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]; diff --git a/modules/parsers/nasm/tests/Makefile.inc b/yasm/modules/parsers/nasm/tests/Makefile.inc similarity index 100% rename from modules/parsers/nasm/tests/Makefile.inc rename to yasm/modules/parsers/nasm/tests/Makefile.inc diff --git a/modules/parsers/nasm/tests/equlocal.asm b/yasm/modules/parsers/nasm/tests/equlocal.asm similarity index 100% rename from modules/parsers/nasm/tests/equlocal.asm rename to yasm/modules/parsers/nasm/tests/equlocal.asm diff --git a/modules/parsers/nasm/tests/newsect.errwarn b/yasm/modules/parsers/nasm/tests/equlocal.errwarn similarity index 100% rename from modules/parsers/nasm/tests/newsect.errwarn rename to yasm/modules/parsers/nasm/tests/equlocal.errwarn diff --git a/modules/parsers/nasm/tests/equlocal.hex b/yasm/modules/parsers/nasm/tests/equlocal.hex similarity index 100% rename from modules/parsers/nasm/tests/equlocal.hex rename to yasm/modules/parsers/nasm/tests/equlocal.hex diff --git a/modules/parsers/nasm/tests/nasm_test.sh b/yasm/modules/parsers/nasm/tests/nasm_test.sh similarity index 100% rename from modules/parsers/nasm/tests/nasm_test.sh rename to yasm/modules/parsers/nasm/tests/nasm_test.sh diff --git a/modules/parsers/nasm/tests/newsect.asm b/yasm/modules/parsers/nasm/tests/newsect.asm similarity index 100% rename from modules/parsers/nasm/tests/newsect.asm rename to yasm/modules/parsers/nasm/tests/newsect.asm diff --git a/po/ChangeLog b/yasm/modules/parsers/nasm/tests/newsect.errwarn similarity index 100% rename from po/ChangeLog rename to yasm/modules/parsers/nasm/tests/newsect.errwarn diff --git a/modules/parsers/nasm/tests/newsect.hex b/yasm/modules/parsers/nasm/tests/newsect.hex similarity index 100% rename from modules/parsers/nasm/tests/newsect.hex rename to yasm/modules/parsers/nasm/tests/newsect.hex diff --git a/modules/preprocs/Makefile.inc b/yasm/modules/preprocs/Makefile.inc similarity index 100% rename from modules/preprocs/Makefile.inc rename to yasm/modules/preprocs/Makefile.inc diff --git a/modules/preprocs/nasm/Makefile.inc b/yasm/modules/preprocs/nasm/Makefile.inc similarity index 100% rename from modules/preprocs/nasm/Makefile.inc rename to yasm/modules/preprocs/nasm/Makefile.inc diff --git a/modules/preprocs/nasm/macros.pl b/yasm/modules/preprocs/nasm/macros.pl similarity index 100% rename from modules/preprocs/nasm/macros.pl rename to yasm/modules/preprocs/nasm/macros.pl diff --git a/modules/preprocs/nasm/nasm-eval.c b/yasm/modules/preprocs/nasm/nasm-eval.c similarity index 98% rename from modules/preprocs/nasm/nasm-eval.c rename to yasm/modules/preprocs/nasm/nasm-eval.c index 1991a4d1..942f4c8b 100644 --- a/modules/preprocs/nasm/nasm-eval.c +++ b/yasm/modules/preprocs/nasm/nasm-eval.c @@ -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)) diff --git a/modules/preprocs/nasm/nasm-eval.h b/yasm/modules/preprocs/nasm/nasm-eval.h similarity index 100% rename from modules/preprocs/nasm/nasm-eval.h rename to yasm/modules/preprocs/nasm/nasm-eval.h diff --git a/modules/preprocs/nasm/nasm-pp.c b/yasm/modules/preprocs/nasm/nasm-pp.c similarity index 99% rename from modules/preprocs/nasm/nasm-pp.c rename to yasm/modules/preprocs/nasm/nasm-pp.c index 9d8c30eb..012531d5 100644 --- a/modules/preprocs/nasm/nasm-pp.c +++ b/yasm/modules/preprocs/nasm/nasm-pp.c @@ -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]; } diff --git a/modules/preprocs/nasm/nasm-pp.h b/yasm/modules/preprocs/nasm/nasm-pp.h similarity index 100% rename from modules/preprocs/nasm/nasm-pp.h rename to yasm/modules/preprocs/nasm/nasm-pp.h diff --git a/modules/preprocs/nasm/nasm-preproc.c b/yasm/modules/preprocs/nasm/nasm-preproc.c similarity index 100% rename from modules/preprocs/nasm/nasm-preproc.c rename to yasm/modules/preprocs/nasm/nasm-preproc.c diff --git a/modules/preprocs/nasm/nasm.h b/yasm/modules/preprocs/nasm/nasm.h similarity index 100% rename from modules/preprocs/nasm/nasm.h rename to yasm/modules/preprocs/nasm/nasm.h diff --git a/modules/preprocs/nasm/nasmlib.c b/yasm/modules/preprocs/nasm/nasmlib.c similarity index 99% rename from modules/preprocs/nasm/nasmlib.c rename to yasm/modules/preprocs/nasm/nasmlib.c index 6b025dfd..d74d053f 100644 --- a/modules/preprocs/nasm/nasmlib.c +++ b/yasm/modules/preprocs/nasm/nasmlib.c @@ -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=='\'')) diff --git a/modules/preprocs/nasm/nasmlib.h b/yasm/modules/preprocs/nasm/nasmlib.h similarity index 100% rename from modules/preprocs/nasm/nasmlib.h rename to yasm/modules/preprocs/nasm/nasmlib.h diff --git a/modules/preprocs/nasm/standard.mac b/yasm/modules/preprocs/nasm/standard.mac similarity index 100% rename from modules/preprocs/nasm/standard.mac rename to yasm/modules/preprocs/nasm/standard.mac diff --git a/modules/preprocs/raw/Makefile.inc b/yasm/modules/preprocs/raw/Makefile.inc similarity index 100% rename from modules/preprocs/raw/Makefile.inc rename to yasm/modules/preprocs/raw/Makefile.inc diff --git a/modules/preprocs/raw/raw-preproc.c b/yasm/modules/preprocs/raw/raw-preproc.c similarity index 100% rename from modules/preprocs/raw/raw-preproc.c rename to yasm/modules/preprocs/raw/raw-preproc.c diff --git a/modules/preprocs/yapp/Makefile.inc b/yasm/modules/preprocs/yapp/Makefile.inc similarity index 100% rename from modules/preprocs/yapp/Makefile.inc rename to yasm/modules/preprocs/yapp/Makefile.inc diff --git a/modules/preprocs/yapp/tests/Makefile.inc b/yasm/modules/preprocs/yapp/tests/Makefile.inc similarity index 100% rename from modules/preprocs/yapp/tests/Makefile.inc rename to yasm/modules/preprocs/yapp/tests/Makefile.inc diff --git a/modules/preprocs/yapp/tests/comment.asm b/yasm/modules/preprocs/yapp/tests/comment.asm similarity index 100% rename from modules/preprocs/yapp/tests/comment.asm rename to yasm/modules/preprocs/yapp/tests/comment.asm diff --git a/modules/preprocs/yapp/tests/comment.pre b/yasm/modules/preprocs/yapp/tests/comment.pre similarity index 100% rename from modules/preprocs/yapp/tests/comment.pre rename to yasm/modules/preprocs/yapp/tests/comment.pre diff --git a/modules/preprocs/yapp/tests/ddefine.asm b/yasm/modules/preprocs/yapp/tests/ddefine.asm similarity index 100% rename from modules/preprocs/yapp/tests/ddefine.asm rename to yasm/modules/preprocs/yapp/tests/ddefine.asm diff --git a/modules/preprocs/yapp/tests/ddefine.pre b/yasm/modules/preprocs/yapp/tests/ddefine.pre similarity index 100% rename from modules/preprocs/yapp/tests/ddefine.pre rename to yasm/modules/preprocs/yapp/tests/ddefine.pre diff --git a/modules/preprocs/yapp/tests/define.asm b/yasm/modules/preprocs/yapp/tests/define.asm similarity index 100% rename from modules/preprocs/yapp/tests/define.asm rename to yasm/modules/preprocs/yapp/tests/define.asm diff --git a/modules/preprocs/yapp/tests/define.pre b/yasm/modules/preprocs/yapp/tests/define.pre similarity index 100% rename from modules/preprocs/yapp/tests/define.pre rename to yasm/modules/preprocs/yapp/tests/define.pre diff --git a/modules/preprocs/yapp/tests/ifdef.asm b/yasm/modules/preprocs/yapp/tests/ifdef.asm similarity index 100% rename from modules/preprocs/yapp/tests/ifdef.asm rename to yasm/modules/preprocs/yapp/tests/ifdef.asm diff --git a/modules/preprocs/yapp/tests/ifdef.pre b/yasm/modules/preprocs/yapp/tests/ifdef.pre similarity index 100% rename from modules/preprocs/yapp/tests/ifdef.pre rename to yasm/modules/preprocs/yapp/tests/ifdef.pre diff --git a/modules/preprocs/yapp/tests/include.asm b/yasm/modules/preprocs/yapp/tests/include.asm similarity index 100% rename from modules/preprocs/yapp/tests/include.asm rename to yasm/modules/preprocs/yapp/tests/include.asm diff --git a/modules/preprocs/yapp/tests/include.pre b/yasm/modules/preprocs/yapp/tests/include.pre similarity index 100% rename from modules/preprocs/yapp/tests/include.pre rename to yasm/modules/preprocs/yapp/tests/include.pre diff --git a/modules/preprocs/yapp/tests/params.asm b/yasm/modules/preprocs/yapp/tests/params.asm similarity index 100% rename from modules/preprocs/yapp/tests/params.asm rename to yasm/modules/preprocs/yapp/tests/params.asm diff --git a/modules/preprocs/yapp/tests/params.pre b/yasm/modules/preprocs/yapp/tests/params.pre similarity index 100% rename from modules/preprocs/yapp/tests/params.pre rename to yasm/modules/preprocs/yapp/tests/params.pre diff --git a/modules/preprocs/yapp/tests/pdefine.asm b/yasm/modules/preprocs/yapp/tests/pdefine.asm similarity index 100% rename from modules/preprocs/yapp/tests/pdefine.asm rename to yasm/modules/preprocs/yapp/tests/pdefine.asm diff --git a/modules/preprocs/yapp/tests/pdefine.pre b/yasm/modules/preprocs/yapp/tests/pdefine.pre similarity index 100% rename from modules/preprocs/yapp/tests/pdefine.pre rename to yasm/modules/preprocs/yapp/tests/pdefine.pre diff --git a/modules/preprocs/yapp/tests/raw.asm b/yasm/modules/preprocs/yapp/tests/raw.asm similarity index 100% rename from modules/preprocs/yapp/tests/raw.asm rename to yasm/modules/preprocs/yapp/tests/raw.asm diff --git a/modules/preprocs/yapp/tests/raw.pre b/yasm/modules/preprocs/yapp/tests/raw.pre similarity index 100% rename from modules/preprocs/yapp/tests/raw.pre rename to yasm/modules/preprocs/yapp/tests/raw.pre diff --git a/modules/preprocs/yapp/tests/rdefine.asm b/yasm/modules/preprocs/yapp/tests/rdefine.asm similarity index 100% rename from modules/preprocs/yapp/tests/rdefine.asm rename to yasm/modules/preprocs/yapp/tests/rdefine.asm diff --git a/modules/preprocs/yapp/tests/rdefine.pre b/yasm/modules/preprocs/yapp/tests/rdefine.pre similarity index 100% rename from modules/preprocs/yapp/tests/rdefine.pre rename to yasm/modules/preprocs/yapp/tests/rdefine.pre diff --git a/modules/preprocs/yapp/tests/rinclude.asm b/yasm/modules/preprocs/yapp/tests/rinclude.asm similarity index 100% rename from modules/preprocs/yapp/tests/rinclude.asm rename to yasm/modules/preprocs/yapp/tests/rinclude.asm diff --git a/modules/preprocs/yapp/tests/rinclude.pre b/yasm/modules/preprocs/yapp/tests/rinclude.pre similarity index 100% rename from modules/preprocs/yapp/tests/rinclude.pre rename to yasm/modules/preprocs/yapp/tests/rinclude.pre diff --git a/modules/preprocs/yapp/tests/yapp_test.sh b/yasm/modules/preprocs/yapp/tests/yapp_test.sh similarity index 100% rename from modules/preprocs/yapp/tests/yapp_test.sh rename to yasm/modules/preprocs/yapp/tests/yapp_test.sh diff --git a/modules/preprocs/yapp/yapp-preproc.c b/yasm/modules/preprocs/yapp/yapp-preproc.c similarity index 99% rename from modules/preprocs/yapp/yapp-preproc.c rename to yasm/modules/preprocs/yapp/yapp-preproc.c index 59343729..68e154e4 100644 --- a/modules/preprocs/yapp/yapp-preproc.c +++ b/yasm/modules/preprocs/yapp/yapp-preproc.c @@ -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(); diff --git a/modules/preprocs/yapp/yapp-preproc.h b/yasm/modules/preprocs/yapp/yapp-preproc.h similarity index 100% rename from modules/preprocs/yapp/yapp-preproc.h rename to yasm/modules/preprocs/yapp/yapp-preproc.h diff --git a/modules/preprocs/yapp/yapp-token.h b/yasm/modules/preprocs/yapp/yapp-token.h similarity index 100% rename from modules/preprocs/yapp/yapp-token.h rename to yasm/modules/preprocs/yapp/yapp-token.h diff --git a/modules/preprocs/yapp/yapp-token.l b/yasm/modules/preprocs/yapp/yapp-token.l similarity index 99% rename from modules/preprocs/yapp/yapp-token.l rename to yasm/modules/preprocs/yapp/yapp-token.l index 8423430e..7889ea3f 100644 --- a/modules/preprocs/yapp/yapp-token.l +++ b/yasm/modules/preprocs/yapp/yapp-token.l @@ -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); diff --git a/out_test.sh b/yasm/out_test.sh similarity index 100% rename from out_test.sh rename to yasm/out_test.sh diff --git a/po/.cvsignore b/yasm/po/.cvsignore 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 index 00000000..e69de29b diff --git a/po/Makefile.in.in b/yasm/po/Makefile.in.in similarity index 100% rename from po/Makefile.in.in rename to yasm/po/Makefile.in.in diff --git a/po/Makevars b/yasm/po/Makevars similarity index 100% rename from po/Makevars rename to yasm/po/Makevars diff --git a/po/Makevars.template b/yasm/po/Makevars.template similarity index 100% rename from po/Makevars.template rename to yasm/po/Makevars.template diff --git a/po/POTFILES.in b/yasm/po/POTFILES.in similarity index 100% rename from po/POTFILES.in rename to yasm/po/POTFILES.in diff --git a/po/Rules-quot b/yasm/po/Rules-quot similarity index 100% rename from po/Rules-quot rename to yasm/po/Rules-quot diff --git a/po/boldquot.sed b/yasm/po/boldquot.sed similarity index 100% rename from po/boldquot.sed rename to yasm/po/boldquot.sed diff --git a/po/en@boldquot.header b/yasm/po/en@boldquot.header similarity index 100% rename from po/en@boldquot.header rename to yasm/po/en@boldquot.header diff --git a/po/en@quot.header b/yasm/po/en@quot.header similarity index 100% rename from po/en@quot.header rename to yasm/po/en@quot.header diff --git a/po/insert-header.sin b/yasm/po/insert-header.sin similarity index 100% rename from po/insert-header.sin rename to yasm/po/insert-header.sin diff --git a/po/quot.sed b/yasm/po/quot.sed similarity index 100% rename from po/quot.sed rename to yasm/po/quot.sed diff --git a/po/remove-potcdate.sin b/yasm/po/remove-potcdate.sin similarity index 100% rename from po/remove-potcdate.sin rename to yasm/po/remove-potcdate.sin diff --git a/splint.sh b/yasm/splint.sh similarity index 100% rename from splint.sh rename to yasm/splint.sh diff --git a/test_hd.pl b/yasm/test_hd.pl similarity index 100% rename from test_hd.pl rename to yasm/test_hd.pl diff --git a/tests/nasm/binfmt.asm b/yasm/tests/nasm/binfmt.asm similarity index 100% rename from tests/nasm/binfmt.asm rename to yasm/tests/nasm/binfmt.asm diff --git a/tests/nasm/binfmt2.asm b/yasm/tests/nasm/binfmt2.asm similarity index 100% rename from tests/nasm/binfmt2.asm rename to yasm/tests/nasm/binfmt2.asm diff --git a/tests/nasm/bits.asm b/yasm/tests/nasm/bits.asm similarity index 100% rename from tests/nasm/bits.asm rename to yasm/tests/nasm/bits.asm diff --git a/tests/nasm/circular1.asm b/yasm/tests/nasm/circular1.asm similarity index 100% rename from tests/nasm/circular1.asm rename to yasm/tests/nasm/circular1.asm diff --git a/tests/nasm/circular2.asm b/yasm/tests/nasm/circular2.asm similarity index 100% rename from tests/nasm/circular2.asm rename to yasm/tests/nasm/circular2.asm diff --git a/tests/nasm/circular3.asm b/yasm/tests/nasm/circular3.asm similarity index 100% rename from tests/nasm/circular3.asm rename to yasm/tests/nasm/circular3.asm diff --git a/tests/nasm/circular4.asm b/yasm/tests/nasm/circular4.asm similarity index 100% rename from tests/nasm/circular4.asm rename to yasm/tests/nasm/circular4.asm diff --git a/tests/nasm/data.asm b/yasm/tests/nasm/data.asm similarity index 100% rename from tests/nasm/data.asm rename to yasm/tests/nasm/data.asm diff --git a/tests/nasm/dir.asm b/yasm/tests/nasm/dir.asm similarity index 100% rename from tests/nasm/dir.asm rename to yasm/tests/nasm/dir.asm diff --git a/tests/nasm/enter.asm b/yasm/tests/nasm/enter.asm similarity index 100% rename from tests/nasm/enter.asm rename to yasm/tests/nasm/enter.asm diff --git a/tests/nasm/equ.asm b/yasm/tests/nasm/equ.asm similarity index 100% rename from tests/nasm/equ.asm rename to yasm/tests/nasm/equ.asm diff --git a/tests/nasm/error1.asm b/yasm/tests/nasm/error1.asm similarity index 100% rename from tests/nasm/error1.asm rename to yasm/tests/nasm/error1.asm diff --git a/tests/nasm/errors.asm b/yasm/tests/nasm/errors.asm similarity index 100% rename from tests/nasm/errors.asm rename to yasm/tests/nasm/errors.asm diff --git a/tests/nasm/first.asm b/yasm/tests/nasm/first.asm similarity index 100% rename from tests/nasm/first.asm rename to yasm/tests/nasm/first.asm diff --git a/tests/nasm/fp.asm b/yasm/tests/nasm/fp.asm similarity index 100% rename from tests/nasm/fp.asm rename to yasm/tests/nasm/fp.asm diff --git a/tests/nasm/fp2.asm b/yasm/tests/nasm/fp2.asm similarity index 100% rename from tests/nasm/fp2.asm rename to yasm/tests/nasm/fp2.asm diff --git a/tests/nasm/global.asm b/yasm/tests/nasm/global.asm similarity index 100% rename from tests/nasm/global.asm rename to yasm/tests/nasm/global.asm diff --git a/tests/nasm/jumps.asm b/yasm/tests/nasm/jumps.asm similarity index 100% rename from tests/nasm/jumps.asm rename to yasm/tests/nasm/jumps.asm diff --git a/tests/nasm/labels.asm b/yasm/tests/nasm/labels.asm similarity index 100% rename from tests/nasm/labels.asm rename to yasm/tests/nasm/labels.asm diff --git a/tests/nasm/labels2.asm b/yasm/tests/nasm/labels2.asm similarity index 100% rename from tests/nasm/labels2.asm rename to yasm/tests/nasm/labels2.asm diff --git a/tests/nasm/labels3.asm b/yasm/tests/nasm/labels3.asm similarity index 100% rename from tests/nasm/labels3.asm rename to yasm/tests/nasm/labels3.asm diff --git a/tests/nasm/mem.asm b/yasm/tests/nasm/mem.asm similarity index 100% rename from tests/nasm/mem.asm rename to yasm/tests/nasm/mem.asm diff --git a/tests/nasm/mem2.asm b/yasm/tests/nasm/mem2.asm similarity index 100% rename from tests/nasm/mem2.asm rename to yasm/tests/nasm/mem2.asm diff --git a/tests/nasm/multiequ.asm b/yasm/tests/nasm/multiequ.asm similarity index 100% rename from tests/nasm/multiequ.asm rename to yasm/tests/nasm/multiequ.asm diff --git a/tests/nasm/multiext.asm b/yasm/tests/nasm/multiext.asm similarity index 100% rename from tests/nasm/multiext.asm rename to yasm/tests/nasm/multiext.asm diff --git a/tests/nasm/multisect.asm b/yasm/tests/nasm/multisect.asm similarity index 100% rename from tests/nasm/multisect.asm rename to yasm/tests/nasm/multisect.asm diff --git a/tests/nasm/multisect2.asm b/yasm/tests/nasm/multisect2.asm similarity index 100% rename from tests/nasm/multisect2.asm rename to yasm/tests/nasm/multisect2.asm diff --git a/tests/nasm/multisect3.asm b/yasm/tests/nasm/multisect3.asm similarity index 100% rename from tests/nasm/multisect3.asm rename to yasm/tests/nasm/multisect3.asm diff --git a/tests/nasm/multisect4.asm b/yasm/tests/nasm/multisect4.asm similarity index 100% rename from tests/nasm/multisect4.asm rename to yasm/tests/nasm/multisect4.asm diff --git a/tests/nasm/numconst.asm b/yasm/tests/nasm/numconst.asm similarity index 100% rename from tests/nasm/numconst.asm rename to yasm/tests/nasm/numconst.asm diff --git a/tests/nasm/org.asm b/yasm/tests/nasm/org.asm similarity index 100% rename from tests/nasm/org.asm rename to yasm/tests/nasm/org.asm diff --git a/tests/nasm/org2.asm b/yasm/tests/nasm/org2.asm similarity index 100% rename from tests/nasm/org2.asm rename to yasm/tests/nasm/org2.asm diff --git a/tests/nasm/reloc.asm b/yasm/tests/nasm/reloc.asm similarity index 100% rename from tests/nasm/reloc.asm rename to yasm/tests/nasm/reloc.asm diff --git a/tests/nasm/reloc2.asm b/yasm/tests/nasm/reloc2.asm similarity index 100% rename from tests/nasm/reloc2.asm rename to yasm/tests/nasm/reloc2.asm diff --git a/tests/nasm/second.asm b/yasm/tests/nasm/second.asm similarity index 100% rename from tests/nasm/second.asm rename to yasm/tests/nasm/second.asm diff --git a/tests/nasm/signed.asm b/yasm/tests/nasm/signed.asm similarity index 100% rename from tests/nasm/signed.asm rename to yasm/tests/nasm/signed.asm diff --git a/tests/nasm/sizes.asm b/yasm/tests/nasm/sizes.asm similarity index 100% rename from tests/nasm/sizes.asm rename to yasm/tests/nasm/sizes.asm diff --git a/tests/nasm/sizes2.asm b/yasm/tests/nasm/sizes2.asm similarity index 100% rename from tests/nasm/sizes2.asm rename to yasm/tests/nasm/sizes2.asm diff --git a/tests/nasm/socket.asm b/yasm/tests/nasm/socket.asm similarity index 100% rename from tests/nasm/socket.asm rename to yasm/tests/nasm/socket.asm diff --git a/tests/nasm/store.asm b/yasm/tests/nasm/store.asm similarity index 100% rename from tests/nasm/store.asm rename to yasm/tests/nasm/store.asm diff --git a/tests/nasm/string.asm b/yasm/tests/nasm/string.asm similarity index 100% rename from tests/nasm/string.asm rename to yasm/tests/nasm/string.asm diff --git a/tests/nasm/test1.asm b/yasm/tests/nasm/test1.asm similarity index 100% rename from tests/nasm/test1.asm rename to yasm/tests/nasm/test1.asm diff --git a/tests/nasm/times.asm b/yasm/tests/nasm/times.asm similarity index 100% rename from tests/nasm/times.asm rename to yasm/tests/nasm/times.asm diff --git a/tests/nasm/vbeaf.asm b/yasm/tests/nasm/vbeaf.asm similarity index 100% rename from tests/nasm/vbeaf.asm rename to yasm/tests/nasm/vbeaf.asm diff --git a/tools/Makefile.inc b/yasm/tools/Makefile.inc similarity index 100% rename from tools/Makefile.inc rename to yasm/tools/Makefile.inc diff --git a/tools/re2c/CHANGELOG b/yasm/tools/re2c/CHANGELOG similarity index 100% rename from tools/re2c/CHANGELOG rename to yasm/tools/re2c/CHANGELOG diff --git a/tools/re2c/Makefile.inc b/yasm/tools/re2c/Makefile.inc similarity index 100% rename from tools/re2c/Makefile.inc rename to yasm/tools/re2c/Makefile.inc diff --git a/tools/re2c/NO_WARRANTY b/yasm/tools/re2c/NO_WARRANTY similarity index 100% rename from tools/re2c/NO_WARRANTY rename to yasm/tools/re2c/NO_WARRANTY diff --git a/tools/re2c/README b/yasm/tools/re2c/README similarity index 100% rename from tools/re2c/README rename to yasm/tools/re2c/README diff --git a/tools/re2c/actions.c b/yasm/tools/re2c/actions.c similarity index 100% rename from tools/re2c/actions.c rename to yasm/tools/re2c/actions.c diff --git a/tools/re2c/basics.h b/yasm/tools/re2c/basics.h similarity index 100% rename from tools/re2c/basics.h rename to yasm/tools/re2c/basics.h diff --git a/tools/re2c/bootstrap/re2c.man b/yasm/tools/re2c/bootstrap/re2c.man similarity index 100% rename from tools/re2c/bootstrap/re2c.man rename to yasm/tools/re2c/bootstrap/re2c.man diff --git a/tools/re2c/bootstrap/scanner.c b/yasm/tools/re2c/bootstrap/scanner.c similarity index 100% rename from tools/re2c/bootstrap/scanner.c rename to yasm/tools/re2c/bootstrap/scanner.c diff --git a/yasm/tools/re2c/cleanup.pl b/yasm/tools/re2c/cleanup.pl new file mode 100755 index 00000000..84f3da1e --- /dev/null +++ b/yasm/tools/re2c/cleanup.pl @@ -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; +} diff --git a/tools/re2c/code.c b/yasm/tools/re2c/code.c similarity index 100% rename from tools/re2c/code.c rename to yasm/tools/re2c/code.c diff --git a/tools/re2c/dfa.c b/yasm/tools/re2c/dfa.c similarity index 100% rename from tools/re2c/dfa.c rename to yasm/tools/re2c/dfa.c diff --git a/tools/re2c/dfa.h b/yasm/tools/re2c/dfa.h similarity index 100% rename from tools/re2c/dfa.h rename to yasm/tools/re2c/dfa.h diff --git a/tools/re2c/doc/loplas.ps.gz b/yasm/tools/re2c/doc/loplas.ps.gz similarity index 100% rename from tools/re2c/doc/loplas.ps.gz rename to yasm/tools/re2c/doc/loplas.ps.gz diff --git a/tools/re2c/doc/sample.bib b/yasm/tools/re2c/doc/sample.bib similarity index 100% rename from tools/re2c/doc/sample.bib rename to yasm/tools/re2c/doc/sample.bib diff --git a/tools/re2c/examples/basemmap.c b/yasm/tools/re2c/examples/basemmap.c similarity index 100% rename from tools/re2c/examples/basemmap.c rename to yasm/tools/re2c/examples/basemmap.c diff --git a/tools/re2c/examples/c.re b/yasm/tools/re2c/examples/c.re similarity index 100% rename from tools/re2c/examples/c.re rename to yasm/tools/re2c/examples/c.re diff --git a/tools/re2c/examples/cmmap.re b/yasm/tools/re2c/examples/cmmap.re similarity index 100% rename from tools/re2c/examples/cmmap.re rename to yasm/tools/re2c/examples/cmmap.re diff --git a/tools/re2c/examples/cnokw.re b/yasm/tools/re2c/examples/cnokw.re similarity index 100% rename from tools/re2c/examples/cnokw.re rename to yasm/tools/re2c/examples/cnokw.re diff --git a/tools/re2c/examples/cunroll.re b/yasm/tools/re2c/examples/cunroll.re similarity index 100% rename from tools/re2c/examples/cunroll.re rename to yasm/tools/re2c/examples/cunroll.re diff --git a/tools/re2c/examples/modula.re b/yasm/tools/re2c/examples/modula.re similarity index 100% rename from tools/re2c/examples/modula.re rename to yasm/tools/re2c/examples/modula.re diff --git a/tools/re2c/examples/rexx/README b/yasm/tools/re2c/examples/rexx/README similarity index 100% rename from tools/re2c/examples/rexx/README rename to yasm/tools/re2c/examples/rexx/README diff --git a/tools/re2c/examples/rexx/rexx.l b/yasm/tools/re2c/examples/rexx/rexx.l similarity index 100% rename from tools/re2c/examples/rexx/rexx.l rename to yasm/tools/re2c/examples/rexx/rexx.l diff --git a/tools/re2c/examples/rexx/scanio.c b/yasm/tools/re2c/examples/rexx/scanio.c similarity index 100% rename from tools/re2c/examples/rexx/scanio.c rename to yasm/tools/re2c/examples/rexx/scanio.c diff --git a/tools/re2c/examples/sample.re b/yasm/tools/re2c/examples/sample.re similarity index 100% rename from tools/re2c/examples/sample.re rename to yasm/tools/re2c/examples/sample.re diff --git a/tools/re2c/examples/simple.re b/yasm/tools/re2c/examples/simple.re similarity index 100% rename from tools/re2c/examples/simple.re rename to yasm/tools/re2c/examples/simple.re diff --git a/tools/re2c/globals.h b/yasm/tools/re2c/globals.h similarity index 100% rename from tools/re2c/globals.h rename to yasm/tools/re2c/globals.h diff --git a/tools/re2c/ins.h b/yasm/tools/re2c/ins.h similarity index 100% rename from tools/re2c/ins.h rename to yasm/tools/re2c/ins.h diff --git a/tools/re2c/main.c b/yasm/tools/re2c/main.c similarity index 100% rename from tools/re2c/main.c rename to yasm/tools/re2c/main.c diff --git a/tools/re2c/parse.h b/yasm/tools/re2c/parse.h similarity index 100% rename from tools/re2c/parse.h rename to yasm/tools/re2c/parse.h diff --git a/tools/re2c/re.h b/yasm/tools/re2c/re.h similarity index 100% rename from tools/re2c/re.h rename to yasm/tools/re2c/re.h diff --git a/tools/re2c/re2c-parser.y b/yasm/tools/re2c/re2c-parser.y similarity index 100% rename from tools/re2c/re2c-parser.y rename to yasm/tools/re2c/re2c-parser.y diff --git a/tools/re2c/re2c.1 b/yasm/tools/re2c/re2c.1 similarity index 100% rename from tools/re2c/re2c.1 rename to yasm/tools/re2c/re2c.1 diff --git a/tools/re2c/scanner.c b/yasm/tools/re2c/scanner.c similarity index 100% rename from tools/re2c/scanner.c rename to yasm/tools/re2c/scanner.c diff --git a/tools/re2c/scanner.h b/yasm/tools/re2c/scanner.h similarity index 100% rename from tools/re2c/scanner.h rename to yasm/tools/re2c/scanner.h diff --git a/tools/re2c/scanner.re b/yasm/tools/re2c/scanner.re similarity index 100% rename from tools/re2c/scanner.re rename to yasm/tools/re2c/scanner.re diff --git a/tools/re2c/substr.c b/yasm/tools/re2c/substr.c similarity index 100% rename from tools/re2c/substr.c rename to yasm/tools/re2c/substr.c diff --git a/tools/re2c/substr.h b/yasm/tools/re2c/substr.h similarity index 100% rename from tools/re2c/substr.h rename to yasm/tools/re2c/substr.h diff --git a/tools/re2c/token.h b/yasm/tools/re2c/token.h similarity index 100% rename from tools/re2c/token.h rename to yasm/tools/re2c/token.h diff --git a/tools/re2c/translate.c b/yasm/tools/re2c/translate.c similarity index 100% rename from tools/re2c/translate.c rename to yasm/tools/re2c/translate.c diff --git a/libyasm/util.h b/yasm/util.h similarity index 97% rename from libyasm/util.h rename to yasm/util.h index 9cf5a0bc..ca3e2623 100644 --- a/libyasm/util.h +++ b/yasm/util.h @@ -42,7 +42,7 @@ # include #if defined(YASM_LIB_AC_INTERNAL) && defined(HAVE_CONFIG_H) -# include "libyasm/config.h" +# include #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 #if defined(YASM_AUTOCONF_INTERNAL) && defined(HAVE_SYS_CDEFS_H) # include @@ -195,8 +195,8 @@ extern void (*yasm_xfree) (/*@only@*/ /*@out@*/ /*@null@*/ void *p) #endif /*YASM_INTERNAL*/ -#include "libyasm/coretype.h" +#include -#include "libyasm/valparam.h" +#include #endif -- 2.50.0