Commit Graph

2248 Commits

Author SHA1 Message Date
Cyrill Gorcunov
ffa4c37eaf test: Add br3189064
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-07 12:42:46 +03:00
Cyrill Gorcunov
b61564400a BR3189064: Fixes for VEXTRACTF128, VMASKMOVPS
These AVX instructions should use YMM register

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-07 12:40:22 +03:00
Cyrill Gorcunov
16f998e92f doc: Update changes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-07 11:35:18 +03:00
Cyrill Gorcunov
f66e71b2cc test: Add br3200749
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-07 11:29:56 +03:00
Cyrill Gorcunov
d34a1085b5 preproc.c: Don't forget to dup filename before free
src_set_fname simply gets copy of pointer (ideally
we need refcounting here) so don't pass the name
which will be freed soon but rather pass a copy.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-07 11:23:08 +03:00
Cyrill Gorcunov
91a65ba2b7 BR3200749: Fix "use after close" file pointer
Cleanup routine might be called several times
so be ready for that.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-07 11:18:50 +03:00
Cyrill Gorcunov
a59c759e09 NASM 2.09.06 2011-02-28 10:00:31 +03:00
Cyrill Gorcunov
37dacf0dec doc: Describe changes for 2.09.06
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 09:58:52 +03:00
Keith Kanios
e3f4780665 output/outbin.c: initialize section align/start attributes upon creation 2011-02-28 09:49:04 +03:00
Cyrill Gorcunov
b6c1dcaf70 doc: Describe changes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-23 00:49:13 +03:00
Cyrill Gorcunov
79abe7a731 insns: VLDQQU is back
As HPA explained
|
| w.r.t. the -QQ- instruction forms... when we did
| the initial AVX implementation we decided that
| using -DQ- (double quadword) for 256-bit instructions
| was a bit messy, so we decided to accept both -DQ-
| (being official) and -QQ-
|

So move VLDQQU back and place it before VLDDQU so disassembler
match it first.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-23 00:41:43 +03:00
Cyrill Gorcunov
2e6f7c342d test: Add test for BR 3187743
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-21 18:19:04 +03:00
Cyrill Gorcunov
3d3e7066ec BR 3187743: insns.dat -- Rename VLDQQU to VLDDQU
Fix a misprint

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-21 18:15:43 +03:00
Cyrill Gorcunov
7d6530225c NASM 2.09.05
Fixes for vpextrw instruction

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-20 22:16:30 +03:00
Cyrill Gorcunov
8fc44e9c33 doc: Update changes.src
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-20 22:12:32 +03:00
Cyrill Gorcunov
2716876f4a Delete invalid form of VPEXTRW
Mainline commit 47c95ceed4

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-20 22:10:40 +03:00
Cyrill Gorcunov
e5c2c49666 doc: Describe changes for 2.09.05 stable
Onle one change here but wrong instruction encoding is
pretty serious error which desrves to go into new stable
release.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-20 21:22:25 +03:00
Cyrill Gorcunov
2059aa9806 test: Add test for BR3174983
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-14 22:14:51 +03:00
Cyrill Gorcunov
9344270f5b BR3174983: insns.dat -- Fix arguments encodong for VPEXTRW
This form of VPEXTRW is that named 'B' form so
operands encoding should be fixed.

Reported-by: Jasper Neumann
Patch-by: Jasper Neumann
CC: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-14 22:04:51 +03:00
Anthony Williams
6fc53d3752 make: Lift up openwcom.mak for build on FreeDOS
Signed-off-by: Anthony Williams <rugxulo@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-23 18:37:17 +03:00
Cyrill Gorcunov
84637a6d28 NASM 2.09.04
Some important fixes:

 - Fix incorrect labels offset for VEX intructions
 - Eliminate bogus warning on implicit operand size override.
 - %if term could not handle 64 bit numbers.
 - The COFF backend was limiting relocations number to 16 bits even if
   in real there were a way more relocations.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-21 19:53:07 +03:00
Cyrill Gorcunov
9348b90f15 Changes for 2.09.04
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-21 19:51:49 +03:00
Victor van den Elzen
0d0f8ec418 BR3104852: only warn once for repeated prefixes 2010-11-21 19:41:01 +03:00
Victor van den Elzen
41f1f2badc BR3058845: mostly fix bogus warning with implicit operand size override
The implicit operand size override code didn't set the operand size
prefix, which confused the size calculation code for the range check.

The BITS 64 operand size calculation is still off, but "fixing" it by
making it 32-bit unless REX.W is set breaks PUSH and maybe others.
2010-11-21 19:40:49 +03:00
Cyrill Gorcunov
e635491941 misc: Enhance tag-release
It remains backward compatible

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-21 19:19:29 +03:00
Cyrill Gorcunov
5c89aea3d1 eval: rexp3 should operate with 64bit numbers
reloc_value returns 64bit numbers but we strip it down
to 'int' which causes problems if the former value is
big enough to overflow 'int'. Fix it.

[ BR3104312 ]

Reported-by: Christian Masloch
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-20 14:21:12 +03:00
Victor van den Elzen
0b2c41d0d3 Fix autoconf 2.68 warning.
The first argument of AC_COMPILE_IFELSE needs to be wrapped with
AC_LANG_SOURCE.
2010-11-20 14:20:38 +03:00
Cyrill Gorcunov
cb9a459560 coff: Handle massive relocations
The backport of

4db724fdd7
359b63f897
01102ee8e6
2672af7379

