diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2012-10-26 16:25:44 +0000 |
---|---|---|
committer | <> | 2012-11-12 12:15:52 +0000 |
commit | 58ed4748338f9466599adfc8a9171280ed99e23f (patch) | |
tree | 02027d99ded4fb56a64aa9489ac2eb487e7858ab /tools | |
download | VirtualBox-58ed4748338f9466599adfc8a9171280ed99e23f.tar.gz |
Imported from /home/lorry/working-area/delta_VirtualBox/VirtualBox-4.2.4.tar.bz2.VirtualBox-4.2.4
Diffstat (limited to 'tools')
55 files changed, 3404 insertions, 0 deletions
diff --git a/tools/CommonFetch.kmk b/tools/CommonFetch.kmk new file mode 100644 index 00000000..ee380ff5 --- /dev/null +++ b/tools/CommonFetch.kmk @@ -0,0 +1,32 @@ +# $Id: CommonFetch.kmk $ +## @file +# Common Fetch. +# Included by both Makefile.kmk and Makefile-ose.kmk. +# + +# +# Copyright (C) 2006-2007 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + + +# +# OS/2 stuff. +# +if 0 +ifeq ($(KBUILD_TARGET),os2) +FETCHES += os2.x86.glibidl.20070521 +os2.x86.glibidl.20070521_TEMPLATE = VBOXFETCH +os2.x86.glibidl.20070521_INST = $(PATH_DEVTOOLS)/os2.x86/glibidl/20070521/ +os2.x86.glibidl.20070521_SOURCES = http://hobbes.nmsu.edu/download/pub/os2/dev/util/glibidl_20070521.zip +glibidl_20070521.zip_MD5 = 054646a49b96ab762e4d5e9451ca1b37 +glibidl_20070521.zip_SIZE = 611335 +endif # OS/2 stuff +endif diff --git a/tools/Makefile-ose.kmk b/tools/Makefile-ose.kmk new file mode 100644 index 00000000..922f48e6 --- /dev/null +++ b/tools/Makefile-ose.kmk @@ -0,0 +1,22 @@ +# $Id: Makefile-ose.kmk $ +## @file +# Fetch OSE tools. +# + +# +# Copyright (C) 2006-2007 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +DEPTH = .. +include $(KBUILD_PATH)/header.kmk +include CommonFetch.kmk +include $(KBUILD_PATH)/footer.kmk + diff --git a/tools/bin/gen-slickedit-workspace.cmd b/tools/bin/gen-slickedit-workspace.cmd new file mode 100644 index 00000000..bcd6cca1 --- /dev/null +++ b/tools/bin/gen-slickedit-workspace.cmd @@ -0,0 +1,43 @@ +@echo off +rem $Id: gen-slickedit-workspace.cmd $ +rem rem @file +rem Windows NT batch script for launching gen-slickedit-workspace.sh +rem + +rem +rem Copyright (C) 2009-2011 Oracle Corporation +rem +rem This file is part of VirtualBox Open Source Edition (OSE), as +rem available from http://www.virtualbox.org. This file is free software; +rem you can redistribute it and/or modify it under the terms of the GNU +rem General Public License (GPL) as published by the Free Software +rem Foundation, in version 2 as it comes in the "COPYING" file of the +rem VirtualBox OSE distribution. VirtualBox OSE is distributed in the +rem hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +rem + + +setlocal ENABLEEXTENSIONS +setlocal + +rem +rem gen-slickedit-workspace.sh should be in the same directory as this script. +rem +set MY_SCRIPT=%~dp0gen-slickedit-workspace.sh +if exist "%MY_SCRIPT%" goto found +echo gen-slickedit-workspace.cmd: failed to find gen-slickedit-workspace.sh in "%~dp0". +goto end + +rem +rem Found it, convert slashes and tell kmk_ash to interpret it. +rem +:found +set MY_SCRIPT=%MY_SCRIPT:\=/% +set MY_ARGS=%* +if ".%MY_ARGS%." NEQ ".." set MY_ARGS=%MY_ARGS:\=/% +kmk_ash %MY_SCRIPT% --windows-host %MY_ARGS% + +:end +endlocal +endlocal + diff --git a/tools/bin/gen-slickedit-workspace.sh b/tools/bin/gen-slickedit-workspace.sh new file mode 100644 index 00000000..e4c19d97 --- /dev/null +++ b/tools/bin/gen-slickedit-workspace.sh @@ -0,0 +1,978 @@ +# !kmk_ash +# $Id: gen-slickedit-workspace.sh $ +## @file +# Script for generating a SlickEdit workspace. +# + +# +# Copyright (C) 2009-2011 Oracle Corporation +# +# This file is part of VirtualBox Open Source Edition (OSE), as +# available from http://www.virtualbox.org. This file is free software; +# you can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL) as published by the Free Software +# Foundation, in version 2 as it comes in the "COPYING" file of the +# VirtualBox OSE distribution. VirtualBox OSE is distributed in the +# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. +# + +# +# Some constants. +# +MY_CAT="kmk_cat" +MY_CP="kmk_cp" +MY_MKDIR="kmk_mkdir" +MY_MV="kmk_mv" +MY_SED="kmk_sed" +MY_RM="kmk_rm" +MY_SLEEP="kmk_sleep" +MY_EXPR="kmk_expr" +MY_SVN="svn" + +#MY_SORT="kmk_cat" +MY_SORT="sort" + +# +# Globals. +# +MY_PROJECT_FILES="" +MY_OUT_DIRS="\ +out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE} \ +out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE} \ +out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/debug \ +out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/debug \ +out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/release \ +out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/release \ +out/linux.amd64/debug \ +out/linux.x86/debug \ +out/win.amd64/debug \ +out/win.x86/debug \ +out/darwin.amd64/debug \ +out/darwin.x86/debug \ +out/solaris.amd64/debug \ +out/solaris.x86/debug"; + + +# +# Parameters w/ defaults. +# +MY_ROOT_DIR=".." +MY_OUT_DIR="SlickEdit" +MY_PRJ_PRF="VBox-" +MY_WS_NAME="VirtualBox.vpw" +MY_DBG="" +MY_WINDOWS_HOST="" +MY_OPT_MINIMAL="" + +#MY_KBUILD_PATH="${KBUILD_PATH}" +#test -z "${MY_KBUILD_PATH}" && MY_KBUILD_PATH="${PATH_KBUILD}" +#MY_KBUILD="" + + +## +# Gets the absolute path to an existing directory. +# +# @param $1 The path. +my_abs_dir() +{ + if test -n "${PWD}"; then + MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && echo ${PWD}` + else + # old cygwin shell has no PWD and need adjusting. + MY_ABS_DIR=`cd ${MY_ROOT_DIR}/${1} && pwd | ${MY_SED} -e 's,^/cygdrive/\(.\)/,\1:/,'` + fi + if test -z "${MY_ABS_DIR}"; then + MY_ABS_DIR="${1}" + fi +} + +## +# Gets the file name part of a path. +# +# @param $1 The path. +my_get_name() +{ + SAVED_IFS=$IFS + IFS=":/ " + set $1 + while test $# -gt 1 -a -n "${2}"; + do + shift; + done + + IFS=$SAVED_IFS + #echo "$1" + export MY_GET_NAME=$1 +} + +## +# Generate file entry for the specified file if it was found to be of interest. +# +# @param $1 The output file name base. +# @param $2 The file name. +my_file() +{ + # sort and filter by file type. + case "$2" in + # drop these. + *.kup|*~|*.pyc|*.exe|*.sys|*.dll|*.o|*.obj|*.lib|*.a|*.ko) + return 0 + ;; + + # by prefix or directory component. + tst*|*/testcase/*) + MY_FOLDER="$1-Testcases.lst" + ;; + + # by extension. + *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h) + MY_FOLDER="$1-Sources.lst" + ;; + + *.h|*.hpp|*.mm) + MY_FOLDER="$1-Headers.lst" + ;; + + *.asm|*.s|*.S|*.inc|*.mac) + MY_FOLDER="$1-Assembly.lst" + ;; + + *) + MY_FOLDER="$1-Others.lst" + ;; + esac + + ## @todo only files which are in subversion. +# if ${MY_SVN} info "${2}" > /dev/null 2>&1; then + my_get_name "${2}" + echo ' <!-- sortkey: '"${MY_GET_NAME}"' --> <F N="'"${2}"'"/>' >> "${MY_FOLDER}" +# fi +} + +## +# Generate file entries for the specified sub-directory tree. +# +# @param $1 The output filename. +# @param $2 The sub-directory. +my_sub_tree() +{ + if test -n "$MY_DBG"; then echo "dbg: my_sub_tree: ${2}"; fi + + # Skip .svn directories. + case "$2" in + */.svn|*/.svn) + return 0 + ;; + esac + + # Process the files in the directory. + for f in $2/*; + do + if test -d "${f}"; + then + my_sub_tree "${1}" "${f}" + else + my_file "${1}" "${f}" + fi + done + return 0; +} + + +## +# Generate folders for the specified directories and files. +# +# @param $1 The output (base) file name. +# @param $2+ The files and directories to traverse. +my_generate_folder() +{ + MY_FILE="$1" + shift + + # Zap existing file collections. + > "${MY_FILE}-Sources.lst" + > "${MY_FILE}-Headers.lst" + > "${MY_FILE}-Assembly.lst" + > "${MY_FILE}-Testcases.lst" + > "${MY_FILE}-Others.lst" + + # Traverse the directories and files. + while test $# -ge 1 -a -n "${1}"; + do + for f in ${MY_ROOT_DIR}/$1; + do + if test -d "${f}"; + then + my_sub_tree "${MY_FILE}" "${f}" + else + my_file "${MY_FILE}" "${f}" + fi + done + shift + done + + # Generate the folders. + if test -s "${MY_FILE}-Sources.lst"; + then + echo ' <Folder Name="Sources" Filters="*.c;*.cpp;*.cpp.h;*.c.h;*.m;*.mm;*.pl;*.py;*.as">' >> "${MY_FILE}" + ${MY_SORT} "${MY_FILE}-Sources.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" + echo ' </Folder>' >> "${MY_FILE}" + fi + if test -s "${MY_FILE}-Headers.lst"; + then + echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}" + ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" + echo ' </Folder>' >> "${MY_FILE}" + fi + if test -s "${MY_FILE}-Assembly.lst"; + then + echo ' <Folder Name="Assembly" Filters="*.asm;*.s;*.S;*.inc;*.mac">' >> "${MY_FILE}" + ${MY_SORT} "${MY_FILE}-Assembly.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" + echo ' </Folder>' >> "${MY_FILE}" + fi + if test -s "${MY_FILE}-Testcases.lst"; + then + echo ' <Folder Name="Testcases" Filters="tst*;">' >> "${MY_FILE}" + ${MY_SORT} "${MY_FILE}-Testcases.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" + echo ' </Folder>' >> "${MY_FILE}" + fi + if test -s "${MY_FILE}-Others.lst"; + then + echo ' <Folder Name="Others" Filters="">' >> "${MY_FILE}" + ${MY_SORT} "${MY_FILE}-Others.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" + echo ' </Folder>' >> "${MY_FILE}" + fi + + # Cleanup + ${MY_RM} "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst" +} + + +## +# Function generating a project. +# +# @param $1 The project file name. +# @param $2 The project working directory. +# @param $3 Dummy separator. +# @param $4+ Include directories. +# @param $N --end-includes +# @param $N+1 Directory sub-trees and files to include in the project. +# +my_generate_project() +{ + MY_FILE="${MY_PRJ_PRF}${1}.vpj"; + echo "Generating ${MY_FILE}..." + MY_WRK_DIR="${2}" + shift + shift + shift + + # Add it to the project list for workspace construction later on. + MY_PROJECT_FILES="${MY_PROJECT_FILES} ${MY_FILE}" + + + # + # Generate the head bits. + # + echo '<!DOCTYPE Project SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpj.dtd">' > "${MY_FILE}" + echo '<Project' >> "${MY_FILE}" + echo ' Version="10.0"' >> "${MY_FILE}" + echo ' VendorName="SlickEdit"' >> "${MY_FILE}" + echo ' VCSProject="Subversion:"' >> "${MY_FILE}" +# echo ' Customized="1"' >> "${MY_FILE}" +# echo ' WorkingDir="."' >> "${MY_FILE}" + my_abs_dir "${MY_WRK_DIR}" >> "${MY_FILE}" + echo ' WorkingDir="'"${MY_ABS_DIR}"'"' >> "${MY_FILE}" + echo ' >' >> "${MY_FILE}" + echo ' <Config Name="Release" OutputFile="" CompilerConfigName="Latest Version">' >> "${MY_FILE}" + echo ' <Menu>' >> "${MY_FILE}" + echo ' <Target Name="Compile" MenuCaption="&Compile" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}" + echo ' SaveOption="SaveCurrent" RunFromDir="%p" ClearProcessBuffer="1">' >> "${MY_FILE}" + echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %p %n.o"/>' >> "${MY_FILE}" + echo ' </Target>' >> "${MY_FILE}" + echo ' <Target Name="Build" MenuCaption="&Build"CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}" + echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}" + echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw"/>' >> "${MY_FILE}" + echo ' </Target>' >> "${MY_FILE}" + echo ' <Target Name="Rebuild" MenuCaption="&Rebuild" CaptureOutputWith="ProcessBuffer"' >> "${MY_FILE}" + echo ' SaveOption="SaveWorkspaceFiles" RunFromDir="%rw" ClearProcessBuffer="1">' >> "${MY_FILE}" + echo ' <Exec CmdLine="'"${MY_KMK_INVOCATION}"' -C %rw rebuild"/>' >> "${MY_FILE}" + echo ' </Target>' >> "${MY_FILE}" + echo ' <Target Name="Debug" MenuCaption="&Debug" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}" + echo ' <Exec/>' >> "${MY_FILE}" + echo ' </Target>' >> "${MY_FILE}" + echo ' <Target Name="Execute" MenuCaption="E&xecute" SaveOption="SaveNone" RunFromDir="%rw">' >> "${MY_FILE}" + echo ' <Exec/>' >> "${MY_FILE}" + echo ' </Target>' >> "${MY_FILE}" + echo ' </Menu>' >> "${MY_FILE}" + + # + # Include directories. + # + echo ' <Includes>' >> "${MY_FILE}" + while test $# -ge 1 -a "${1}" != "--end-includes"; + do + for f in $1; + do + my_abs_dir ${f} + echo ' <Include Dir="'"${MY_ABS_DIR}/"'"/>' >> "${MY_FILE}" + done + shift + done + shift + echo ' </Includes>' >> "${MY_FILE}" + echo ' </Config>' >> "${MY_FILE}" + + + # + # Process directories+files and create folders. + # + echo ' <Files>' >> "${MY_FILE}" + my_generate_folder "${MY_FILE}" $* + echo ' </Files>' >> "${MY_FILE}" + + # + # The tail. + # + echo '</Project>' >> "${MY_FILE}" + + return 0 +} + + +## +# Generate the workspace +# +my_generate_workspace() +{ + MY_FILE="${MY_WS_NAME}" + echo "Generating ${MY_FILE}..." + echo '<!DOCTYPE Workspace SYSTEM "http://www.slickedit.com/dtd/vse/10.0/vpw.dtd">' > "${MY_FILE}" + echo '<Workspace Version="10.0" VendorName="SlickEdit">' >> "${MY_FILE}" + echo ' <Projects>' >> "${MY_FILE}" + for i in ${MY_PROJECT_FILES}; + do + echo ' <Project File="'"${i}"'" />' >> "${MY_FILE}" + done + echo ' </Projects>' >> "${MY_FILE}" + echo '</Workspace>' >> "${MY_FILE}" + return 0; +} + + +## +# Generate stuff +# +my_generate_usercpp_h() +{ + # + # Probe the slickedit user config, picking the most recent version. + # + if test -z "${MY_SLICK_CONFIG}"; then + if test -d "${HOME}/Library/Application Support/Slickedit"; then + MY_SLICKDIR_="${HOME}/Library/Application Support/Slickedit" + MY_USERCPP_H="unxcpp.h" + MY_VSLICK_DB="vslick.stu" + elif test -d "${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config"; then + MY_SLICKDIR_="${HOMEDRIVE}${HOMEPATH}/Documents/My SlickEdit Config" + MY_USERCPP_H="usercpp.h" + MY_VSLICK_DB="vslick.sta" + else + MY_SLICKDIR_="${HOME}/.slickedit" + MY_USERCPP_H="unxcpp.h" + MY_VSLICK_DB="vslick.stu" + fi + else + MY_SLICKDIR_="${MY_SLICK_CONFIG}" + if test -n "${MY_WINDOWS_HOST}"; then + MY_USERCPP_H="usercpp.h" + MY_VSLICK_DB="vslick.sta" + else + MY_USERCPP_H="unxcpp.h" + MY_VSLICK_DB="vslick.stu" + fi + # MacOS: Implement me! + fi + + MY_VER_NUM="0" + MY_VER="0.0.0" + for subdir in "${MY_SLICKDIR_}/"*; + do + if test -f "${subdir}/${MY_USERCPP_H}" -o -f "${subdir}/${MY_VSLICK_DB}"; then + MY_CUR_VER_NUM=0 + MY_CUR_VER=`echo "${subdir}" | ${MY_SED} -e 's,^.*/,,g'` + + # Convert the dotted version number to an integer, checking that + # it is all numbers in the process. + set `echo "${MY_CUR_VER}" | ${MY_SED} 's/\./ /g' ` + i=100000000 + while test $# -gt 0; + do + if ! ${MY_EXPR} "$1" + 1 > /dev/null 2> /dev/null; then + MY_CUR_VER_NUM=0; + break + fi + if test "$i" -gt 0; then + MY_CUR_VER_NUM=$((${MY_CUR_VER_NUM} + $1 * $i)) + i=$(($i / 100)) + fi + shift + done + + # More recent that what we have? + if test "${MY_CUR_VER_NUM}" -gt "${MY_VER_NUM}"; then + MY_VER_NUM="${MY_CUR_VER_NUM}" + MY_VER="${MY_CUR_VER}" + fi + fi + done + + MY_SLICKDIR="${MY_SLICKDIR_}/${MY_VER}" + MY_USERCPP_H_FULL="${MY_SLICKDIR}/${MY_USERCPP_H}" + if test -d "${MY_SLICKDIR}"; then + echo "Found SlickEdit v${MY_VER} preprocessor file: ${MY_USERCPP_H_FULL}" + else + echo "Failed to locate SlickEdit preprocessor file. You need to manually merge ${MY_USERCPP_H}." + MY_USERCPP_H_FULL="" + fi + + # Generate our + MY_FILE="${MY_USERCPP_H}" + ${MY_CAT} > ${MY_FILE} <<EOF +#define IN_SLICKEDIT +#define RT_C_DECLS_BEGIN +#define RT_C_DECLS_END +#define RT_NO_THROW +#define RT_THROW(type) throw(type) +#define RT_GCC_EXTENSION' +#define RT_COMPILER_GROKS_64BIT_BITFIELDS' +#define RT_COMPILER_WITH_80BIT_LONG_DOUBLE' + +#define ATL_NO_VTABLE +#define BEGIN_COM_MAP(a) +#define COM_INTERFACE_ENTRY(a) +#define COM_INTERFACE_ENTRY2(a,b) +#define COM_INTERFACE_ENTRY3(a,b,c) +#define COM_INTERFACE_ENTRY4(a,b,c,d) +#define END_COM_MAP(a) + +#define COM_DECL_READONLY_ENUM_AND_COLLECTION(a) +#define COMGETTER(n) n +#define COMSETTER(n) n +#define ComSafeArrayIn(t,a) t a[] +#define ComSafeArrayOut(t,a) t * a[] +#define DECLARE_CLASSFACTORY(a) +#define DECLARE_CLASSFACTORY_SINGLETON(a) +#define DECLARE_REGISTRY_RESOURCEID(a) +#define DECLARE_NOT_AGGREGATABLE(a) +#define DECLARE_PROTECT_FINAL_CONSTRUCT(a) +#define DECLARE_EMPTY_CTOR_DTOR(a) a(); ~a(); +#define DEFINE_EMPTY_CTOR_DTOR(a) a::a() {} a::~a() {} +#define NS_DECL_ISUPPORTS +#define NS_IMETHOD virtual nsresult +#define NS_IMETHOD_(type) virtual type +#define NS_IMETHODIMP nsresult +#define NS_IMETHODIMP_(type) type +#define PARSERS_EXPORT +EOF + if test -n "${MY_WINDOWS_HOST}"; then + ${MY_CAT} >> ${MY_FILE} <<EOF +#define COM_STRUCT_OR_CLASS(I) struct I +#define STDMETHOD(m) virtual HRESULT m +#define STDMETHOD_(type,m) virtual type m +#define STDMETHODIMP HRESULT +#define STDMETHODIMP_(type) type +EOF + else + ${MY_CAT} >> ${MY_FILE} <<EOF +#define COM_STRUCT_OR_CLASS(I) class I +#define STDMETHOD(m) virtual nsresult m +#define STDMETHOD_(type,m) virtual type m +#define STDMETHODIMP nsresult +#define STDMETHODIMP_(type) type +EOF + fi + ${MY_CAT} >> ${MY_FILE} <<EOF +#define VBOX_SCRIPTABLE(a) public a +#define VBOX_SCRIPTABLE_IMPL(a) +#define VIRTUALBOXBASE_ADD_ERRORINFO_SUPPORT(a) + +#define CTX_SUFF(var) var##R3 +#define CTXAllSUFF(var) var##R3 +#define CTXSUFF(var) var##HC +#define OTHERCTXSUFF(var) var##GC +#define CTXALLMID(first, last) first##R3##last +#define CTXMID(first, last) first##HC##last +#define OTHERCTXMID(first, last) first##GC##last +#define CTXTYPE(GCType, R3Type, R0Type) R3Type +#define RCTYPE(RCType, HCType) RCType +#define GCTYPE(GCType, HCType) GCType +#define RCPTRTYPE(RCType) RCType +#define GCPTRTYPE(GCType) GCType +#define HCPTRTYPE(HCType) HCType +#define R3R0PTRTYPE(HCType) HCType +#define R0PTRTYPE(R3Type) R3Type +#define R3PTRTYPE(R0Type) R0Type +#define RT_SRC_POS __FILE__, __LINE__, __PRETTY_FUNCTION__ +#define RT_SRC_POS_DECL const char *pszFile, unsigned iLine, const char *pszFunction +#define RT_SRC_POS_ARGS pszFile, iLine, pszFunction +#define RTCALL +#define DECLINLINE(type) inline type +#define DECL_FORCE_INLINE(type) inline type +#define DECL_INVALID(type) type + +#define PDMDEVINSINT_DECLARED 1 +#define VBOX_WITH_HGCM 1 +#define VBOXCALL + +#define PGM_CTX(a,b) b +#define PGM_CTX3(a,b,c) c +#define PGM_GST_NAME(name) PGM_GST_NAME_AMD64(name) +#define PGM_GST_NAME_REAL(name) PGM_CTX3(name) +#define PGM_GST_NAME_PROT(name) PGM_CTX3(pgm,GstProt,name) +#define PGM_GST_NAME_32BIT(name) PGM_CTX3(pgm,Gst32Bit,name) +#define PGM_GST_NAME_PAE(name) PGM_CTX3(pgm,GstPAE,name) +#define PGM_GST_NAME_AMD64(name) PGM_CTX3(pgm,GstAMD64,name) +#define PGM_GST_DECL(type, name) type PGM_GST_NAME(name) +#define PGM_SHW_NAME(name) PGM_GST_NAME_AMD64(name) +#define PGM_SHW_NAME_32BIT(name) PGM_CTX3(pgm,Shw32Bit,name) +#define PGM_SHW_NAME_PAE(name) PGM_CTX3(pgm,ShwPAE,name) +#define PGM_SHW_NAME_AMD64(name) PGM_CTX3(pgm,ShwAMD64,name) +#define PGM_SHW_NAME_NESTED(name) PGM_CTX3(pgm,ShwNested,name) +#define PGM_SHW_NAME_EPT(name) PGM_CTX3(pgm,ShwEPT,name) +#define PGM_SHW_DECL(type, name) type PGM_SHW_NAME(name) +#define PGM_BTH_NAME(name) PGM_BTH_NAME_NESTED_AMD64(name) +#define PGM_BTH_NAME_32BIT_REAL(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_32BIT_PROT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_32BIT_32BIT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_PAE_REAL(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_PAE_PROT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_PAE_32BIT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_PAE_PAE(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_AMD64_PROT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_AMD64_AMD64(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_NESTED_REAL(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_NESTED_PROT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_NESTED_32BIT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_NESTED_PAE(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_NESTED_AMD64(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_EPT_REAL(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_EPT_PROT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_EPT_32BIT(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_EPT_PAE(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_NAME_EPT_AMD64(name) PGM_CTX3(pgm,Bth,name) +#define PGM_BTH_DECL(type, name) type PGM_BTH_NAME(name) + +#define FNIEMOP_STUB(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) { return VERR_NOT_IMPLEMENTED; } +#define FNIEMOP_DEF(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) +#define FNIEMOP_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0) +#define FNIEMOP_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, a_Type0 a_Name0, a_Type1 a_Name1) +#define IEM_CIMPL_DEF_0(a_Name) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu) +#define IEM_CIMPL_DEF_1(a_Name, a_Type0, a_Name0) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0) +#define IEM_CIMPL_DEF_2(a_Name, a_Type0, a_Name0, a_Type1, a_Name1) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1) +#define IEM_CIMPL_DEF_3(a_Name, a_Type0, a_Name0, a_Type1, a_Name1, a_Type2, a_Name2) static VBOXSTRICTRC a_Name(PIEMCPU pIemCpu, , a_Type0 a_Name0, a_Type1 a_Name1, , a_Type2 a_Name2) +#define IEM_MC_LOCAL(a_Type, a_Name) a_Type a_Name +#define IEM_MC_ARG(a_Type, a_Name, a_iArg) a_Type a_Name +#define IEM_MC_ARG_CONST(a_Type, a_Name, a_Value, a_iArg) a_Type const a_Name = a_Value +EOF + + MY_HDR_FILES=` echo ${MY_ROOT_DIR}/include/VBox/*.h ${MY_ROOT_DIR}/include/VBox/vmm/*.h \ + | ${MY_SED} -e 's,${MY_ROOT_DIR}/include/VBox/err.h,,' ` + MY_HDR_FILES="${MY_HDR_FILES} ${MY_ROOT_DIR}/include/iprt/cdefs.h" + ${MY_SED} \ + -e '/__cdecl/d' \ + -e '/^ *# *define.*DECL/!d' \ + -e '/DECLS/d' \ + -e '/DECLARE_CLS_/d' \ + -e '/_SRC_POS_DECL/d' \ + -e '/declspec/d' \ + -e '/__attribute__/d' \ + -e 's/# */#/g' \ + -e 's/ */ /g' \ + -e '/ DECLEXPORT_CLASS/d' \ + -e 's/ *VBOXCALL//' \ + -e 's/ *RTCALL//' \ + -e '/ DECLASM(type) type/d' \ + -e '/define *DECL..CALLBACKMEMBER(type[^)]*) *RT/d' \ + -e '/define *DECLINLINE(type)/d' \ + -e '/define *DECL_FORCE_INLINE(type)/d' \ + -e '/ *DECL_INVALID(/d' \ + \ + -e 's/(type) DECLHIDDEN(type)/(type) type/' \ + -e 's/(type) DECLEXPORT(type)/(type) type/' \ + -e 's/(type) DECLIMPORT(type)/(type) type/' \ + -e 's/(a_Type) DECLHIDDEN(a_Type)/(a_Type) a_Type/' \ + -e 's/(a_Type) DECLEXPORT(a_Type)/(a_Type) a_Type/' \ + -e 's/(a_Type) DECLIMPORT(a_Type)/(a_Type) a_Type/' \ + \ + --append "${MY_FILE}" \ + ${MY_HDR_FILES} + + ${MY_CAT} "${MY_FILE}" \ + | ${MY_SED} -e 's/_/\x1F/g' -e 's/(/\x1E/g' -e 's/[[:space:]][[:space:]]*/\x1C/g' \ + | ${MY_SED} -e 's/\x1F/_/g' -e 's/\x1E/(/g' -e 's/\x1C/ /g' \ + | ${MY_SORT} \ + | ${MY_SED} -e '/#define/s/$/ \/\/ vbox/' --output "${MY_FILE}.2" + + # Eliminate duplicates. + > "${MY_FILE}.3" + exec < "${MY_FILE}.2" + MY_PREV_DEFINE="" + while read MY_LINE; + do + MY_DEFINE=`echo "${MY_LINE}" | ${MY_SED} -e 's/^#define \([^ ()]*\).*$/\1/' ` + if test "${MY_DEFINE}" != "${MY_PREV_DEFINE}"; then + MY_PREV_DEFINE=${MY_DEFINE} + echo "${MY_LINE}" >> "${MY_FILE}.3" + fi + done + + # Append non-vbox bits from the current user config. + if test -n "${MY_USERCPP_H_FULL}" -a -f "${MY_USERCPP_H_FULL}"; then + ${MY_SED} -e '/ \/\/ vbox$/d' -e '/^[[:space:]]*$/d' --append "${MY_FILE}.3" "${MY_USERCPP_H_FULL}" + fi + + # Finalize the file (sort + blank lines). + ${MY_CAT} "${MY_FILE}.3" \ + | ${MY_SED} -e 's/$/\n/' --output "${MY_FILE}" + ${MY_RM} -f "${MY_FILE}.2" "${MY_FILE}.3" + + # Install it. + if test -n "${MY_USERCPP_H_FULL}" -a -d "${MY_SLICKDIR}"; then + if test -f "${MY_USERCPP_H_FULL}"; then + ${MY_MV} -vf "${MY_USERCPP_H_FULL}" "${MY_USERCPP_H_FULL}.bak" + ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}" + echo "Updated the SlickEdit preprocessor file. (Previous version renamed to .bak.)" + else + ${MY_CP} "${MY_FILE}" "${MY_USERCPP_H_FULL}" + echo "Created the SlickEdit preprocessor file." + fi + fi +} + +###### end of functions #### + + +# +# Parse arguments. +# +while test $# -ge 1; +do + ARG=$1 + shift + case "$ARG" in + + --rootdir) + if test $# -eq 0; then + echo "error: missing --rootdir argument." 1>&2 + exit 1; + fi + MY_ROOT_DIR="$1" + shift + ;; + + --outdir) + if test $# -eq 0; then + echo "error: missing --outdir argument." 1>&2 + exit 1; + fi + MY_OUT_DIR="$1" + shift + ;; + + --project-base) + if test $# -eq 0; then + echo "error: missing --project-base argument." 1>&2 + exit 1; + fi + MY_PRJ_PRF="$1" + shift + ;; + + --workspace) + if test $# -eq 0; then + echo "error: missing --workspace argument." 1>&2 + exit 1; + fi + MY_WS_NAME="$1" + shift + ;; + + --windows-host) + MY_WINDOWS_HOST=1 + ;; + + --minimal) + MY_OPT_MINIMAL=1 + ;; + + --slickedit-config) + MY_SLICK_CONFIG="$1" + shift + ;; + + # usage + --h*|-h*|-?|--?) + echo "usage: $0 [--rootdir <rootdir>] [--outdir <outdir>] [--project-base <prefix>] [--workspace <name>] [--minimal] [--slickedit-config <DIR>]" + echo "" + echo "If --outdir is specified, you must specify a --rootdir relative to it as well." + exit 1; + ;; + + # default + *) + echo "error: Invalid parameter '$ARG'" 1>&2 + exit 1; + + esac +done + + +# +# From now on everything *MUST* succeed. +# +set -e + + +# +# Make sure the output directory exists, is valid and clean. +# +${MY_RM} -f \ + "${MY_OUT_DIR}/${MY_PRJ_PRF}"*.vpj \ + "${MY_OUT_DIR}/${MY_WS_NAME}" \ + "${MY_OUT_DIR}/`echo ${MY_WS_NAME} | ${MY_SED} -e 's/\.vpw$/.vtg/'`" +${MY_MKDIR} -p "${MY_OUT_DIR}" +cd "${MY_OUT_DIR}" + + +# +# Determine the invocation to conjure up kmk. +# +my_abs_dir "tools" +if test -n "${MY_WINDOWS_HOST}"; then + MY_KMK_INVOCATION="${MY_ABS_DIR}/win.x86/bin/rexx.exe ${MY_ABS_DIR}/envSub.cmd kmk.exe" +else + MY_KMK_INVOCATION="LANG=C ${MY_ABS_DIR}/env.sh --quiet --no-wine kmk" +fi + + +# +# Generate the projects and workspace. +# +# Note! The configs aren't optimal yet, lots of adjustment wrt headers left to be done. +# + +# src/VBox/Runtime +my_generate_project "IPRT" "src/VBox/Runtime" --begin-incs "include" "src/VBox/Runtime/include" --end-includes "include/iprt" "src/VBox/Runtime" + +# src/VBox/VMM +my_generate_project "VMM" "src/VBox/VMM" --begin-incs "include" "src/VBox/VMM" --end-includes "src/VBox/VMM" \ + "include/VBox/vmm/cfgm.h" \ + "include/VBox/vmm/cpum.*" \ + "include/VBox/vmm/dbgf.h" \ + "include/VBox/vmm/em.h" \ + "include/VBox/vmm/gmm.*" \ + "include/VBox/vmm/gvm.*" \ + "include/VBox/vmm/hw*.*" \ + "include/VBox/vmm/iom.h" \ + "include/VBox/vmm/mm.h" \ + "include/VBox/vmm/patm.*" \ + "include/VBox/vmm/pdm*.h" \ + "include/VBox/vmm/pgm.*" \ + "include/VBox/vmm/rem.h" \ + "include/VBox/vmm/selm.*" \ + "include/VBox/vmm/ssm.h" \ + "include/VBox/vmm/stam.*" \ + "include/VBox/vmm/tm.h" \ + "include/VBox/vmm/trpm.*" \ + "include/VBox/vmm/vm.*" \ + "include/VBox/vmm/vmm.*" + +# src/recompiler +my_generate_project "REM" "src/recompiler" --begin-incs \ + "include" \ + "src/recompiler" \ + "src/recompiler/target-i386" \ + "src/recompiler/tcg/i386" \ + "src/recompiler/Sun/crt" \ + --end-includes \ + "src/recompiler" \ + "src/VBox/VMM/include/REMInternal.h" \ + "src/VBox/VMM/VMMAll/REMAll.cpp" + +# src/VBox/Additions +my_generate_project "Add-freebsd" "src/VBox/Additions/freebsd" --begin-incs "include" "src/VBox/Additions/freebsd" --end-includes "src/VBox/Additions/freebsd" +my_generate_project "Add-linux" "src/VBox/Additions/linux" --begin-incs "include" "src/VBox/Additions/linux" --end-includes "src/VBox/Additions/linux" +my_generate_project "Add-os2" "src/VBox/Additions/os2" --begin-incs "include" "src/VBox/Additions/os2" --end-includes "src/VBox/Additions/os2" +my_generate_project "Add-solaris" "src/VBox/Additions/solaris" --begin-incs "include" "src/VBox/Additions/solaris" --end-includes "src/VBox/Additions/solaris" +my_generate_project "Add-win" "src/VBox/Additions/WINNT" --begin-incs "include" "src/VBox/Additions/WINNT" --end-includes "src/VBox/Additions/WINNT" +test -z "$MY_OPT_MINIMAL" && \ +my_generate_project "Add-x11" "src/VBox/Additions/x11" --begin-incs "include" "src/VBox/Additions/x11" --end-includes "src/VBox/Additions/x11" +my_generate_project "Add-Control" "src/VBox/Additions/common/VBoxControl" --begin-incs "include" "src/VBox/Additions/common/VBoxControl" --end-includes "src/VBox/Additions/common/VBoxControl" +my_generate_project "Add-GuestDrv" "src/VBox/Additions/common/VBoxGuest" --begin-incs "include" "src/VBox/Additions/common/VBoxGuest" --end-includes "src/VBox/Additions/common/VBoxGuest" "include/VBox/VBoxGuest*.*" +my_generate_project "Add-Lib" "src/VBox/Additions/common/VBoxGuestLib" --begin-incs "include" "src/VBox/Additions/common/VBoxGuestLib" --end-includes "src/VBox/Additions/common/VBoxGuestLib" "include/VBox/VBoxGuest*.*" +my_generate_project "Add-Service" "src/VBox/Additions/common/VBoxService" --begin-incs "include" "src/VBox/Additions/common/VBoxService" --end-includes "src/VBox/Additions/common/VBoxService" +if test -z "$MY_OPT_MINIMAL"; then + my_generate_project "Add-crOpenGL" "src/VBox/Additions/common/crOpenGL" --begin-incs "include" "src/VBox/Additions/common/crOpenGL" --end-includes "src/VBox/Additions/common/crOpenGL" + my_generate_project "Add-CredProv" "src/VBox/Additions/WINNT/VBoxCredProv" --begin-incs "include" "src/VBox/Additions/WINNT/VBoxCredProv" --end-includes "src/VBox/Additions/WINNT/VBoxCredProv" + my_generate_project "Add-GINA" "src/VBox/Additions/WINNT/VBoxGINA" --begin-incs "include" "src/VBox/Additions/WINNT/VBoxGINA" --end-includes "src/VBox/Additions/WINNT/VBoxGINA" +fi + +# src/VBox/Debugger +my_generate_project "Debugger" "src/VBox/Debugger" --begin-incs "include" "src/VBox/Debugger" --end-includes "src/VBox/Debugger" "include/VBox/dbggui.h" "include/VBox/dbg.h" + +# src/VBox/Devices +my_generate_project "Devices" "src/VBox/Devices" --begin-incs "include" "src/VBox/Devices" --end-includes "src/VBox/Devices" "include/VBox/pci.h" "include/VBox/pdm*.h" +## @todo split this up. + +# src/VBox/Disassembler +my_generate_project "DIS" "src/VBox/Disassembler" --begin-incs "include" "src/VBox/Disassembler" --end-includes "src/VBox/Disassembler" "include/VBox/dis*.h" + +# src/VBox/Frontends +test -z "$MY_OPT_MINIMAL" && \ +my_generate_project "FE-VBoxBalloonCtrl" "src/VBox/Frontends/VBoxBalloonCtrl" --begin-incs "include" "src/VBox/Frontends/VBoxBalloonCtrl" --end-includes "src/VBox/Frontends/VBoxBalloonCtrl" +my_generate_project "FE-VBoxManage" "src/VBox/Frontends/VBoxManage" --begin-incs "include" "src/VBox/Frontends/VBoxManage" --end-includes "src/VBox/Frontends/VBoxManage" +my_generate_project "FE-VBoxHeadless" "src/VBox/Frontends/VBoxHeadless" --begin-incs "include" "src/VBox/Frontends/VBoxHeadless" --end-includes "src/VBox/Frontends/VBoxHeadless" +my_generate_project "FE-VBoxSDL" "src/VBox/Frontends/VBoxSDL" --begin-incs "include" "src/VBox/Frontends/VBoxSDL" --end-includes "src/VBox/Frontends/VBoxSDL" +my_generate_project "FE-VBoxShell" "src/VBox/Frontends/VBoxShell" --begin-incs "include" "src/VBox/Frontends/VBoxShell" --end-includes "src/VBox/Frontends/VBoxShell" +# noise - my_generate_project "FE-VBoxBFE" "src/VBox/Frontends/VBoxBFE" --begin-incs "include" "src/VBox/Frontends/VBoxBFE" --end-includes "src/VBox/Frontends/VBoxBFE" +FE_VBOX_WRAPPERS="" +for d in ${MY_OUT_DIRS}; +do + if test -d "${MY_ROOT_DIR}/${d}/obj/VirtualBox/include"; then + FE_VBOX_WRAPPERS="${d}/obj/VirtualBox/include" + break + fi +done +if test -n "${FE_VBOX_WRAPPERS}"; then + my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" "${FE_VBOX_WRAPPERS}" --end-includes "src/VBox/Frontends/VirtualBox" "${FE_VBOX_WRAPPERS}/COMWrappers.cpp" "${FE_VBOX_WRAPPERS}/COMWrappers.h" +else + my_generate_project "FE-VirtualBox" "src/VBox/Frontends/VirtualBox" --begin-incs "include" --end-includes "src/VBox/Frontends/VirtualBox" +fi + +# src/VBox/GuestHost +my_generate_project "HGSMI-GH" "src/VBox/GuestHost/HGSMI" --begin-incs "include" --end-includes "src/VBox/GuestHost/HGSMI" +test -z "$MY_OPT_MINIMAL" && \ +my_generate_project "OpenGL-GH" "src/VBox/GuestHost/OpenGL" --begin-incs "include" "src/VBox/GuestHost/OpenGL" --end-includes "src/VBox/GuestHost/OpenGL" +my_generate_project "ShClip-GH" "src/VBox/GuestHost/SharedClipboard" --begin-incs "include" --end-includes "src/VBox/GuestHost/SharedClipboard" + +# src/VBox/HostDrivers +my_generate_project "SUP" "src/VBox/HostDrivers/Support" --begin-incs "include" "src/VBox/HostDrivers/Support" --end-includes "src/VBox/HostDrivers/Support" "include/VBox/sup.h" "include/VBox/sup.mac" +my_generate_project "VBoxNetAdp" "src/VBox/HostDrivers/VBoxNetAdp" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetAdp" --end-includes "src/VBox/HostDrivers/VBoxNetAdp" "include/VBox/intnet.h" +my_generate_project "VBoxNetFlt" "src/VBox/HostDrivers/VBoxNetFlt" --begin-incs "include" "src/VBox/HostDrivers/VBoxNetFlt" --end-includes "src/VBox/HostDrivers/VBoxNetFlt" "include/VBox/intnet.h" +my_generate_project "VBoxUSB" "src/VBox/HostDrivers/VBoxUSB" --begin-incs "include" "src/VBox/HostDrivers/VBoxUSB" --end-includes "src/VBox/HostDrivers/VBoxUSB" "include/VBox/usblib*.h" "include/VBox/usbfilter.h" + +# src/VBox/HostServices +my_generate_project "GuestCntl" "src/VBox/HostServices/GuestControl" --begin-incs "include" "src/VBox/HostServices/GuestControl" --end-includes "src/VBox/HostServices/GuestControl" +my_generate_project "GuestProps" "src/VBox/HostServices/GuestProperties" --begin-incs "include" "src/VBox/HostServices/GuestProperties" --end-includes "src/VBox/HostServices/GuestProperties" +my_generate_project "ShClip-HS" "src/VBox/HostServices/SharedClipboard" --begin-incs "include" "src/VBox/HostServices/SharedClipboard" --end-includes "src/VBox/HostServices/SharedClipboard" +my_generate_project "SharedFolders" "src/VBox/HostServices/SharedFolders" --begin-incs "include" "src/VBox/HostServices/SharedFolders" --end-includes "src/VBox/HostServices/SharedFolders" "include/VBox/shflsvc.h" +my_generate_project "OpenGL-HS" "src/VBox/HostServices/SharedOpenGL" --begin-incs "include" "src/VBox/HostServices/SharedOpenGL" --end-includes "src/VBox/HostServices/SharedOpenGL" + +# src/VBox/ImageMounter +my_generate_project "ImageMounter" "src/VBox/ImageMounter" --begin-incs "include" "src/VBox/ImageMounter" --end-includes "src/VBox/ImageMounter" + +# src/VBox/Installer +my_generate_project "Installers" "src/VBox/Installer" --begin-incs "include" --end-includes "src/VBox/Installer" + +# src/VBox/Main +my_generate_project "Main" "src/VBox/Main" --begin-incs "include" "src/VBox/Main/include" --end-includes "src/VBox/Main" "include/VBox/com" "include/VBox/settings.h" +## @todo seperate webservices and Main. pick the right headers. added generated headers. + +# src/VBox/Network +my_generate_project "Net-DHCP" "src/VBox/NetworkServices/DHCP" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/DHCP" +my_generate_project "Net-NAT" "src/VBox/NetworkServices/NAT" --begin-incs "include" "src/VBox/NetworkServices/NAT" --end-includes "src/VBox/NetworkServices/NAT" "src/VBox/Devices/Network/slirp" +my_generate_project "Net-NetLib" "src/VBox/NetworkServices/NetLib" --begin-incs "include" "src/VBox/NetworkServices/NetLib" --end-includes "src/VBox/NetworkServices/NetLib" + +# src/VBox/RDP +my_generate_project "RDP-Client" "src/VBox/RDP/client" --begin-incs "include" "src/VBox/RDP/client" --end-includes "src/VBox/RDP/client" +my_generate_project "RDP-Server" "src/VBox/RDP/server" --begin-incs "include" "src/VBox/RDP/server" --end-includes "src/VBox/RDP/server" +my_generate_project "RDP-WebClient" "src/VBox/RDP/webclient" --begin-incs "include" "src/VBox/RDP/webclient" --end-includes "src/VBox/RDP/webclient" +my_generate_project "RDP-Misc" "src/VBox/RDP" --begin-incs "include" --end-includes "src/VBox/RDP/auth" "src/VBox/RDP/tscpasswd" "src/VBox/RDP/x11server" + +# src/VBox/Testsuite +my_generate_project "Testsuite" "src/VBox/Testsuite" --begin-incs "include" --end-includes "src/VBox/Testsuite" + +# src/VBox/ExtPacks +my_generate_project "ExtPacks" "src/VBox/ExtPacks" --begin-incs "include" --end-includes "src/VBox/ExtPacks" + +# src/apps/adpctl - misplaced. +my_generate_project "adpctl" "src/apps/adpctl" --begin-incs "include" --end-includes "src/apps/adpctl" + +# src/bldprogs +my_generate_project "bldprogs" "src/bldprogs" --begin-incs "include" --end-includes "src/bldprogs" + +# A few things from src/lib +my_generate_project "zlib" "src/libs/zlib-1.2.6" --begin-incs "include" --end-includes "src/libs/zlib-1.2.6/*.c" "src/libs/zlib-1.2.6/*.h" +my_generate_project "liblzf" "src/libs/liblzf-3.4" --begin-incs "include" --end-includes "src/libs/liblzf-3.4" +my_generate_project "libpng" "src/libs/libpng-1.2.8" --begin-incs "include" --end-includes "src/libs/libpng-1.2.8/*.c" "src/libs/libpng-1.2.8/*.h" +my_generate_project "openssl" "src/libs/openssl-0.9.8t" --begin-incs "include" "src/libs/openssl-0.9.8t/crypto" --end-includes "src/libs/openssl-0.9.8t" +my_generate_project "kStuff" "src/libs/kStuff" --begin-incs "include" "src/libs/kStuff/kStuff/include" --end-includes "src/libs/kStuff" + + +# include/VBox +my_generate_project "VBoxHeaders" "include" --begin-incs "include" --end-includes "include/VBox" + +# Misc +my_generate_project "misc" "src/testcase" --begin-incs "include" --end-includes \ + "src/testcase" \ + "configure" \ + "configure.vbs" \ + "Config.kmk" \ + "Makefile.kmk" \ + "src/Makefile.kmk" \ + "src/VBox/Makefile.kmk" + + +# out/x.y/z/bin/sdk/bindings/xpcom +XPCOM_INCS="src/libs/xpcom18a4" +for d in \ + "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/dist/sdk/bindings/xpcom" \ + "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/dist/sdk/bindings/xpcom" \ + "out/${KBUILD_TARGET}.${KBUILD_TARGET_ARCH}/${KBUILD_TYPE}/bin/sdk/bindings/xpcom" \ + "out/${BUILD_TARGET}.${BUILD_TARGET_ARCH}/${BUILD_TYPE}/bin/sdk/bindings/xpcom" \ + "out/linux.amd64/debug/bin/sdk/bindings/xpcom" \ + "out/linux.x86/debug/bin/sdk/bindings/xpcom" \ + "out/darwin.amd64/debug/dist/sdk/bindings/xpcom" \ + "out/darwin.x86/debug/bin/dist/bindings/xpcom" \ + "out/solaris.amd64/debug/bin/sdk/bindings/xpcom" \ + "out/solaris.x86/debug/bin/sdk/bindings/xpcom"; +do + if test -d "${MY_ROOT_DIR}/${d}"; then + my_generate_project "SDK-xpcom" "${d}" --begin-incs "include" "${d}/include" --end-includes "${d}" + XPCOM_INCS="${d}/include" + break + fi +done + +# lib/xpcom +my_generate_project "xpcom" "src/libs/xpcom18a4" --begin-incs "include" "${XPCOM_INCS}" --end-includes "src/libs/xpcom18a4" + +my_generate_workspace + + +# +# Update the history file if present. +# +MY_FILE="${MY_WS_NAME}histu" +if test -f "${MY_FILE}"; then + echo "Updating ${MY_FILE}..." + ${MY_MV} -f "${MY_FILE}" "${MY_FILE}.old" + ${MY_SED} -n \ + -e '/PROJECT_CACHE/d' \ + -e '/\[TreeExpansion2\]/d' \ + -e '/^\[/p' \ + -e '/: /p' \ + -e '/^CurrentProject/p' \ + "${MY_FILE}.old" > "${MY_FILE}" +fi + + +# +# Generate and update the usercpp.h/unxcpp.h file. +# +my_generate_usercpp_h + + +echo "done" + diff --git a/tools/darwin.amd64/bin/iasl b/tools/darwin.amd64/bin/iasl Binary files differnew file mode 100755 index 00000000..a0b8331c --- /dev/null +++ b/tools/darwin.amd64/bin/iasl diff --git a/tools/darwin.amd64/bin/yasm b/tools/darwin.amd64/bin/yasm Binary files differnew file mode 100755 index 00000000..e877524f --- /dev/null +++ b/tools/darwin.amd64/bin/yasm diff --git a/tools/darwin.x86/bin/iasl b/tools/darwin.x86/bin/iasl Binary files differnew file mode 100755 index 00000000..a0b8331c --- /dev/null +++ b/tools/darwin.x86/bin/iasl diff --git a/tools/darwin.x86/bin/yasm b/tools/darwin.x86/bin/yasm Binary files differnew file mode 100755 index 00000000..e877524f --- /dev/null +++ b/tools/darwin.x86/bin/yasm diff --git a/tools/linux.amd64/bin/yasm b/tools/linux.amd64/bin/yasm Binary files differnew file mode 100755 index 00000000..ca1af98d --- /dev/null +++ b/tools/linux.amd64/bin/yasm diff --git a/tools/linux.x86/bin/yasm b/tools/linux.x86/bin/yasm Binary files differnew file mode 100755 index 00000000..13a3a80f --- /dev/null +++ b/tools/linux.x86/bin/yasm diff --git a/tools/os2.x86/bin/as86.exe b/tools/os2.x86/bin/as86.exe Binary files differnew file mode 100644 index 00000000..7f75ddb2 --- /dev/null +++ b/tools/os2.x86/bin/as86.exe diff --git a/tools/os2.x86/bin/iasl.exe b/tools/os2.x86/bin/iasl.exe Binary files differnew file mode 100644 index 00000000..5e83ee8d --- /dev/null +++ b/tools/os2.x86/bin/iasl.exe diff --git a/tools/os2.x86/bin/libexslt.dll b/tools/os2.x86/bin/libexslt.dll Binary files differnew file mode 100644 index 00000000..b8d12815 --- /dev/null +++ b/tools/os2.x86/bin/libexslt.dll diff --git a/tools/os2.x86/bin/libxml2.dll b/tools/os2.x86/bin/libxml2.dll Binary files differnew file mode 100644 index 00000000..8a90d9bb --- /dev/null +++ b/tools/os2.x86/bin/libxml2.dll diff --git a/tools/os2.x86/bin/libxslt.dll b/tools/os2.x86/bin/libxslt.dll Binary files differnew file mode 100644 index 00000000..dba8aae5 --- /dev/null +++ b/tools/os2.x86/bin/libxslt.dll diff --git a/tools/os2.x86/bin/xsltproc.exe b/tools/os2.x86/bin/xsltproc.exe Binary files differnew file mode 100644 index 00000000..cd009bd0 --- /dev/null +++ b/tools/os2.x86/bin/xsltproc.exe diff --git a/tools/os2.x86/nasm/v0.98.39-bird/AUTHORS b/tools/os2.x86/nasm/v0.98.39-bird/AUTHORS new file mode 100644 index 00000000..a82f85e0 --- /dev/null +++ b/tools/os2.x86/nasm/v0.98.39-bird/AUTHORS @@ -0,0 +1,119 @@ +This is the AUTHORS file for the NASM project located at: +http://nasm.2y.net/ + +Names should be inserted as follows: + +N: Name Here +E: Email Here +D: Description Here +D: Additional Description Here.... and so on + +Such is life. +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + +N: Julian Hall +E: Jules@acris.co.uk +D: Original author and co-conspirator + +N: Simon Tatham +E: anakin@pobox.com +D: Original author and co-conspirator + +N: Nelson Rush +E: palisade@users.sourceforge.net +D: Some guy. + +N: Frank Kotler +E: fbkotler@nettaxi.com +D: Bug smashing. +D: Documentation - "KATMAI" and "3DNow!" instructions supported by 0.98 +D: General coordination and moral support. + +N: Stephen Silver +E: nasm@argentum.freeserve.co.uk +D: Documentation - "3dNow!" instructions and misc. +D: insns.dat fixes and new instructions. + +N: AMD Inc. (names of developers here?) +E: +D: 3DNow instructions +D: New Athlon instructions +D: Makefile.vc fix + +N: John Coffman +E: johninsd@users.sourceforge.net +D: added Jcc optimizations; CPU level checks +D: bug fixes, compilation fixes + +N: Yuri Zaporogets +E: yuriz@users.sourceforge.net +D: RDOFF support + +N: H. Peter Anvin +E: hpa@zytor.com +D: Organized 0.98 release and Linux binaries; new CVS tree. + +N: John Fine +E: johnfine@earthlink.net +D: Preprocessor and OBJ (OMF) output format driver +D: Organized DOS versions of 0.98 release + +N: Kendall Bennet +E: KendallB@scitechsoft.com +D: NASM enhancements +D: macros +D: Syntax modifications + +N: Gary Clark +E: +D: AMD 3DNow! instructions + +N: Andrew Crabtree +E: +D: Debugging support + +N: Rafael R. Sevilla +E: dido@pacific.net.ph +D: RDF2HEX utility + +N: Jaime Tejedor Gómez, aka Metalbrain +E: metalbrain_coder@gmx.net +D: jecxz bug fix + +N: James Seter +E: pharos@zsnes.com +D: --POSTFIX, --PREFIX switches +D: ? + +N: Edward J. Beroset +E: beroset@mindspring.com +D: added %substr and %strlen + +N: Stanislav Karchebny, aka berkus, madfire, daemonhunter +E: madfire@users.sourceforge.net +D: multiple sections support for -fbin format +D: cvs maintenance +D: webpage at http://nasm.2y.net maintenance + +N: Debbie Wiles, aka debs +E: debs@dwiles.demon.co.uk +D: Work on docs, added undocumented instructions (esp SSE2 and 3D-Now!) +D: Added other documentation and tidied up docs +D: Added a few instructions to insns.dat and tidied it up. + +N: Trevor Woerner +E: FIXME +D: Quiet compiler warnings + +N: Michael K. Ter Louw +E: mterlo1 "at" uic "dot" edu +D: Multisection support for "-f bin" + +N: Martin Wawro +E: FIXME +D: stabs debug support for "-f elf" + +N: Alexei Frounze +E: alexfru@users.sourceforge.net +D: "-I" paths searched for "incbined" files +D: bugswatting diff --git a/tools/os2.x86/nasm/v0.98.39-bird/CHANGES b/tools/os2.x86/nasm/v0.98.39-bird/CHANGES new file mode 100644 index 00000000..f2590681 --- /dev/null +++ b/tools/os2.x86/nasm/v0.98.39-bird/CHANGES @@ -0,0 +1,1387 @@ +0.98.39 +------- +* fix buffer overflow +* fix outas86's .bss handling +* "make spotless" no longer deletes config.h.in. +* %(el)if(n)idn insensitivity to string quotes difference (#809300). +* (nasm.c) __OUTPUT_FORMAT__ changed to string value instead of symbol. + +0.98.38 +------- +* Add Makefile for 16-bit DOS binaries under OpenWatcom, and modify + mkdep.pl to be able to generate completely pathless dependencies, as + required by OpenWatcom wmake (it supports path searches, but not + explicit paths.) +* Fix the STR instruction. +* Fix the ELF output format, which was broken under certain + circumstances due to the addition of stabs support. +* Quick-fix Borland format debug-info for -f obj +* Fix for %rep with no arguments (#560568) +* Fix concatenation of preprocessor function call (#794686) +* Fix long label causes coredump (#677841) +* Use autoheader as well as autoconf to keep configure from generating + ridiculously long command lines. +* Make sure that all of the formats which support debugging output + actually will suppress debugging output when -g not specified. + +0.98.37 +------- +* Paths given in "-I" switch searched for "incbin"ed as + well as "%include"ed files. +* Added stabs debugging for the ELF output format, patch from + Martin Wawro. +* Fix output/outbin.c to allow origin > 80000000h. +* Make -U switch work. +* Fix the use of relative offsets with explicit prefixes, e.g. "a32 loop foo". +* Remove "backslash()". +* Fix the SMSW and SLDT instructions. +* -O2 and -O3 are no longer aliases for -O10 and -O15. If you mean the + latter, please say so! :) + +0.98.36 +------- +* Update rdoff - librarian/archiver - common rec - docs! +* Fix signed/unsigned problems. +* Fix JMP FAR label and CALL FAR label. +* Add new multisection support - map files - fix align bug +* Fix sysexit, movhps/movlps reg,reg bugs in insns.dat +* "Q" or "O" suffixes indicate octal +* Support Prescott new instructions (PNI). +* Cyrix XSTORE instruction. + +0.98.35 +------- +* Fix build failure on 16-bit DOS (Makefile.bc3 workaround for compiler bug.) +* Fix dependencies and compiler warnings. +* Add "const" in a number of places. +* Add -X option to specify error reporting format (use -Xvc to + integrate with Microsoft Visual Studio.) +* Minor changes for code legibility. +* Drop use of tmpnam() in rdoff (security fix.) + +0.98.34 +------- +* Correct additional address-size vs. operand-size confusions. +* Generate dependencies for all Makefiles automatically. +* Add support for unimplemented (but theoretically available) + registers such as tr0 and cr5. Segment registers 6 and 7 are called + segr6 and segr7 for the operations which they can be represented. +* Correct some disassembler bugs related to redundant address-size prefixes. + Some work still remains in this area. +* Correctly generate an error for things like "SEG eax". +* Add the JMPE instruction, enabled by "CPU IA64". +* Correct compilation on newer gcc/glibc platforms. +* Issue an error on things like "jmp far eax". + + +0.98.33 +------- + +* New __NASM_PATCHLEVEL__ and __NASM_VERSION_ID__ standard macros to + round out the version-query macros. version.pl now understands + X.YYplWW or X.YY.ZZplWW as a version number, equivalent to + X.YY.ZZ.WW (or X.YY.0.WW, as appropriate). +* New keyword "strict" to disable the optimization of specific + operands. +* Fix the handing of size overrides with JMP instructions + (instructions such as "jmp dword foo".) +* Fix the handling of "ABSOLUTE label", where "label" points into a + relocatable segment. +* Fix OBJ output format with lots of externs. +* More documentation updates. +* Add -Ov option to get verbose information about optimizations. +* Undo a braindead change which broke %elif directives. +* Makefile updates. + + +0.98.32 +------- + +* Fix NASM crashing when %macro directives were left unterminated. +* Lots of documentation updates. +* Complete rewrite of the PostScript/PDF documentation generator. +* The MS Visual C++ Makefile was updated and corrected. +* Recognize .rodata as a standard section name in ELF. +* Fix some obsolete Perl4-isms in Perl scripts. +* Fix configure.in to work with autoconf 2.5x. +* Fix a couple of "make cleaner" misses. +* Make the normal "./configure && make" work with Cygwin. + + +0.98.31 +------- + +* Correctly build in a separate object directory again. +* Derive all references to the version number from the version file. +* New standard macros __NASM_SUBMINOR__ and __NASM_VER__ macros. +* Lots of Makefile updates and bug fixes. +* New %ifmacro directive to test for multiline macros. +* Documentation updates. +* Fixes for 16-bit OBJ format output. +* Changed the NASM environment variable to NASMENV. + + +0.98.30 +------- + +* Changed doc files a lot: completely removed old READMExx and + Wishlist files, incorporating all information in CHANGES and TODO. +* I waited a long time to rename zoutieee.c to (original) outieee.c +* moved all output modules to output/ subdirectory. +* Added 'make strip' target to strip debug info from nasm & ndisasm. +* Added INSTALL file with installation instructions. +* Added -v option description to nasm man. +* Added dist makefile target to produce source distributions. +* 16-bit support for ELF output format (GNU extension, but useful.) + + +0.98.28 +------- + +* Fastcooked this for Debian's Woody release: +Frank applied the INCBIN bug patch to 0.98.25alt and called +it 0.98.28 to not confuse poor little apt-get. + + +0.98.26 +------- + +* Reorganised files even better from 0.98.25alt + + +0.98.25alt +---------- + +* Prettified the source tree. Moved files to more reasonable places. +* Added findleak.pl script to misc/ directory. +* Attempted to fix doc. + +0.98.25 +------- + +* Line continuation character '\' +* Docs inadvertantly reverted - "dos packaging". + + +0.98.24p1 +--------- + +* FIXME: Someone, document this please. + + +0.98.24 +------- + +* Documentation - Ndisasm doc added to Nasm.doc. + + +0.98.23 +------- + +* Attempted to remove rdoff version1 +* Lino Mastrodomenico's patches to preproc.c (%$$ bug?). + + +0.98.22 +------- + +* Update rdoff2 - attempt to remove v1. + + +0.98.21 +------- + +* Optimization fixes. + + +0.98.20 +------- + +* Optimization fixes. + + +0.98.19 +------- + +* H. J. Lu's patch back out. + + +0.98.18 +------- + +* Added ".rdata" to "-f win32". + + +0.98.17 +------- + +* H. J. Lu's "bogus elf" patch. (Red Hat problem?) + + +0.98.16 +------- + +* Fix whitespace before "[section ..." bug. + +0.98.15 +------- + +* Rdoff changes (?). +* Fix fixes to memory leaks. + +0.98.14 +------- + +* Fix memory leaks. +* (there was no '.13) + +0.98.12 +------- + +* Update optimization (new function of "-O1") +* Changes to test/bintest.asm (?). + +0.98.11 +------- + +* Optimization changes. +* Ndisasm fixed. +* (there was no '.10) + +0.98.09 +------- + +* Add multiple sections support to "-f bin". +* Changed GLOBAL_TEMP_BASE in outelf.c from 6 to 15. +* Add "-v" as an alias to the "-r" switch. +* Remove "#ifdef" from Tasm compatibility options. +* Remove redundant size-overrides on "mov ds, ex", etc. +* Fixes to SSE2, other insns.dat (?). +* Enable uppercase "I" and "P" switches. +* Case insinsitive "seg" and "wrt". +* Update install.sh (?). +* Allocate tokens in blocks. +* Improve "invalid effective address" messages. + +0.98.08 +------- + +* Add "%strlen" and "%substr" macro operators +* Fixed broken c16.mac. +* Unterminated string error reported. +* Fixed bugs as per 0.98bf + + +0.98.09b with John Coffman patches released 28-Oct-2001 +------------------------------------------------------- + +Changes from 0.98.07 release to 98.09b as of 28-Oct-2001 + +* More closely compatible with 0.98 when -O0 is implied +or specified. Not strictly identical, since backward +branches in range of short offsets are recognized, and signed +byte values with no explicit size specification will be +assembled as a single byte. + +* More forgiving with the PUSH instruction. 0.98 requires +a size to be specified always. 0.98.09b will imply the size +from the current BITS setting (16 or 32). + +* Changed definition of the optimization flag: + + -O0 strict two-pass assembly, JMP and Jcc are + handled more like 0.98, except that back- + ward JMPs are short, if possible. + + -O1 strict two-pass assembly, but forward + branches are assembled with code guaranteed + to reach; may produce larger code than + -O0, but will produce successful assembly + more often if branch offset sizes are not + specified. + + -O2 multi-pass optimization, minimize branch + offsets; also will minimize signed immed- + iate bytes, overriding size specification. + + -O3 like -O2, but more passes taken, if needed + + +0.98.07 released 01/28/01 +------------------------- + +* Added Stepane Denis' SSE2 instructions to a *working* + version of the code - some earlier versions were based on + broken code - sorry 'bout that. version "0.98.07" + + +01/28/01 +-------- + +* Cosmetic modifications to nasm.c, nasm.h, + AUTHORS, MODIFIED + + +0.98.06f released 01/18/01 +-------------------------- + +* - Add "metalbrain"s jecxz bug fix in insns.dat + - alter nasmdoc.src to match - version "0.98.06f" + + +0.98.06e released 01/09/01 +-------------------------- + +* Removed the "outforms.h" file - it appears to be + someone's old backup of "outform.h". version "0.98.06e" + + +01/09/01 +-------- + +* fbk - finally added the fix for the "multiple %includes bug", + known since 7/27/99 - reported originally (?) and sent to + us by Austin Lunnen - he reports that John Fine had a fix + within the day. Here it is... + +* Nelson Rush resigns from the group. Big thanks to Nelson for + his leadership and enthusiasm in getting these changes + incorporated into Nasm! + +* fbk - [list +], [list -] directives - ineptly implemented, should + be re-written or removed, perhaps. + +* Brian Raiter / fbk - "elfso bug" fix - applied to aoutb format + as well - testing might be desirable... + + +08/07/00 +-------- + +* James Seter - -postfix, -prefix command line switches. +* Yuri Zaporogets - rdoff utility changes. + + +0.98p1 +------ + +* GAS-like palign (Panos Minos) +* FIXME: Someone, fill this in with details + + +0.98bf (bug-fixed) +---------------------------------- + +* Fixed - elf and aoutb bug - shared libraries + - multiple "%include" bug in "-f obj" + - jcxz, jecxz bug + - unrecognized option bug in ndisasm + +0.98.03 with John Coffman's changes released 27-Jul-2000 +-------------------------------------------------------- + +* Added signed byte optimizations for the 0x81/0x83 class +of instructions: ADC, ADD, AND, CMP, OR, SBB, SUB, XOR: +when used as 'ADD reg16,imm' or 'ADD reg32,imm.' Also +optimization of signed byte form of 'PUSH imm' and 'IMUL +reg,imm'/'IMUL reg,reg,imm.' No size specification is needed. + +* Added multi-pass JMP and Jcc offset optimization. Offsets +on forward references will preferentially use the short form, +without the need to code a specific size (short or near) for +the branch. Added instructions for 'Jcc label' to use the +form 'Jnotcc $+3/JMP label', in cases where a short offset +is out of bounds. If compiling for a 386 or higher CPU, then +the 386 form of Jcc will be used instead. + +This feature is controlled by a new command-line switch: "O", +(upper case letter O). "-O0" reverts the assembler to no +extra optimization passes, "-O1" allows up to 5 extra passes, +and "-O2"(default), allows up to 10 extra optimization passes. + +* Added a new directive: 'cpu XXX', where XXX is any of: +8086, 186, 286, 386, 486, 586, pentium, 686, PPro, P2, P3 or +Katmai. All are case insensitive. All instructions will +be selected only if they apply to the selected cpu or lower. +Corrected a couple of bugs in cpu-dependence in 'insns.dat'. + +* Added to 'standard.mac', the "use16" and "use32" forms of +the "bits 16/32" directive. This is nothing new, just conforms +to a lot of other assemblers. (minor) + +* Changed label allocation from 320/32 (10000 labels @ 200K+) +to 32/37 (1000 labels); makes running under DOS much easier. +Since additional label space is allocated dynamically, this +should have no effect on large programs with lots of labels. +The 37 is a prime, believed to be better for hashing. (minor) + +* Integrated patchfile 0.98-0.98.01. I call this version +0.98.03, for historical reasons: 0.98.02 was trashed. + +--John Coffman <johninsd@san.rr.com> 27-Jul-2000 + + +Kendall Bennett's SciTech MGL changes +------------------------------------- +Note that you must define "TASM_COMPAT" at compile-time +to get the Tasm Ideal Mode compatibility. + +All changes can be compiled in and out using the TASM_COMPAT macros, +and when compiled without TASM_COMPAT defined we get the exact same +binary as the unmodified 0.98 sources. + +standard.mac, macros.c: + . Added macros to ignore TASM directives before first include + +nasm.h: + . Added extern declaration for tasm_compatible_mode + +nasm.c: + . Added global variable tasm_compatible_mode + . Added command line switch for TASM compatible mode (-t) + . Changed version command line to reflect when compiled with TASM additions + . Added response file processing to allow all arguments on a single + line (response file is @resp rather than -@resp for NASM format). + +labels.c: + . Changes islocal() macro to support TASM style @@local labels. + . Added islocalchar() macro to support TASM style @@local labels. + +parser.c: + . Added support for TASM style memory references (ie: mov [DWORD eax],10 + rather than the NASM style mov DWORD [eax],10). + +preproc.c: + . Added new directives, %arg, %local, %stacksize to directives table + . Added support for TASM style directives without a leading % symbol. + +Integrated a block of changes from Andrew Zabolotny <bit@eltech.ru>: + +* A new keyword %xdefine and its case-insensitive counterpart %ixdefine. + They work almost the same way as %define and %idefine but expand + the definition immediately, not on the invocation. Something like a cross + between %define and %assign. The "x" suffix stands for "eXpand", so + "xdefine" can be deciphered as "expand-and-define". Thus you can do + things like this: + + %assign ofs 0 + + %macro arg 1 + %xdefine %1 dword [esp+ofs] + %assign ofs ofs+4 + %endmacro + +* Changed the place where the expansion of %$name macros are expanded. + Now they are converted into ..@ctxnum.name form when detokenizing, so + there are no quirks as before when using %$name arguments to macros, + in macros etc. For example: + + %macro abc 1 + %define %1 hello + %endm + + abc %$here + %$here + + Now last line will be expanded into "hello" as expected. This also allows + for lots of goodies, a good example are extended "proc" macros included + in this archive. + +* Added a check for "cstk" in smacro_defined() before calling get_ctx() - + this allows for things like: + + %ifdef %$abc + %endif + + to work without warnings even in no context. + +* Added a check for "cstk" in %if*ctx and %elif*ctx directives - + this allows to use %ifctx without excessive warnings. If there is + no active context, %ifctx goes through "false" branch. + +* Removed "user error: " prefix with %error directive: it just clobbers the + output and has absolutely no functionality. Besides, this allows to write + macros that does not differ from built-in functions in any way. + +* Added expansion of string that is output by %error directive. Now you + can do things like: + + %define hello(x) Hello, x! + + %define %$name andy + %error "hello(%$name)" + + Same happened with %include directive. + +* Now all directives that expect an identifier will try to expand and + concatenate everything without whitespaces in between before usage. + For example, with "unfixed" nasm the commands + + %define %$abc hello + %define __%$abc goodbye + __%$abc + + would produce "incorrect" output: last line will expand to + + hello goodbyehello + + Not quite what you expected, eh? :-) The answer is that preprocessor + treats the %define construct as if it would be + + %define __ %$abc goodbye + + (note the white space between __ and %$abc). After my "fix" it + will "correctly" expand into + + goodbye + + as expected. Note that I use quotes around words "correct", "incorrect" + etc because this is rather a feature not a bug; however current behaviour + is more logical (and allows more advanced macro usage :-). + + Same change was applied to: + %push,%macro,%imacro,%define,%idefine,%xdefine,%ixdefine, + %assign,%iassign,%undef + +* A new directive [WARNING {+|-}warning-id] have been added. It works only + if the assembly phase is enabled (i.e. it doesn't work with nasm -e). + +* A new warning type: macro-selfref. By default this warning is disabled; + when enabled NASM warns when a macro self-references itself; for example + the following source: + + [WARNING macro-selfref] + + %macro push 1-* + %rep %0 + push %1 + %rotate 1 + %endrep + %endmacro + + push eax,ebx,ecx + + will produce a warning, but if we remove the first line we won't see it + anymore (which is The Right Thing To Do {tm} IMHO since C preprocessor + eats such constructs without warnings at all). + +* Added a "error" routine to preprocessor which always will set ERR_PASS1 + bit in severity_code. This removes annoying repeated errors on first + and second passes from preprocessor. + +* Added the %+ operator in single-line macros for concatenating two + identifiers. Usage example: + + %define _myfunc _otherfunc + %define cextern(x) _ %+ x + cextern (myfunc) + + After first expansion, third line will become "_myfunc". After this + expansion is performed again so it becomes "_otherunc". + +* Now if preprocessor is in a non-emmitting state, no warning or error + will be emmitted. Example: + + %if 1 + mov eax,ebx + %else + put anything you want between these two brackets, + even macro-parameter references %1 or local labels %$zz + or macro-local labels %%zz - no warning will be emmitted. + %endif + +* Context-local variables on expansion as a last resort are looked up + in outer contexts. For example, the following piece: + + %push outer + %define %$a [esp] + + %push inner + %$a + %pop + %pop + + will expand correctly the fourth line to [esp]; if we'll define another + %$a inside the "inner" context, it will take precedence over outer + definition. However, this modification has been applied only to + expand_smacro and not to smacro_define: as a consequence expansion + looks in outer contexts, but %ifdef won't look in outer contexts. + + This behaviour is needed because we don't want nested contexts to + act on already defined local macros. Example: + + %define %$arg1 [esp+4] + test eax,eax + if nz + mov eax,%$arg1 + endif + + In this example the "if" mmacro enters into the "if" context, so %$arg1 + is not valid anymore inside "if". Of course it could be worked around + by using explicitely %$$arg1 but this is ugly IMHO. + +* Fixed memory leak in %undef. The origline wasn't freed before + exiting on success. + +* Fixed trap in preprocessor when line expanded to empty set of tokens. + This happens, for example, in the following case: + + #define SOMETHING + SOMETHING + + +0.98 +---- + +All changes since NASM 0.98p3 have been produced by H. Peter Anvin <hpa@zytor.com>. + +* The documentation comment delimiter is \# not #. +* Allow EQU definitions to refer to external labels; reported by + Pedro Gimeno. +* Re-enable support for RDOFF v1; reported by Pedro Gimeno. +* Updated License file per OK from Simon and Julian. + + +0.98p9 +------ + +* Update documentation (although the instruction set reference will + have to wait; I don't want to hold up the 0.98 release for it.) +* Verified that the NASM implementation of the PEXTRW and PMOVMSKB + instructions is correct. The encoding differs from what the Intel + manuals document, but the Pentium III behaviour matches NASM, not + the Intel manuals. +* Fix handling of implicit sizes in PSHUFW and PINSRW, reported by + Stefan Hoffmeister. +* Resurrect the -s option, which was removed when changing the + diagnostic output to stdout. + + +0.98p8 +------ + +* Fix for "DB" when NASM is running on a bigendian machine. +* Invoke insns.pl once for each output script, making Makefile.in + legal for "make -j". +* Improve the Unix configure-based makefiles to make package + creation easier. +* Included an RPM .spec file for building RPM (RedHat Package Manager) + packages on Linux or Unix systems. +* Fix Makefile dependency problems. +* Change src/rdsrc.pl to include sectioning information in info + output; required for install-info to work. +* Updated the RDOFF distribution to version 2 from Jules; minor + massaging to make it compile in my environment. +* Split doc files that can be built by anyone with a Perl interpreter off + into a separate archive. +* "Dress rehearsal" release! + + +0.98p7 +------ + +* Fixed opcodes with a third byte-sized immediate argument to not + complain if given "byte" on the immediate. +* Allow %undef to remove single-line macros with arguments. This + matches the behaviour of #undef in the C preprocessor. +* Allow -d, -u, -i and -p to be specified as -D, -U, -I and -P for + compatibility with most C compilers and preprocessors. This allows + Makefile options to be shared between cc and nasm, for example. +* Minor cleanups. +* Went through the list of Katmai instructions and hopefully fixed the + (rather few) mistakes in it. +* (Hopefully) fixed a number of disassembler bugs related to ambiguous + instructions (disambiguated by -p) and SSE instructions with REP. +* Fix for bug reported by Mark Junger: "call dword 0x12345678" should + work and may add an OSP (affected CALL, JMP, Jcc). +* Fix for environments when "stderr" isn't a compile-time constant. + + +0.98p6 +------ + +* Took officially over coordination of the 0.98 release; so drop + the p3.x notation. Skipped p4 and p5 to avoid confusion with John + Fine's J4 and J5 releases. +* Update the documentation; however, it still doesn't include + documentation for the various new instructions. I somehow wonder if + it makes sense to have an instruction set reference in the assembler + manual when Intel et al have PDF versions of their manuals online. +* Recognize "idt" or "centaur" for the -p option to ndisasm. +* Changed error messages back to stderr where they belong, but add an + -E option to redirect them elsewhere (the DOS shell cannot redirect + stderr.) +* -M option to generate Makefile dependencies (based on code from Alex + Verstak.) +* %undef preprocessor directive, and -u option, that undefines a + single-line macro. +* OS/2 Makefile (Mkfiles/Makefile.os2) for Borland under OS/2; from + Chuck Crayne. +* Various minor bugfixes (reported by): + - Dangling %s in preproc.c (Martin Junker) +* THERE ARE KNOWN BUGS IN SSE AND THE OTHER KATMAI INSTRUCTIONS. I am + on a trip and didn't bring the Katmai instruction reference, so I + can't work on them right now. +* Updated the License file per agreement with Simon and Jules to + include a GPL distribution clause. + + +0.98p3.7 +-------- + +* (Hopefully) fixed the canned Makefiles to include the outrdf2 and + zoutieee modules. +* Renamed changes.asm to changed.asm. + + +0.98p3.6 +-------- + +* Fixed a bunch of instructions that were added in 0.98p3.5 which had + memory operands, and the address-size prefix was missing from the + instruction pattern. + + +0.98p3.5 +-------- + +* Merged in changes from John S. Fine's 0.98-J5 release. John's based + 0.98-J5 on my 0.98p3.3 release; this merges the changes. +* Expanded the instructions flag field to a long so we can fit more + flags; mark SSE (KNI) and AMD or Katmai-specific instructions as + such. +* Fix the "PRIV" flag on a bunch of instructions, and create new + "PROT" flag for protected-mode-only instructions (orthogonal to if + the instruction is privileged!) and new "SMM" flag for SMM-only + instructions. +* Added AMD-only SYSCALL and SYSRET instructions. +* Make SSE actually work, and add new Katmai MMX instructions. +* Added a -p (preferred vendor) option to ndisasm so that it can + distinguish e.g. Cyrix opcodes also used in SSE. For example: + + ndisasm -p cyrix aliased.bin + 00000000 670F514310 paddsiw mm0,[ebx+0x10] + 00000005 670F514320 paddsiw mm0,[ebx+0x20] + ndisasm -p intel aliased.bin + 00000000 670F514310 sqrtps xmm0,[ebx+0x10] + 00000005 670F514320 sqrtps xmm0,[ebx+0x20] +* Added a bunch of Cyrix-specific instructions. + + +0.98p3.4 +-------- + +* Made at least an attempt to modify all the additional Makefiles (in + the Mkfiles directory). I can't test it, but this was the best I + could do. +* DOS DJGPP+"Opus Make" Makefile from John S. Fine. +* changes.asm changes from John S. Fine. + + +0.98p3.3 +-------- + +* Patch from Conan Brink to allow nesting of %rep directives. +* If we're going to allow INT01 as an alias for INT1/ICEBP (one of + Jules 0.98p3 changes), then we should allow INT03 as an alias for INT3 + as well. +* Updated changes.asm to include the latest changes. +* Tried to clean up the <CR>s that had snuck in from a DOS/Windows + environment into my Unix environment, and try to make sure than + DOS/Windows users get them back. +* We would silently generate broken tools if insns.dat wasn't sorted + properly. Change insns.pl so that the order doesn't matter. +* Fix bug in insns.pl (introduced by me) which would cause conditional + instructions to have an extra "cc" in disassembly, e.g. "jnz" + disassembled as "jccnz". + + +0.98p3.2 +-------- + +* Merged in John S. Fine's changes from his 0.98-J4 prerelease; see + http://www.csoft.net/cz/johnfine/ +* Changed previous "spotless" Makefile target (appropriate for distribution) + to "distclean", and added "cleaner" target which is same as "clean" + except deletes files generated by Perl scripts; "spotless" is union. +* Removed BASIC programs from distribution. Get a Perl interpreter + instead (see below.) +* Calling this "pre-release 3.2" rather than "p3-hpa2" because of + John's contributions. +* Actually link in the IEEE output format (zoutieee.c); fix a bunch of + compiler warnings in that file. Note I don't know what IEEE output + is supposed to look like, so these changes were made "blind". + + +0.98p3-hpa +---------- + +* Merged nasm098p3.zip with nasm-0.97.tar.gz to create a fully + buildable version for Unix systems (Makefile.in updates, etc.) +* Changed insns.pl to create the instruction tables in nasm.h and + names.c, so that a new instruction can be added by adding it *only* + to insns.dat. +* Added the following new instructions: SYSENTER, SYSEXIT, FXSAVE, + FXRSTOR, UD1, UD2 (the latter two are two opcodes that Intel + guarantee will never be used; one of them is documented as UD2 in + Intel documentation, the other one just as "Undefined Opcode" -- + calling it UD1 seemed to make sense.) +* MAX_SYMBOL was defined to be 9, but LOADALL286 and LOADALL386 are 10 + characters long. Now MAX_SYMBOL is derived from insns.dat. +* A note on the BASIC programs included: forget them. insns.bas is + already out of date. Get yourself a Perl interpreter for your + platform of choice at: + + http://www.cpan.org/ports/index.html + + +0.98 pre-release 3 +------------------- + +added response file support, improved command line handling, new layout +help screen + +fixed limit checking bug, 'OUT byte nn, reg' bug, and a couple of rdoff +related bugs, updated Wishlist; 0.98 Prerelease 3. + + +0.98 pre-release 2 +------------------- + +fixed bug in outcoff.c to do with truncating section names longer +than 8 characters, referencing beyond end of string; 0.98 pre-release 2 + + +0.98 pre-released May 1999 +-------------------------- + +Fixed a bug whereby STRUC didn't work at all in RDF. + +Fixed a problem with group specification in PUBDEFs in OBJ. + +Improved ease of adding new output formats. Contribution due to +Fox Cutter. + +Fixed a bug in relocations in the `bin' format: was showing up when +a relocatable reference crossed an 8192-byte boundary in any output +section. + +Fixed a bug in local labels: local-label lookups were inconsistent +between passes one and two if an EQU occurred between the definition +of a global label and the subsequent use of a local label local to +that global. + +Fixed a seg-fault in the preprocessor (again) which happened when +you use a blank line as the first line of a multi-line macro +definition and then defined a label on the same line as a call to +that macro. + +Fixed a stale-pointer bug in the handling of the NASM environment +variable. Thanks to Thomas McWilliams. + +ELF had a hard limit on the number of sections which caused +segfaults when transgressed. Fixed. + +Added ability for ndisasm to read from stdin by using `-' as the +filename. + +ndisasm wasn't outputting the TO keyword. Fixed. + +Fixed error cascade on bogus expression in %if - an error in +evaluation was causing the entire %if to be discarded, thus creating +trouble later when the %else or %endif was encountered. + +Forward reference tracking was instruction-granular not operand- +granular, which was causing 286-specific code to be generated +needlessly on code of the form `shr word [forwardref],1'. Thanks to +Jim Hague for sending a patch. + +All messages now appear on stdout, as sending them to stderr serves +no useful purpose other than to make redirection difficult. + +Fixed the problem with EQUs pointing to an external symbol - this +now generates an error message. + +Allowed multiple size prefixes to an operand, of which only the first +is taken into account. + +Incorporated John Fine's changes, including fixes of a large number +of preprocessor bugs, some small problems in OBJ, and a reworking of +label handling to define labels before their line is assembled, rather +than after. + +Reformatted a lot of the source code to be more readable. Included +'coding.txt' as a guideline for how to format code for contributors. + +Stopped nested %reps causing a panic - they now cause a slightly more +friendly error message instead. + +Fixed floating point constant problems (patch by Pedro Gimeno) + +Fixed the return value of insn_size() not being checked for -1, indicating +an error. + +Incorporated 3D now instructions. + +Fixed the 'mov eax, eax + ebx' bug. + +Fixed the GLOBAL EQU bug in ELF. Released developers release 3. + +Incorporated John Fine's command line parsing changes + +Incorporated David Lindauer's OMF debug support + +Made changes for LCC 4.0 support (__NASM_CDecl__, removed register size +specification warning when sizes agree). + +Released NASM 0.98 Pre-release 1 + + +0.97 released December 1997 +--------------------------- + +This was entirely a bug-fix release to 0.96, which seems to have got +cursed. Silly me. + +Fixed stupid mistake in OBJ which caused `MOV EAX,<constant>' to +fail. Caused by an error in the `MOV EAX,<segment>' support. + +ndisasm hung at EOF when compiled with lcc on Linux because lcc on +Linux somehow breaks feof(). ndisasm now does not rely on feof(). + +A heading in the documentation was missing due to a markup error in +the indexing. Fixed. + +Fixed failure to update all pointers on realloc() within extended- +operand code in parser.c. Was causing wrong behaviour and seg faults +on lines such as `dd 0.0,0.0,0.0,0.0,...' + +Fixed a subtle preprocessor bug whereby invoking one multi-line +macro on the first line of the expansion of another, when the second +had been invoked with a label defined before it, didn't expand the +inner macro. + +Added internal.doc back in to the distribution archives - it was +missing in 0.96 *blush* + +Fixed bug causing 0.96 to be unable to assemble its own test files, +specifically objtest.asm. *blush again* + +Fixed seg-faults and bogus error messages caused by mismatching +%rep and %endrep within multi-line macro definitions. + +Fixed a problem with buffer overrun in OBJ, which was causing +corruption at ends of long PUBDEF records. + +Separated DOS archives into main-program and documentation to reduce +download size. + + +0.96 released November 1997 +--------------------------- + +Fixed a bug whereby, if `nasm sourcefile' would cause a filename +collision warning and put output into `nasm.out', then `nasm +sourcefile -o outputfile' still gave the warning even though the +`-o' was honoured. + +Fixed name pollution under Digital UNIX: one of its header files +defined R_SP, which broke the enum in nasm.h. + +Fixed minor instruction table problems: FUCOM and FUCOMP didn't have +two-operand forms; NDISASM didn't recognise the longer register +forms of PUSH and POP (eg FF F3 for PUSH BX); TEST mem,imm32 was +flagged as undocumented; the 32-bit forms of CMOV had 16-bit operand +size prefixes; `AAD imm' and `AAM imm' are no longer flagged as +undocumented because the Intel Architecture reference documents +them. + +Fixed a problem with the local-label mechanism, whereby strange +types of symbol (EQUs, auto-defined OBJ segment base symbols) +interfered with the `previous global label' value and screwed up +local labels. + +Fixed a bug whereby the stub preprocessor didn't communicate with +the listing file generator, so that the -a and -l options in +conjunction would produce a useless listing file. + +Merged `os2' object file format back into `obj', after discovering +that `obj' _also_ shouldn't have a link pass separator in a module +containing a non-trivial MODEND. Flat segments are now declared +using the FLAT attribute. `os2' is no longer a valid object format +name: use `obj'. + +Removed the fixed-size temporary storage in the evaluator. Very very +long expressions (like `mov ax,1+1+1+1+...' for two hundred 1s or +so) should now no longer crash NASM. + +Fixed a bug involving segfaults on disassembly of MMX instructions, +by changing the meaning of one of the operand-type flags in nasm.h. +This may cause other apparently unrelated MMX problems; it needs to +be tested thoroughly. + +Fixed some buffer overrun problems with large OBJ output files. +Thanks to DJ Delorie for the bug report and fix. + +Made preprocess-only mode actually listen to the %line markers as it +prints them, so that it can report errors more sanely. + +Re-designed the evaluator to keep more sensible track of expressions +involving forward references: can now cope with previously-nightmare +situations such as + mov ax,foo | bar + foo equ 1 + bar equ 2 + +Added the ALIGN and ALIGNB standard macros. + +Added PIC support in ELF: use of WRT to obtain the four extra +relocation types needed. + +Added the ability for output file formats to define their own +extensions to the GLOBAL, COMMON and EXTERN directives. + +Implemented common-variable alignment, and global-symbol type and +size declarations, in ELF. + +Implemented NEAR and FAR keywords for common variables, plus +far-common element size specification, in OBJ. + +Added a feature whereby EXTERNs and COMMONs in OBJ can be given a +default WRT specification (either a segment or a group). + +Transformed the Unix NASM archive into an auto-configuring package. + +Added a sanity-check for people applying SEG to things which are +already segment bases: this previously went unnoticed by the SEG +processing and caused OBJ-driver panics later. + +Added the ability, in OBJ format, to deal with `MOV EAX,<segment>' +type references: OBJ doesn't directly support dword-size segment +base fixups, but as long as the low two bytes of the constant term +are zero, a word-size fixup can be generated instead and it will +work. + +Added the ability to specify sections' alignment requirements in +Win32 object files and pure binary files. + +Added preprocess-time expression evaluation: the %assign (and +%iassign) directive and the bare %if (and %elif) conditional. Added +relational operators to the evaluator, for use only in %if +constructs: the standard relationals = < > <= >= <> (and C-like +synonyms == and !=) plus low-precedence logical operators &&, ^^ and +||. + +Added a preprocessor repeat construct: %rep / %exitrep / %endrep. + +Added the __FILE__ and __LINE__ standard macros. + +Added a sanity check for number constants being greater than +0xFFFFFFFF. The warning can be disabled. + +Added the %0 token whereby a variadic multi-line macro can tell how +many parameters it's been given in a specific invocation. + +Added %rotate, allowing multi-line macro parameters to be cycled. + +Added the `*' option for the maximum parameter count on multi-line +macros, allowing them to take arbitrarily many parameters. + +Added the ability for the user-level forms of EXTERN, GLOBAL and +COMMON to take more than one argument. + +Added the IMPORT and EXPORT directives in OBJ format, to deal with +Windows DLLs. + +Added some more preprocessor %if constructs: %ifidn / %ifidni (exact +textual identity), and %ifid / %ifnum / %ifstr (token type testing). + +Added the ability to distinguish SHL AX,1 (the 8086 version) from +SHL AX,BYTE 1 (the 286-and-upwards version whose constant happens to +be 1). + +Added NetBSD/FreeBSD/OpenBSD's variant of a.out format, complete +with PIC shared library features. + +Changed NASM's idiosyncratic handling of FCLEX, FDISI, FENI, FINIT, +FSAVE, FSTCW, FSTENV, and FSTSW to bring it into line with the +otherwise accepted standard. The previous behaviour, though it was a +deliberate feature, was a deliberate feature based on a +misunderstanding. Apologies for the inconvenience. + +Improved the flexibility of ABSOLUTE: you can now give it an +expression rather than being restricted to a constant, and it can +take relocatable arguments as well. + +Added the ability for a variable to be declared as EXTERN multiple +times, and the subsequent definitions are just ignored. + +We now allow instruction prefixes (CS, DS, LOCK, REPZ etc) to be +alone on a line (without a following instruction). + +Improved sanity checks on whether the arguments to EXTERN, GLOBAL +and COMMON are valid identifiers. + +Added misc/exebin.mac to allow direct generation of .EXE files by +hacking up an EXE header using DB and DW; also added test/binexe.asm +to demonstrate the use of this. Thanks to Yann Guidon for +contributing the EXE header code. + +ndisasm forgot to check whether the input file had been successfully +opened. Now it does. Doh! + +Added the Cyrix extensions to the MMX instruction set. + +Added a hinting mechanism to allow [EAX+EBX] and [EBX+EAX] to be +assembled differently. This is important since [ESI+EBP] and +[EBP+ESI] have different default base segment registers. + +Added support for the PharLap OMF extension for 4096-byte segment +alignment. + + +0.95 released July 1997 +----------------------- + +Fixed yet another ELF bug. This one manifested if the user relied on +the default segment, and attempted to define global symbols without +first explicitly declaring the target segment. + +Added makefiles (for NASM and the RDF tools) to build Win32 console +apps under Symantec C++. Donated by Mark Junker. + +Added `macros.bas' and `insns.bas', QBasic versions of the Perl +scripts that convert `standard.mac' to `macros.c' and convert +`insns.dat' to `insnsa.c' and `insnsd.c'. Also thanks to Mark +Junker. + +Changed the diassembled forms of the conditional instructions so +that JB is now emitted as JC, and other similar changes. Suggested +list by Ulrich Doewich. + +Added `@' to the list of valid characters to begin an identifier +with. + +Documentary changes, notably the addition of the `Common Problems' +section in nasm.doc. + +Fixed a bug relating to 32-bit PC-relative fixups in OBJ. + +Fixed a bug in perm_copy() in labels.c which was causing exceptions +in cleanup_labels() on some systems. + +Positivity sanity check in TIMES argument changed from a warning to +an error following a further complaint. + +Changed the acceptable limits on byte and word operands to allow +things like `~10111001b' to work. + +Fixed a major problem in the preprocessor which caused seg-faults if +macro definitions contained blank lines or comment-only lines. + +Fixed inadequate error checking on the commas separating the +arguments to `db', `dw' etc. + +Fixed a crippling bug in the handling of macros with operand counts +defined with a `+' modifier. + +Fixed a bug whereby object file formats which stored the input file +name in the output file (such as OBJ and COFF) weren't doing so +correctly when the output file name was specified on the command +line. + +Removed [INC] and [INCLUDE] support for good, since they were +obsolete anyway. + +Fixed a bug in OBJ which caused all fixups to be output in 16-bit +(old-format) FIXUPP records, rather than putting the 32-bit ones in +FIXUPP32 (new-format) records. + +Added, tentatively, OS/2 object file support (as a minor variant on +OBJ). + +Updates to Fox Cutter's Borland C makefile, Makefile.bc2. + +Removed a spurious second fclose() on the output file. + +Added the `-s' command line option to redirect all messages which +would go to stderr (errors, help text) to stdout instead. + +Added the `-w' command line option to selectively suppress some +classes of assembly warning messages. + +Added the `-p' pre-include and `-d' pre-define command-line options. + +Added an include file search path: the `-i' command line option. + +Fixed a silly little preprocessor bug whereby starting a line with a +`%!' environment-variable reference caused an `unknown directive' +error. + +Added the long-awaited listing file support: the `-l' command line +option. + +Fixed a problem with OBJ format whereby, in the absence of any +explicit segment definition, non-global symbols declared in the +implicit default segment generated spurious EXTDEF records in the +output. + +Added the NASM environment variable. + +From this version forward, Win32 console-mode binaries will be +included in the DOS distribution in addition to the 16-bit binaries. +Added Makefile.vc for this purpose. + +Added `return 0;' to test/objlink.c to prevent compiler warnings. + +Added the __NASM_MAJOR__ and __NASM_MINOR__ standard defines. + +Added an alternative memory-reference syntax in which prefixing an +operand with `&' is equivalent to enclosing it in square brackets, +at the request of Fox Cutter. + +Errors in pass two now cause the program to return a non-zero error +code, which they didn't before. + +Fixed the single-line macro cycle detection, which didn't work at +all on macros with no parameters (caused an infinite loop). Also +changed the behaviour of single-line macro cycle detection to work +like cpp, so that macros like `extrn' as given in the documentation +can be implemented. + +Fixed the implementation of WRT, which was too restrictive in that +you couldn't do `mov ax,[di+abc wrt dgroup]' because (di+abc) wasn't +a relocatable reference. + + +0.94 released April 1997 +------------------------ + +Major item: added the macro processor. + +Added undocumented instructions SMI, IBTS, XBTS and LOADALL286. Also +reorganised CMPXCHG instruction into early-486 and Pentium forms. +Thanks to Thobias Jones for the information. + +Fixed two more stupid bugs in ELF, which were causing `ld' to +continue to seg-fault in a lot of non-trivial cases. + +Fixed a seg-fault in the label manager. + +Stopped FBLD and FBSTP from _requiring_ the TWORD keyword, which is +the only option for BCD loads/stores in any case. + +Ensured FLDCW, FSTCW and FSTSW can cope with the WORD keyword, if +anyone bothers to provide it. Previously they complained unless no +keyword at all was present. + +Some forms of FDIV/FDIVR and FSUB/FSUBR were still inverted: a +vestige of a bug that I thought had been fixed in 0.92. This was +fixed, hopefully for good this time... + +Another minor phase error (insofar as a phase error can _ever_ be +minor) fixed, this one occurring in code of the form + rol ax,forward_reference + forward_reference equ 1 + +The number supplied to TIMES is now sanity-checked for positivity, +and also may be greater than 64K (which previously didn't work on +16-bit systems). + +Added Watcom C makefiles, and misc/pmw.bat, donated by Dominik Behr. + +Added the INCBIN pseudo-opcode. + +Due to the advent of the preprocessor, the [INCLUDE] and [INC] +directives have become obsolete. They are still supported in this +version, with a warning, but won't be in the next. + +Fixed a bug in OBJ format, which caused incorrect object records to +be output when absolute labels were made global. + +Updates to RDOFF subdirectory, and changes to outrdf.c. + + +0.93 released January 1997 +-------------------------- + +This release went out in a great hurry after semi-crippling bugs +were found in 0.92. + +Really _did_ fix the stack overflows this time. *blush* + +Had problems with EA instruction sizes changing between passes, when +an offset contained a forward reference and so 4 bytes were +allocated for the offset in pass one; by pass two the symbol had +been defined and happened to be a small absolute value, so only 1 +byte got allocated, causing instruction size mismatch between passes +and hence incorrect address calculations. Fixed. + +Stupid bug in the revised ELF section generation fixed (associated +string-table section for .symtab was hard-coded as 7, even when this +didn't fit with the real section table). Was causing `ld' to +seg-fault under Linux. + +Included a new Borland C makefile, Makefile.bc2, donated by Fox +Cutter <lmb@comtch.iea.com>. + + +0.92 released January 1997 +-------------------------- + +The FDIVP/FDIVRP and FSUBP/FSUBRP pairs had been inverted: this was +fixed. This also affected the LCC driver. + +Fixed a bug regarding 32-bit effective addresses of the form +[other_register+ESP]. + +Documentary changes, notably documentation of the fact that Borland +Win32 compilers use `obj' rather than `win32' object format. + +Fixed the COMENT record in OBJ files, which was formatted +incorrectly. + +Fixed a bug causing segfaults in large RDF files. + +OBJ format now strips initial periods from segment and group +definitions, in order to avoid complications with the local label +syntax. + +Fixed a bug in disassembling far calls and jumps in NDISASM. + +Added support for user-defined sections in COFF and ELF files. + +Compiled the DOS binaries with a sensible amount of stack, to +prevent stack overflows on any arithmetic expression containing +parentheses. + +Fixed a bug in handling of files that do not terminate in a newline. + + +0.91 released November 1996 +--------------------------- + +Loads of bug fixes. +Support for RDF added. +Support for DBG debugging format added. +Support for 32-bit extensions to Microsoft OBJ format added. +Revised for Borland C: some variable names changed, makefile added. +LCC support revised to actually work. +JMP/CALL NEAR/FAR notation added. +`a16', `o16', `a32' and `o32' prefixes added. +Range checking on short jumps implemented. +MMX instruction support added. +Negative floating point constant support added. +Memory handling improved to bypass 64K barrier under DOS. +$ prefix to force treatment of reserved words as identifiers added. +Default-size mechanism for object formats added. +Compile-time configurability added. +`#', `@', `~' and `?' are now valid characters in labels. +`-e' and `-k' options in NDISASM added. + + +0.90 released October 1996 +-------------------------- + +First release version. First support for object file output. Other +changes from previous version (0.3x) too numerous to document. diff --git a/tools/os2.x86/nasm/v0.98.39-bird/COPYING b/tools/os2.x86/nasm/v0.98.39-bird/COPYING new file mode 100644 index 00000000..82de29fb --- /dev/null +++ b/tools/os2.x86/nasm/v0.98.39-bird/COPYING @@ -0,0 +1,462 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. +^L + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. +^L + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. +^L + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. +^L + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. +^L + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. +^L + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. +^L + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS +^L diff --git a/tools/os2.x86/nasm/v0.98.39-bird/README b/tools/os2.x86/nasm/v0.98.39-bird/README new file mode 100644 index 00000000..a29f7f58 --- /dev/null +++ b/tools/os2.x86/nasm/v0.98.39-bird/README @@ -0,0 +1,21 @@ + NASM, the Netwide Assembler. + +Many many developers all over the net respect NASM for what it is +- a widespread (thus netwide), portable (thus netwide!), very +flexible and mature assembler tool with support for many output +formats (thus netwide!!). + +Now we have good news for you: NASM is licensed under LGPL. +This means its development is open to even wider society of +programmers wishing to improve their lovely assembler. + +The NASM project is now situated at SourceForge.net, the most +famous Open Source development center on The Net. + +Visit our development page at http://nasm.2y.net/ and our +SF project at http://sf.net/projects/nasm/ + +See the file CHANGES for the description of changes between revisions. + + With best regards, + NASM crew. diff --git a/tools/os2.x86/nasm/v0.98.39-bird/TODO b/tools/os2.x86/nasm/v0.98.39-bird/TODO new file mode 100644 index 00000000..bfa66aa6 --- /dev/null +++ b/tools/os2.x86/nasm/v0.98.39-bird/TODO @@ -0,0 +1,340 @@ +NASM TODO list +============== + +This, like the AUTHORS file, is intended for easy readability by both human +and machine, thus the format. + + F: feature + V: version you should expect it by + R: responsible person or - if unassigned + C: % complete + D: description + D: maybe on multiple lines + +Anything that doesn't start with /^[FVRCD]:/ should be ignored. + + F:-line triggers new entry. + Empty V,R,C assume: V: ?, R: -, C: 0% + +============= + +F: i18n via gettext + +F: Convert shallow code model to deep code model +D: Tired of messing between lots of unrelated files (especially .c/.h stuff) + +F: Automated dependency generation for Makefile +D: Current looks awful and will break if anything changes. + +F: Move output modules out*.c to output/ subdir +R: madfire +C: 10% + +== THESE ARE FROM old NASM's Wishlist +== THEY NEED SEVERE REVISING (seems they weren't updated for a couple of years or so) + +F: Check misc/ide.cfg into RCS as Watcom IDE enhancement thingy +V: 0.98 +D: (nop@dlc.fi) + +F: Package the Linux Assembler HOWTO +V: 0.98 + +F: 3DNow!, SSE and other extensions need documenting +V: 0.98 +D: hpa: Does it really make sense to have a whole instruction set +D: reference packaged with the assembler? + +F: prototypes of lrotate don't match in test/*. Fix. +V: 0.98 + +F: Build djgpp binaries for 0.98 onwards. Look into PMODE/W as a stub +V: 0.98 +D: it might be a lot better than CWSDPMI. It's in PMW133.ZIP. + +F: %undef operator that goes along with %define +V: ? +C: 100% + +F: Fix `%error' giving error messages twice. +V: 0.99 +D: Not especially important, as changes planned for 1.1x below will make +D: the preprocessor be only called once. + +F: Sort out problems with OBJ +V: 0.99 +D: * TLINK32 doesn't seem to like SEGDEF32 et al. So for that, we +D: should avoid xxx32 records wherever we can. +D: * However, didn't we change _to_ using xxx32 at some stage? Try +D: to remember why and when. +D: * Apparently Delphi's linker has trouble with two or more +D: globals being defined inside a PUBDEF32. Don't even know if it +D: _can_ cope with a PUBDEF16. +D: * Might need extra flags. *sigh* + +F: Symbol table output may possibly be useful. +V: 0.99 +D: Ken Martwick (kenm@efn.org) wants the following format: +D: labelname type offset(hex) repetition count +D: Possibly include xref addresses after repetition count? + +F: ELF fixes +V: 0.99 +D: There are various other bugs in outelf.c that make certain kinds +D: of relocation not work. See zbrown.asm. Looks like we may have to do +D: a major rewrite of parts of it. Compare some NASM code output with +D: equivalent GAS code output. Look at the ELF spec. Generally fix things. + +F: ELF fixes +V: 0.99 +D: NASM is currently using a kludge in ELF that involves defining +D: a symbol at a zero absolute offset. This isn't needed, as the +D: documented solution to the problem that this solves is to use +D: SHN_UNDEF. + +F: Debug information, in all formats it can be usefully done in. +V: 0.99 +D: * including line-number record support. +D: * "George C. Lindauer" <gclind01@starbase.spd.louisville.edu> +D: wants to have some say in how this goes through. +D: * Andrew Crabtree <andrewc@rosemail.rose.hp.com> wants to help out. + +F: Think about a line-continuation character. +V: 0.99 + +F: Consider allowing declaration of two labels on the same line, +V: 0.99 +D: syntax 'label1[:] label2[:] ... instruction'. +D: Need to investigate feasibility. + +F: Quoting of quotes by doubling them, in string and char constants. +V: 0.99 + +F: Two-operand syntax for SEGMENT/SECTION macro to avoid warnings +D: of ignored section parameters on reissue of __SECT__. +D: Or maybe skip the warning if the given parameters are identical to +D: what was actually stored. Investigate. +V: 0.99 + +F: Apparently we are not missing a PSRAQ instruction, because it +D: doesn't exist. Check that it doesn't exist as an undocumented +D: instruction, or something stupid like that. +V: 0.99 + +F: Any assembled form starting 0x80 can also start 0x82. +V: 1.00 +D: ndisasm should know this. New special code in instruction encodings, probably. + +F: Pointing an EQU at an external symbol now generates an error. +V: 1.05 +D: There may be a better way of handling this; we should look into it. +D: Ideally, the label mechanism should be changed to cope with one +D: label being declared relative to another - that may work, but could be +D: a pain to implement (or is it? it may be easy enough that you just +D: need to declare a new offset in the same segment...) This should be done +D: before v1.0 is released. There is a comment regarding this in labels.c, +D: towards the end of the file, which discusses ways of fixing this. + +F: nested %rep used to cause a panic. +V: 1.10 +D: Now a more informative error message is produced. This problem whould +D: be fixed before v1.0. +D: See comment in switch() statement block for PP_REP in do_directive() +D: in preproc.c (line 1585, or thereabouts) + +F: Contribution +D: zgraeme.tar contains improved hash table routines +D: contributed by Graeme Defty <graeme@HK.Super.NET> for use in the +D: label manager. + +F: Contribution +D: zsyntax.zip contains a syntax-highlighting mode for +D: NASM, for use with the Aurora text editor (??). + +F: Contribution +D: zvim.zip contains a syntax-highlighting mode for NASM, for use with vim. + +F: Contribution +D: zkendal1.zip and zkendal2.zip contain Kendall +D: Bennett's (<KendallB@scitechsoft.com>) alternative syntax stuff, +D: providing an alternative syntax mode for NASM which allows a macro +D: set to be written that allows the same source files to be +D: assembled with NASM and TASM. +R: Kendall Bennett +C: 100% + +F: Add the UD2 instruction. +C: 100% + +F: Add the four instructions documented in 24368901.pdf (Intel's own document). +C: 100% + +F: Some means of avoiding MOV memoffs,EAX which apparently the +D: Pentium pairing detector thinks modifies EAX. Similar means of +D: choosing instruction encodings where necessary. +V: 1.10? + +F: The example of ..@ makes it clear that a ..@ label isn't just +D: local, but doesn't make it clear that it isn't just global either. + +F: hpa wants an evaluator operator for ceil(log2(x)). + +F: Extra reloc types in ELF +D: R_386_16 type 20, PC16 is 21, 8 is 22, PC8 is 23. +D: Add support for the 16s at least. + +F: Lazy section creation or selective section output +D: in COFF/win32 at least and probably other formats: don't bother to emit a section +D: if it contains no data. Particularly the default auto-created +D: section. We believe zero-length sections crash at least WLINK (in win32). + +F: Make the flags field in `struct itemplate' in insns.h a long instead of an int. +C: 100%? + +F: Implement %ifref to check whether a single-line macro has ever been expanded since (last re) definition. Or maybe not. We'll see. + +F: add pointer to \k{insLEAVE} and \k{insENTER} in chapters about mixed-language programming. + +F: Some equivalent to TASM's GLOBAL directive +D: ie something which defines a symbol as external if it doesn't end up being defined +D: but defines it as public if it does end up being defined. + +F: Documentation doesn't explain about C++ name mangling. + +F: see if BITS can be made to do anything sensible in obj (eg set the default new-segment property to Use32). + +F: OBJ: coalesce consecutive offset and segment fixups for the same location into full-32bit-pointer fixups. +D: This is apparently necessary because some twazzock in the PowerBASIC development +D: team didn't design to support the OMF spec the way the rest of the +D: world sees it. + +F: Allow % to be separated from the rest of a preproc directive, for alternative directive indentation styles. + +F: __DATE__, __TIME__, and text variants of __NASM_MAJOR__ and __NASM_MINOR__. + +F: Warn on TIMES combined with multi-line macros. +V: 1.00 +D: TIMES gets applied to first line only - should bring to users' attention. + +F: Re-work the evaluator, again, with a per-object-format fixup +D: routine, so as to be able to cope with section offsets "really" +D: being pure numbers; should be able to allow at _least_ the two +D: common idioms +D: TIMES 510-$ DB 0 ; bootsector +D: MOV AX,(PROG_END-100H)/16 ; .COM TSR +D: Would need to call the fixup throughout the evaluator, and the +D: fixup would have to be allowed to return UNKNOWN on pass one if it +D: had to. (_Always_ returning UNKNOWN on pass one, though a lovely +D: clean design, breaks the first of the above examples.) +V: 1.10 + +F: Preprocessor identifier concatenation? +V: 1.10 + +F: Arbitrary section names in `bin'. +V: 0.98.09 +D: Is this necessary? Is it even desirable? +D: hpa: Desirable, yes. Necessary? Probably not, but there are definitely cases where it becomes quite useful. +R: madfire +C: 100% + +F: Ability to read from a pipe. +V: 1.10 +D: Obviously not useful under dos, so memory problems with storing +D: entire input file aren't a problem either. + +F: File caching under DOS/32 bit... +V: 1.10? +D: maybe even implement discardable buffers that get thrown away +D: when we get a NULL returned from malloc(). Only really useful under +D: DOS. Think about it. + +F: possibly spool out the pre-processed stuff to a file, to avoid having to re-process it. +V: 1.10? +D: Possible problems with preprocessor values not known on pass 1? Have a look... + +F: Or maybe we can spool out a pre-parsed version...? +V: 1.10 +D: Need to investigate feasibility. Does the results from the parser +D: change from pass 1 to pass 2? Would it be feasible to alter it so that +D: the parser returns an invariant result, and this is then processed +D: afterwards to resolve label references, etc? + +F: Subsection support? + +F: A good ALIGN mechanism, similar to GAS's. +V: 0.98p1 +D: GAS pads out space by means of the following (32-bit) instructions: +D: 8DB42600000000 lea esi,[esi+0x0] +D: 8DB600000000 lea esi,[esi+0x0] +D: 8D742600 lea esi,[esi+0x0] +D: 8D7600 lea esi,[esi+0x0] +D: 8D36 lea esi,[esi] +D: 90 nop +D: It uses up to two of these instructions to do up to 14-byte pads; +D: when more than 14 bytes are needed, it issues a (short) jump to +D: the end of the padded section and then NOPs the rest. Come up with +D: a similar scheme for 16 bit mode, and also come up with a way to +D: use it - internal to the assembler, so that programs using ALIGN +D: don't knock over preprocess-only mode. +D: Also re-work the macro form so that when given one argument in a +D: code section it calls this feature. +R: Panos Minos +C: 100%? + +F: Possibly a means whereby FP constants can be specified as immediate operands to non-FP instructions. +D: * Possible syntax: MOV EAX,FLOAT 1.2 to get a single-precision FP +D: constant. Then maybe MOV EAX,HI_FLOAT 1.2 and MOV EAX,LO_FLOAT +D: 1.2 to get the two halves of a double-precision one. Best to +D: ignore extended-precision in case it bites. +D: * Alternatively, maybe MOV EAX,FLOAT(4,0-4,1.2) to get bytes 0-4 +D: (ie 0-3) of a 4-byte constant. Then HI_FLOAT is FLOAT(8,4-8,x) +D: and LO_FLOAT is FLOAT(8,0-4,x). But this version allows two-byte +D: chunks, one-byte chunks, even stranger chunks, and pieces of +D: ten-byte reals to be bandied around as well. + +F: A UNION macro might be quite cool +D: now that ABSOLUTE is sane enough to be able to handle it. + +F: An equivalent to gcc's ## stringify operator, plus string concatenation +D: somehow implemented without undue ugliness, so as +D: to be able to do `%include "/my/path/%1"' in a macro, or something +D: similar... + +F: Actually _do_ something with the processor, privileged and +D: undocumented flags in the instruction table. When this happens, +D: consider allowing PMULHRW to map to either of the Cyrix or AMD +D: versions? +D: hpa: The -p option to ndisasm now uses this to some extent. +V: 1.10 + +F: Maybe NEC V20/V30 instructions? ? +D: hpa: What are they? Should be trivial to implement. + +F: Yet more object formats. +D: * Possibly direct support for .EXE files? +V: 1.10 + +F: Symbol map in binary format. Format-specific options... +V: 1.10? + +F: REDESIGN: Think about EQU dependency, and about start-point specification in OBJ. Possibly re-think directive support. +V: 1.20? + +F: Think about a wrapper program like gcc? +V: 2.00? +D: Possibly invent a _patch_ for gcc so that it can take .asm files on the command line? +D: If a wrapper happens, think about adding an option to cause the +D: resulting executable file to be executed immediately, thus +D: allowing NASM source files to have #!... (probably silly) + +F: Multi-platform support? +D: If so: definitely Alpha; possibly Java byte code; +D: probably ARM/StrongARM; maybe Sparc; maybe Mips; maybe +D: Vax. Perhaps Z80 and 6502, just for a laugh? + +F: Consider a 'verbose' option that prints information about the resulting object file onto stdout. + +F: Line numbers in the .lst file don't match the line numbers in the input. +D: They probably should, rather than the current matching of the post-preprocessor line numbers. + diff --git a/tools/os2.x86/nasm/v0.98.39-bird/nasm.exe b/tools/os2.x86/nasm/v0.98.39-bird/nasm.exe Binary files differnew file mode 100644 index 00000000..ab9f5186 --- /dev/null +++ b/tools/os2.x86/nasm/v0.98.39-bird/nasm.exe diff --git a/tools/os2.x86/nasm/v0.98.39-bird/ndisasm.exe b/tools/os2.x86/nasm/v0.98.39-bird/ndisasm.exe Binary files differnew file mode 100644 index 00000000..953eb172 --- /dev/null +++ b/tools/os2.x86/nasm/v0.98.39-bird/ndisasm.exe diff --git a/tools/solaris.amd64/bin/iasl b/tools/solaris.amd64/bin/iasl Binary files differnew file mode 100755 index 00000000..10adf8a0 --- /dev/null +++ b/tools/solaris.amd64/bin/iasl diff --git a/tools/solaris.amd64/bin/yasm b/tools/solaris.amd64/bin/yasm Binary files differnew file mode 100755 index 00000000..530a8f9e --- /dev/null +++ b/tools/solaris.amd64/bin/yasm diff --git a/tools/solaris.x86/bin/iasl b/tools/solaris.x86/bin/iasl Binary files differnew file mode 100755 index 00000000..10adf8a0 --- /dev/null +++ b/tools/solaris.x86/bin/iasl diff --git a/tools/solaris.x86/bin/yasm b/tools/solaris.x86/bin/yasm Binary files differnew file mode 100755 index 00000000..b6f79ce1 --- /dev/null +++ b/tools/solaris.x86/bin/yasm diff --git a/tools/win.amd64/bin/as86.exe b/tools/win.amd64/bin/as86.exe Binary files differnew file mode 100755 index 00000000..02f42985 --- /dev/null +++ b/tools/win.amd64/bin/as86.exe diff --git a/tools/win.amd64/bin/doxygen.exe b/tools/win.amd64/bin/doxygen.exe Binary files differnew file mode 100755 index 00000000..e2adcf5e --- /dev/null +++ b/tools/win.amd64/bin/doxygen.exe diff --git a/tools/win.amd64/bin/doxytag.exe b/tools/win.amd64/bin/doxytag.exe Binary files differnew file mode 100755 index 00000000..cba721b4 --- /dev/null +++ b/tools/win.amd64/bin/doxytag.exe diff --git a/tools/win.amd64/bin/glib-1.2.dll b/tools/win.amd64/bin/glib-1.2.dll Binary files differnew file mode 100644 index 00000000..ef3ef4dd --- /dev/null +++ b/tools/win.amd64/bin/glib-1.2.dll diff --git a/tools/win.amd64/bin/iasl.exe b/tools/win.amd64/bin/iasl.exe Binary files differnew file mode 100755 index 00000000..bf8afc19 --- /dev/null +++ b/tools/win.amd64/bin/iasl.exe diff --git a/tools/win.amd64/bin/iconv.dll b/tools/win.amd64/bin/iconv.dll Binary files differnew file mode 100644 index 00000000..b448e7de --- /dev/null +++ b/tools/win.amd64/bin/iconv.dll diff --git a/tools/win.amd64/bin/libexslt.dll b/tools/win.amd64/bin/libexslt.dll Binary files differnew file mode 100644 index 00000000..f7f35f1d --- /dev/null +++ b/tools/win.amd64/bin/libexslt.dll diff --git a/tools/win.amd64/bin/libidl-0.6.dll b/tools/win.amd64/bin/libidl-0.6.dll Binary files differnew file mode 100644 index 00000000..3654b44a --- /dev/null +++ b/tools/win.amd64/bin/libidl-0.6.dll diff --git a/tools/win.amd64/bin/libxml2.dll b/tools/win.amd64/bin/libxml2.dll Binary files differnew file mode 100644 index 00000000..cecdc43b --- /dev/null +++ b/tools/win.amd64/bin/libxml2.dll diff --git a/tools/win.amd64/bin/libxslt.dll b/tools/win.amd64/bin/libxslt.dll Binary files differnew file mode 100644 index 00000000..eeab6ddd --- /dev/null +++ b/tools/win.amd64/bin/libxslt.dll diff --git a/tools/win.amd64/bin/msvcrt.dll b/tools/win.amd64/bin/msvcrt.dll Binary files differnew file mode 100644 index 00000000..16bb3401 --- /dev/null +++ b/tools/win.amd64/bin/msvcrt.dll diff --git a/tools/win.amd64/bin/xsltproc.exe b/tools/win.amd64/bin/xsltproc.exe Binary files differnew file mode 100755 index 00000000..c5d53e76 --- /dev/null +++ b/tools/win.amd64/bin/xsltproc.exe diff --git a/tools/win.amd64/bin/yasm.exe b/tools/win.amd64/bin/yasm.exe Binary files differnew file mode 100755 index 00000000..5d2fd72f --- /dev/null +++ b/tools/win.amd64/bin/yasm.exe diff --git a/tools/win.amd64/bin/zlib1.dll b/tools/win.amd64/bin/zlib1.dll Binary files differnew file mode 100644 index 00000000..4eb8adb9 --- /dev/null +++ b/tools/win.amd64/bin/zlib1.dll diff --git a/tools/win.x86/bin/as86.exe b/tools/win.x86/bin/as86.exe Binary files differnew file mode 100755 index 00000000..02f42985 --- /dev/null +++ b/tools/win.x86/bin/as86.exe diff --git a/tools/win.x86/bin/doxygen.exe b/tools/win.x86/bin/doxygen.exe Binary files differnew file mode 100755 index 00000000..e2adcf5e --- /dev/null +++ b/tools/win.x86/bin/doxygen.exe diff --git a/tools/win.x86/bin/doxytag.exe b/tools/win.x86/bin/doxytag.exe Binary files differnew file mode 100755 index 00000000..cba721b4 --- /dev/null +++ b/tools/win.x86/bin/doxytag.exe diff --git a/tools/win.x86/bin/glib-1.2.dll b/tools/win.x86/bin/glib-1.2.dll Binary files differnew file mode 100644 index 00000000..ef3ef4dd --- /dev/null +++ b/tools/win.x86/bin/glib-1.2.dll diff --git a/tools/win.x86/bin/iasl.exe b/tools/win.x86/bin/iasl.exe Binary files differnew file mode 100755 index 00000000..bf8afc19 --- /dev/null +++ b/tools/win.x86/bin/iasl.exe diff --git a/tools/win.x86/bin/iconv.dll b/tools/win.x86/bin/iconv.dll Binary files differnew file mode 100644 index 00000000..b448e7de --- /dev/null +++ b/tools/win.x86/bin/iconv.dll diff --git a/tools/win.x86/bin/libexslt.dll b/tools/win.x86/bin/libexslt.dll Binary files differnew file mode 100644 index 00000000..f7f35f1d --- /dev/null +++ b/tools/win.x86/bin/libexslt.dll diff --git a/tools/win.x86/bin/libidl-0.6.dll b/tools/win.x86/bin/libidl-0.6.dll Binary files differnew file mode 100644 index 00000000..3654b44a --- /dev/null +++ b/tools/win.x86/bin/libidl-0.6.dll diff --git a/tools/win.x86/bin/libxml2.dll b/tools/win.x86/bin/libxml2.dll Binary files differnew file mode 100644 index 00000000..cecdc43b --- /dev/null +++ b/tools/win.x86/bin/libxml2.dll diff --git a/tools/win.x86/bin/libxslt.dll b/tools/win.x86/bin/libxslt.dll Binary files differnew file mode 100644 index 00000000..eeab6ddd --- /dev/null +++ b/tools/win.x86/bin/libxslt.dll diff --git a/tools/win.x86/bin/msvcrt.dll b/tools/win.x86/bin/msvcrt.dll Binary files differnew file mode 100644 index 00000000..16bb3401 --- /dev/null +++ b/tools/win.x86/bin/msvcrt.dll diff --git a/tools/win.x86/bin/xsltproc.exe b/tools/win.x86/bin/xsltproc.exe Binary files differnew file mode 100755 index 00000000..c5d53e76 --- /dev/null +++ b/tools/win.x86/bin/xsltproc.exe diff --git a/tools/win.x86/bin/yasm.exe b/tools/win.x86/bin/yasm.exe Binary files differnew file mode 100755 index 00000000..590950b5 --- /dev/null +++ b/tools/win.x86/bin/yasm.exe diff --git a/tools/win.x86/bin/zlib1.dll b/tools/win.x86/bin/zlib1.dll Binary files differnew file mode 100644 index 00000000..4eb8adb9 --- /dev/null +++ b/tools/win.x86/bin/zlib1.dll |