Changelog __/__/2014, v2.12: Bugfixes: - COMM directive: there was no check that numeric arguments 'size' or 'count' did fit into 32-bits; see comm06.aso. - regression in v2.10-2.11: in 16-/32-bit, if a FASTCALL procedure was first prototyped and then defined, the assembly process may have stopped with error 'General Failure'; see proc9.asm. - regression in v2.10-2.11, COFF format: if full segment directives were used and a bss segment didn't have the expected class name, jwasm may have calculated wrong file positions of section data and relocations; see coff1.asc. - operator OPATTR: bit 1 (=indirect memref) and language type flags of result may have been set even if operand was an invalid reference; see opattr9.asm. - ELF format: object module may have been larger than necessary due to bss section sizes that were not ignored for file offset calculations. - GPF might have occured if a TYPE for an undefined variable was specified in an expression; see expr5.aso. Other changes: - OPTION WIN64:4 added. 11/16/2013, v2.11a: Bugfixes: - regression in v2.11, Unix version only: _splitpath() emulation code didn't handle correctly dots in directory part of the filename. 10/20/2013, v2.11: Bugfixes: - regression in v2.10: type expression may have given incorrect result if it contained an indirect memory operand; see types14.asm. - shift instructions with unsized memory operand as first operand were silently assumed to have byte size; see shift4.aso. - concatenation operator (a '\' as last non-white space character) wasn't handled if it appeared after line expansion only; see expans38.asm. - EXPORT or PRIVATE attributes in a PROTO directive weren't ignored; this may have caused problems if the attribvtes differed from those in the corresponding PROC directive. - userdefined prologue/epilogue macros: bit 7 of flag argument (=export) wasn't set. - 64-bit: if OPTION FRAME:AUTO was set, the default prologue of all PROCs with FRAME attribute did setup the RBP register, even if no params or locals were defined. - in v2.00-2.10, CMP instruction did not reject the LOCK prefix. - 64-bit, CodeView debugging info: stack variables were defined via S_BPREL32-records, which works only as long as value of RBP fits in 32-bit; changed to S_REGREL32. - INVOKE directive: signed 16-bit arguments were zero extended if the target's parameter was of VARARG type; see invoke24.asm. - INVOKE directive: in 16-bit code, extending arguments to DWORD size didn't always work correctly; see invoke25.asm & invoke26.asm. - undefined members in critical expressions were accepted in some cases; see struct39.aso. - 64-bit: if more than 128 unwind codes were created inside a FRAME procedure, a GPF may have occured. - 64-bit: unwind codes generated by .ALLOCSTACK weren't always correct. - 64-bit: codeview line number info was not quite correct for first line in FRAME procs; consequently, there may have been a delay of one line until the debugger was able to show the contents of stack variables. - codeview debug info for symbols of type FWORD wasn't correct. - VMOVMSKPD, VMOVMSKPS, VMOVNTDQ, VMOVNTPD, VMOVNTPS didn't accept 256-bit operands. - INVOKE: if byte-registers AH-DH were used as arguments for a BYTE parameter in 32-bit, the wrong register was pushed; see invoke28.asm and invoke29.asm. - INVOKE: register arguments were always zero-extended, even if there was a signed type coercion; see invoke31.asm - invoke34.asm. - INVOKE, 16-bit: "push 0" may have been generated, even if current cpu was 8086, resulting in an assembly error. - INVOKE, Win64: default size of integer constants was 8 - changed to 4. - COFF: if -Zd or -Zi was set and there were multiple code sections containing code outside of procedures, the assembler may have crashed. - COFF: relative paths were missing in file entries of symbol table. - runtime conditionals: constant expressions coupled with && or || operator may have created wrong code; see rtcond7.asm - rtcond9.asm. - VMOVSD and VMOVSS didn't accept memory reference as second argument; see avx6.asm. - 64-bit: direct memory addressing with non-RIP-relative addresses didn't work in all cases; see mov644.asm. - overflow and underflow of real4 and real8 constants wasn't detected reliably; see float8.aso. - empty quoted strings were accepted as instruction operands; see quotstr2.aso ). - fatal errors were displayed, but did not appear in the .err-file. - BSS segments with the COMDAT attribute caused a GPF. - INVOKE: if the target's offset magnitude wasn't the current one ( i.e. calling 16-bit procedure from 32-bit code ), the generated code had problems in some cases; see invoke37.asm & invoke38.asm. - regression in v2.09-2.10: in 16-bit code, a jump extension may have occurred although the distance was 'short'; see forward8.asm. - 64-bit: register names TR3-TR7 were included in reserved words table. - COMM directive did accept NEAR/FAR types; see comm05.aso. - OMF format, options -Zd, -Zi: the size of line number records may have exceeded 1024; see linnum.asc. - OMF format, option -Cu: names of communals and exports weren't converted to uppercase; see casemap1.asc. - ALIGN in 16-bit code segments: the 2-byte filler was different from Masm's; see align4.asm. - macro functions calls after directives .IF, .ELSEIF, .WHILE or .UNTIL confused the tokenizer if one of the macro arguments was a <>-literal; see expans39.asm. - a macro placeholder ( argument or local ) may not have been detected if it was preceeded by a '!'; see expans40.asm. - jwasmd.exe: no FPU emulation code was included, causing strange errors when jwasm run on systems without FPU ( 80386/80486SX ) and floating point initializers were used in the assembly source. - EXTERN directive, weak externals: an "infinite" loop may have occured; see extern15.asc. Other changes: - OPTION STACKBASE added. - macro parameter attribute VARARGML added. - 64-bit, OPTION FRAME:AUTO: better prologue generation if XMM registers are contained in the PROC's USES clause. - OPTION RENAMEKEYWORD is now able to rename a keyword temporarily only. - data labels that become public via cmdline option -Zf will be decorated. - anonymous members in unions will be added to codeview debug info; they get a generated name ( which is a number, prefixed by "@@" ) to make them acceptable to the MS debug engine. - INVOKE, 64-bit: signed/unsigned integer argument expansion added. - OMF format: multiple THEADR records are written if line number info is contained in more than just one source file. - jwasmd.exe linked with updated hdpmi32 stub ( loadpex.bin ). - precompiled binaries jwasm.exe and jwasmd.exe now linked with jwlink. - encoding of FADD, FMUL, FDIV, FDIVR, FSUB and FSUBR with register st as both first and second operand does now match Masm's encoding. 04/17/2013, v2.10: Bugfixes: - option -Zi: the CodeView symbolic debug info did contain type indices of value 0 - which caused debuggers based on the MS debug engine to emit a warning. - a struct definition just after PROC or LOCAL may have triggered prologue generation, and thus error "statement not allowed inside struct definition" did appear. - regression in v2.08-2.09 with option -Zne: a segment register override may cause error 'invalid use of register'; regression test overrid3.asm. - regression in v2.08-2.09: a float as operand behind EQU was stored as a number (value 0), not as text; regression test equate26.asm. - a forward reference might have caused an error if the reference was once interpreted as a label and then as a structure name; regression test struct34.asm. - regression in v2.09: if the difference of two labels ( at least one must be a forward reference ) was stored in a byte variable, an error occured if output format was COFF; regression test data10.asc. - ALIAS segment attribute: the alias name was likely to become "corrupted". - operators IMAGEREL and SECTIONREL were ignored if their operand was the displacement of an indirect memory reference; regression test coffop.asc. - -pe: size of data directory for imports did comprise all import data. - -pe: in object table, the entry of the internally generated .reloc section may have been invalid. - -pe: the exported names table wasn't sorted in ascending order. - -coff: weak externals defined via "extern sym (altsym) ..." had characteristics IMAGE_WEAK_EXTERN_SEARCH_ALIAS instead of IMAGE_WEAK_EXTERN_SEARCH_LIBRARY. - ALIAS directive: the alias name in the object module wasn't decorated. - OMF format: a linker "pass separator" comment record was written in any case; according to OMF docs it is NOT to be written if a starting address is present ( Masm also omits the record then ). - if the third argument of an instruction was a forward reference, error 'invalid instruction operands' was emitted in most cases; regression test forward4.asm. - strcpy() was used to copy overlapping strings when a macro was stored - this may not work with all compilers; replaced by memmove(). - comparison of pointer types ( with or without using TYPE operator ) had problems; regression test types7.asm. - option -Fd without filename argument might have caused a GPF. - if a symbol with local scope was to be defined and the name was referenced previously ( but not defined [yet]! ), a confusing error msg "Symbol already defined" was emitted; regression tests local2.aso and proc5.aso. - -bin: absolute segments weren't fully supported; regression tests absseg2.asm and absseg3.asm. - directives PUSHCONTEXT & POPCONTEXT did not behave exactly as in Masm; regression test context2.asm. - -coff: if a section contained more than 0xffff relocations, the count in the section header was truncated and flag IMAGE_SCN_LNK_NRELOC_OVFL wasn't set. - comparison of GPR TYPEs did ignore ASSUME; regression test types8.asm. - INCLUDE directive: directory part of a relative path may have been ignored if the current source file wasn't in the current directory. - -coff: static (=private) PROCedures weren't included into the coff symbol table. - it was possible to change the ALIAS segment attribute; regression test alias2.asc. - if OPATTR operand was an undefined struct member, an error was emitted; regression test opattr3.asm. - if an alias defined via '=' or EQU directives was forward-referenced, it might have failed to trigger a necessary phase error, resulting in a premature end of the assembly task; regression test forward5.asm. - directive ENDP, v2.05-2.09: the matching of the labels ( PROC and associated ENDP ) was only tested with the length of the PROC label - which wasn't reliable; regression test proc6.aso. - option -Zg, INVOKE directive: if an argument was to be extended from WORD to DWORD, the hiword wasn't initialized to 0; regression test invoke21.asc. - type coercion inside brackets wasn't dereferenced for usage outside the brackets; regression test ptr2.asm. - regression in v2.05-2.09, options -Fo, -Fl,...: white spaces in filename argument did confuse the cmdline parser. - in v2.09, directive REP[EA]T may have triggered error 'too many arguments in macro call' ( JWASMR.EXE only? ). - regression in v2.09: if a struct member was an alias for another struct or union, it was not properly initialized; regression tests struct35.asm and struct36.aso. - option -Zf: code labels created via '@@:' weren't sorted out. - regression in v2.05-2.09: code label @@: at the very beginning caused problems ("symbol not defined" ). - regression in v2.07-2.09: if the member part in a "dot"-expression was enclosed in (), it wasn't accepted; regression test dotop5.asm. - regression in v2.08-2.09: variable type was overwritten by assumed type; regression test assume10.asm. - if a text macro expanded to a preprocessor directive and wasn't the first token in a line, the result might have been "unexpected"; regression test equate27.asm. - LODS[B|W|D|Q]: if optional operand contained a DS override, a DS prefix byte was generated; regression test string3.asm. - INVOKE may have rejected a valid argument if it was a struct type with size 4,6 or 8; regression test invoke22.asm. - using $ in an expression outside of segment block or struct/union was not rejected; regression test equate28.aso. - regression in v2.06-2.09: use of an absolute external in an arithmetic instruction may have suppressed generation of opsize prefix; regression test extern12.asz. - EXITM directive inside a macro did not "fix" if-nesting-level issues caused by the usage of GOTO; regression tests goto1.asm and goto2.asm. - LOW32 operator in 64-bit didn't always set 32-bit address fixup; regression tests offset9.asm, offset11.asm. Other changes: - CodeView symbolic debug info will contain array records. - CodeView symbolic debug info: Anonymous structs are now "unfolded"; this is a work-around for the MS debug engine. - Option -Zi got an optional numeric argument to control the extend of debugging info that is emitted. - support for register variables in CodeView debug info (FASTCALL). - OPTION CODEVIEW added. - -pe: field TimeDateStamp in file header and in export directory now set to current date & time. - -pe: some fields in optional header and section header rounded up to alignment boundary to satisfy MS COFF specs. - directive LABEL syntax extension: optional array size argument. - Warning displayed if line number info is emitted for a segment without class 'CODE' ( Masm compatible ). - for improved Masm-compatibility, PUSH|POPCONTEXT ALL does no longer comprise PUSH|POPCONTEXT ALIGNMENT. - samples Win32Tls and ComDat added. - -coff: support for COMDAT sections added. - -coff: cmdline option -zlp added. - if the file behind @ cmdline option cannot be opened, a FATAL error is emitted ( Masm compatible ). - the register swapping in indirect addressing mode, which was previously done only if option -Zg was active, is now the standard behavior ( Masm compatible ). 12/02/2012, v2.09: Bugfixes: - setting the value of an assembly-time variable to an alias didn't reset bits 32-63 of the value (see regression test equate23.asm). - an undefined symbol in the argument of an assembly-time variable wasn't always flagged as error. - the difference of two labels was assumed to be a constant, even if one or both labels weren't defined (yet). This caused problems if the result was used in a preprocessor expression or as argument for an assembly-time variable (see regression test equate22.aso). - multiple consecutive expansion operators (%) in a macro argument were rejected. - comparing two types for (in)equality didn't work in all cases. - MZ format: values changed by OPTION MZ affected further modules assembled with -mz. - regression in v2.08(a): equates with a string value may have been stored as text macro, althouth the string value fits in 32-bit. - Win64: the type of expression . wasn't ignored if such an expression was used as an argument for INVOKE. - regression in v2.7-2.08a: a type behind a dot was rejected in some cases if it didn't match the current type; it must be handled like a type coercion. - a struct member with a TYPEDEF type did accept a literal as initializer without complains. An error occured only if the struct was instanced. Now a warning is displayed at the struct declaration. - THIS operator didn't handle structured types correctly. - SIZE and LENGTH operator returned wrong values if the first expression contained DUP with an argument of more than 1 item. - -Zd, -Zi option, COFF format: duplicate entries for static procs may have occured in symbol table. - regression in v2.07-2.08a: an explicit type didn't override the assumed type if OPTION OLDSTRUCTS was set (regression test dotop4.asm). - OMF format: both communal variables and externals with alternate names in a module made the assembler create an invalid object module. - "ifdef FLAT" was always true. - current prolog and epilog settings weren't reset for each pass. Actually, this was only a problem if FASTPASS wasn't active ( JWASMR ). - COFF: .file entry in symbol table was name & extension only. - 64-bit: for non-FRAME procs, OPTION WIN32:2 (introduced in v2.08) didn't work if there were register contents to be saved via the USES phrase. - 64-bit, OPTION WIN64:1: just fix arguments were stored in shadow space, no "VARARG" arguments. Other changes: - JWASMR.EXE: now compiled without support for SSSE3. - new output format PE and cmdline option -pe added. - samples Win32_8, Win32_8m, Win64_8, Win64_9a and Win64_9d added. - tool res2inc added. - option -Gr ( fastcall calling convention ) added. - struct initialization does no longer generate code. - Msvc64.mak added. - support for Intel VMX extensions added. - support for AMD SVM (AMD-V) implemented, inactive. 09/07/2012, v2.08a: - result of a macro function was expanded further even if the final result was to be enclosed in <> (see regression test expans36.asm). - expansion of EXITM argument wasn't handled fully Masm-compatible in v2.08 if it contained one or more '!' (see regression test expans37.asm). 08/29/2012, v2.08: Bugfixes: - forward references of structures in an expression may have failed ( regression test assume7.aso ). - if C-style expressions in runtime conditional directives were too complicated, the generated code may have caused 'symbol not defined' errors ( regression tests rtcond3.asm, rtcond4.asm ). - if the argument of the ASSUME directive was a segment register, the accepted variants of expressions behind the colon was more restricted than Masm's. - expansion operator % at position 0 in a line with a macro procedure call caused a syntax error if nothing was expanded. - absolute externals were rejected if they were used to initialize a 1-byte variable ( regression test extern8.asz ). - identifiers inside quoted strings were expanded if the expansion operator % was at position 0. - OMF, MZ format: if an assembly-time variable that contained an address was used in code or data, and the variable's content was later changed to a number, the assembler emitted either error "missing segment ..." (OMF) or created wrong code (MZ). - a text macro as label for INSTR was rejected. - if a conditional assembly directive occured after expansion only, it wasn't detected. - another "corrupted listing"-bug fixed. - macro parameters and locals weren't detected in quoted strings of macro lines if the substitution operator & was located AFTER the name only. - code labels in front of macro procedure invokations were parsed after the macro arguments were evaluated. - syntax [+.]. wasn't accepted. - FASTCALL (MS VC style): if the size of an argument to be stored in a register didn't fit, an error occured. - JWASMR.EXE: stack size was too small to handle deeply nested macros; stack increased from 20 to 33 kB. - OPTION EPILOGUE: a RET within a user-defined epilogue macro wasn't translated to RETF if the procedure was FAR. - JWASMR.EXE, INCBIN directive: optional arguments and were limited to 16-bit. - -nm option: this option to set the "module name" did instead set the name in the OMF THEADR record. Now it sets the true module name, while the OMF THEADR record will contain the filename. - in .IF blocks, multiple .ELSE branches weren't rejected. - SIZEOF and LENGTHOF did return 0 for data items created with the LABEL directive. - values for equates were generally rejected if their magnitude exceeded 32-bits. Now the value is rejected only if it's a plain number, values of expressions may be 64-bit wide. - a PURGEd macro may have emitted warnings or errors about missing or too many arguments. - a scale factor of 1 allowed the register to be used as base register if needed. However, any scale factor must enforce the register to be used as index register. - 64-bit: default type of parameters and locals was QWORD, but Masm (ML64) uses DWORD. - AVX: a few instructions didn't accept an unsized memory operand, although the size should have been guessed; and a few instructions did accept an unsized memory operand, although the size couldn't be guessed. - regression in v2.07: option -Fd=file didn't write all necessary entries in this version. Other changes: - GccWin64.mak added; makes a 64-bit JWasm Windows binary with MinGW-w64. - IntelC32.mak, IntelC64.mak added; create 32/64-bit JWasm Windows binary with the Intel compiler. - optional support for assembly code generated by Intel C++ compiler. - samples Bin2Inc.asm, Win32_6w.asm, Win32Drv.asm and Win32DrvA.asm added. - compatibility of -Zm cmdline option ( and OPTION M510 ) improved: the precedence of [] and () will change from 1 to 9, similar to Masm. - %OUT directive supported. - @CatStr 20-argument-limit removed. - OPTION WIN64 got a new switch ( called: INVOKE Stack Space Reservation ) to autodetect stack space required by INVOKEs within a procedure. - INVOKE of a FASTCALL (MS VC style) proc: optimization implemented to avoid to load a register with itself (mov ax,ax). - extended option -Zg: register are swapped in indirect addressing. For details see option -Zg in the documentation. 07/21/2012, v2.07a: - regression in v2.07: for absolute externals, a magnitude was assumed that may have been too large, resulting in error 'Initializer magnitude too large'. - check for multiple overrides in expressions was too rigid in v2.07. 07/02/2012, v2.07: Bugfixes: - ELF format: size of .bss segment wasn't set. - ELF format: segments of class "CONST" weren't marked as read-only in the ELF module. - segment attribute INFO wasn't handled for ELF. - Win64: in v2.05-v2.06, VARARG didn't work for the - first 4 - register arguments. - when a procedure's prologue and epilogue code was generated, it was assumed that radix was 10. - if the size of a byte array in a structure was defined by the length of a quoted string initializer, it wasn't marked internally as array and hence the initialization of data items of this type may have been wrong. - it wasn't checked if a string initializer for a simple byte field in a struct was too long. - if a struct contains fields with negative offset, the struct's size was calculated incorrectly. - JWASMR.EXE: in a few circumstances, negative constants were rejected. - in v2.04-2.06, it wasn't detected if a group contained an undefined segment. - INVOKE: if the argument for a VARARG parameter was a structure, it was rejected in some cases. - a line that contained both a comment and a directive which triggered source line generation (INVOKE, hll directives, ... ) messed up the listing. - EQU/= directive: optional type coercions weren't stored, just the value of the constant. - FLAT, USE32 and USE64 segment attributes were always accepted, no check for compatible cpu was done. - fixups for assembly time variables wasn't correct if the variable had type "far". - output format MZ: there was no warning when a 16-bit group's size exceeded 64 kB. - OMF output format: many publics in a module may have corrupted the object module. - if a struct member was operand for the SEG operator, the member's offset within the struct was used as addend for the segment fixup. - calling convention FASTCALL for 16-bit MS C was implemented faulty. Registers aren't CX and DX, but AX, DX and BX. - if -Zi was set and a segment had size 0 and a label (empty proc), the resulting coff object module had errors. - Win64: .pdata information may have been incorrect if multiple code sections with SEH data were defined. - handling of standard register ASSUMEs in the expression evaluator were not compatible with Masm. - Win64: in v2.06, the space for local variables was calculated incorrectly if OPTION FRAME:AUTO was set, an odd number of GPRs & no XMM registers were included in the USES list. Other changes: - IF[N]DEF and .ERR[N]DEF directives: argument may be a structure and member name, separated by a dot. - cmdline option -Fd: filename argument for this option is no longer mandatory for COFF output format. - FADDP, FMULP, FDIV[R]P and FSUB[R]P variants with no arguments added. - COFF/ELF: missing support for segment attribute ALIAS added. - for better Masm compatibility, memory operands with size 1 (PADD[S|US]B), 2 (PADD[S|US]W), 4 (PADDD) and 8 (PADDQ) are accepted. 07/22/2011, v2.06e: Bugfixes: - ELF64 format: in v2.05-v2.06d, addends weren't handled correctly. 07/02/2011, v2.06d: Bugfixes: - 64-bit: in v2.05-v2.06c, a relocatable constant was often assumed to have a magnitude of 32, thus accepting operands which are invalid ( "mov m64, offset label" or "push offset label" ). 06/29/2011, v2.06c: Bugfixes: - v2.06-v2.06b, directives DB, DW: if the result of a subtraction of 2 labels ( dw label1 - label2 ) was negative, it was rejected. 06/28/2011, v2.06b: Bugfixes: - struct fields that were forward referenced may have caused warnings or errors in v2.06-v2.06a. - in v2.04-v2.06a, if a pointer to a struct was redefined and the redefinition used a type alias, the redefinition failed (see regression test types5.asm) 06/26/2011, v2.06a: Bugfixes: - in v2.06 was a regression for IMUL with 3 operands: if the third operand's value was 127 < x < 256, the instruction was encoded incorrectly. 06/26/2011, v2.06: Bugfixes: - relative pathes for filenames containing '/' may have caused problems in non-Unix versions. - register "assumes" on the right side of the binary '+' operator were ignored. - 64-bit: in v2.05, "MOV ,offset