so coff output target to be able to handle
massive relocations.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-20 14:18:23 +03:00
H. Peter Anvin
3cb0e8c052 BR 3109604: Fix C4 vs C5 VEX form selection in calcsize()
calcsize() had the wrong criterion for when C5 prefixes are permitted
(REX.R is permitted, REX.X is forbidden.)  assemble() had the right
test already.  This caused symbol value errors.
2010-11-16 09:39:32 -08:00
Cyrill Gorcunov
4794de2f5b NASM 2.09.03
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-27 21:52:40 +04:00
Cyrill Gorcunov
fdbe8baf7a doc: Update changes for 2.09.03
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-27 21:50:20 +04:00
Cyrill Gorcunov
6cdc900d8d preproc.c: Restore concat rules on context local variables
This is a backport of commits

8dcbbd7af0
575d4289c9

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-27 21:43:03 +04:00
Cyrill Gorcunov
0457bcbf2e preproc: Issue warning on unterminated %{ construct
As being pointed by "matching braces" topic on
[ http://forum.nasm.us/index.php?topic=905.0 ]
we don't issue warning on missed match for "{"
brace opened.

Strictly speaking we should issue error instead and
force user to fix asm source code but since it's
here for a long time already -- lets be "admissive".

Reported-by: Klod
CC: Frank Kotler <fbkotler@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-27 21:41:35 +04:00
Frank Kotler
582b3d0c70 BR3079777: Explain %00 in documentation
Signed-off-by: Frank Kotler <fbkotler@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-27 21:41:19 +04:00
Cyrill Gorcunov
2c157002f2 BR3079550: NASM crash on run-time for OMF output format
We could have accessed malloc'ed data on external symbols
in obj and ieee output formats. Fix it by using nasm_zalloc.

Reported-by: Jiri Malak
Patch-by: Jiri Malak
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-27 21:41:11 +04:00
Cyrill Gorcunov
71787fda1b BR3074517: Print %macro name inside %rep blocks
If we're to print inside %rep block we should find
out which %macro it belongs.

Reported-by: Rob Neff
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-10-27 21:40:59 +04:00
H. Peter Anvin
db6975919c doc: fix spelling of "compatibility"
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-10-06 16:28:07 -07:00
Cyrill Gorcunov
af6be576ac NASM 2.09.02
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-18 02:57:06 +04:00
Cyrill Gorcunov
a28db5f3c2 doc/changes.src: Describe changes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-18 02:55:46 +04:00
Cyrill Gorcunov
ae7c916b6a Add test-case for BR3066383
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-18 02:48:53 +04:00
Cyrill Gorcunov
8bc8017df8 BR3066383: Restore backward compatibility with token pasting
It seems to be a bit long story for the reason if this bug. But
lets be verbose and describe all byte-to-byte. And it is all about
preprocessor code, in particular paste_tokens and expand_mmac_params.

Initially the problem (not the same but similar) was noticed and
fixed in commit ec88c1be. The problem reveals itself with code snippets
like

 | %macro m 1
 |  %push
 |      %define %$arg %1
 | %%top_%$arg:
 |      resb ($ - %%top_%$arg)
 |  %pop
 | %endmacro

So with commits ec88c1be, 51fd86e0, 1f6741fc, 985d880c we did expand
local single macro before processing tokens pasting unconditionally.

But then it being found that such approach breaks %assign directive.
The snippets like below didn't work

 | %macro m 1
 |  %push
 |      %assign %$arg %1
 |      %assign %$arg %1+%$arg
 |  %pop
 | %endmacro

So all these commits were reverted and we just stop pasting tokens
in paste_tokens() after TOK_PREPROC_ID (commit 20a94ad7). Unfortunately
this breaks %assign with compound preproc id

 | %macro m3 1
 |    %push
 |        %assign %$_uses 0
 |        %rep 4
 |            %assign %$_ur%$_uses %$_uses
 |            mov ecx, %$_ur%$_uses
 |            %assign %$_uses %$_uses+1
 |        %endrep
 |    %pop
 | %endmacro

To fix this bug we have to combine two approaches at once,
we should continue pasting after TOK_PREPROC_ID and expand
sequential TOK_PREPROC_IDs except first one.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-18 02:48:42 +04:00
Cyrill Gorcunov
831222f244 changes.src: Describe changes for 2.09.02
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-15 21:13:48 +04:00
Cyrill Gorcunov
cb6032340a BR3064376: ndisasm crash
ndisasm may crash due to lack of check of VEX table index.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-15 21:12:52 +04:00
Cyrill Gorcunov
530c1eddf5 BR3064459: Missing %endif doesn't always cause error
error() routine is conditional dependent so we should
use nasm_error instead to yield message unconditionally.

Reported-by: Christian Masloch
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-15 21:12:37 +04:00
Cyrill Gorcunov
ccba110e69 doc/nasmdoc.src: Fix octal number prefix misprint
Reported-by: Anthony <anthony@cloudnet.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-15 21:12:14 +04:00
H. Peter Anvin
2c11f97ca8 changes: document fixed token reversal for %deftok
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-09-15 08:59:12 -07:00
H. Peter Anvin
b40992c929 preproc: reverse the order of the tokens in %deftok
Smacros are apparently stored with the token stream reversed, so make
sure %deftok matches that sense of relatity.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-09-15 08:57:21 -07:00
Cyrill Gorcunov
e6e6a9ae2c NASM 2.09.01
A couple of NULL dereferences fixed.
See NASM version history in documentation.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-07 21:00:19 +04:00
Cyrill Gorcunov
234e4edce7 changes.src: Describe changes for 2.09.01
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-07 20:57:36 +04:00
Cyrill Gorcunov
bf11db6aca preproc.c: Make %substr robust
Make %substr robust to handle -1,-1 parameters
and restore old behavior when number of characters
in substring is greater then length of string itself.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-09-07 20:55:03 +04:00