Commit Graph

2325 Commits

Author SHA1 Message Date
Cyrill Gorcunov
b12b96ddad Merge branch 'nasm-2.09.xx'
Conflicts:
	version

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-20 23:56: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
a71f52055c insns.dat: Remove vpextrw merge rudiment
During merging I've brought in vpextrw with mem16
back again, fixed.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-14 22:28:49 +03:00
Cyrill Gorcunov
8a0eb96c11 Merge branch 'nasm-2.09.xx'
Conflicts:
	insns.dat

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-14 22:21:50 +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
Cyrill Gorcunov
4297aaf117 make: Add cscope targed
For easier use of cscope

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-14 21:53:15 +03:00
Victor van den Elzen
6dfbddb6b0 Move implicit operand size override logic to calc_size
It is more logical, it cleans up the code and it makes implicit
operand size override prefixes come out in the same order as explicit
ones instead of after all other prefixes.

Suggested-by: H. Peter Anvin <hpa@zytor.com>
2010-12-29 18:13:38 +01:00
H. Peter Anvin
47c95ceed4 BR 3143040: Remove invalid form of VPEXTRW
The 0F form, unlike the 0F3A form, of VPEXTRW cannot write a 16-bit
memory location by specification.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-12-23 16:37:14 -08:00
Keith Kanios
6faad4efe0 preproc.c: fix tokenize() warnings for ignored expansion definitions 2010-12-18 14:08:02 -06:00
Keith Kanios
02e49e0485 doc/nasmdoc.src: document additions from preprocessor-rewrite merge 2010-12-18 13:19:01 -06:00
Keith Kanios
21d885b164 preproc.c: simplify %un[i]macro warning message 2010-12-18 12:22:21 -06:00
Keith Kanios
c98a5b4c89 preproc.c: warn/ignore when attempting to %un[i]macro an active macro 2010-12-18 12:17:31 -06:00
Keith Kanios
6a7c3e9f30 preproc.c: replace tabs with spaces on recent commits 2010-12-18 11:49:53 -06:00
Keith Kanios
9412465dc1 preproc.c: free expansion definitions as needed 2010-12-18 11:47:28 -06:00
Keith Kanios
104803de9f preproc.c: free tokens when ignoring expansion definition lines 2010-12-18 11:05:46 -06:00
Keith Kanios
ba935f2bc5 preproc.c: placate tokenize() warnings during expansion definition 2010-12-18 10:54:39 -06:00
H. Peter Anvin
8305465cc0 NASM 2.10rc3 2010-12-17 17:55:22 -08:00
Cyrill Gorcunov
b8470a4708 insns.pl: Fix up merge conflict for sure
Now it should be fixed in real (one code snipped
escaped me during merge conflict resolving).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-23 20:21:45 +03:00
Cyrill Gorcunov
dc75745994 Merge branch 'insns'
Conflicts:
	insns.pl

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-23 19:26:24 +03:00
Cyrill Gorcunov
e29fc5f111 insns: Fixup MOV[APS|UPS] for xmmrm cases
In fact it was written as

	MOVAPS	xmmreg,xmmreg	\360\2\x0F\x28\110	KATMAI,SSE
	MOVAPS	xmmreg,xmmreg	\360\2\x0F\x29\101	KATMAI,SSE

in first place

	MOVUPS	xmmreg,xmmreg	\360\2\x0F\x10\110	KATMAI,SSE
	MOVUPS	xmmreg,xmmreg	\360\2\x0F\x11\101	KATMAI,SSE

and for example x28 stands for xmmrm128,xmmreg and
x1 for xmmrm128,xmmreg.

TODO: Inspect and fix WILLAMETTE instructions.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-23 18:39:07 +03:00
Cyrill Gorcunov
bf305019a8 insns: Implement size bits on KATMAI
Perhaps not all of them are coevered yet, but mostly.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-23 18:39:01 +03:00
Cyrill Gorcunov
a54b5eabd3 insns.pl: Clear tabs/space mess
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-23 18:38:56 +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
fac6eee993 Merge branch 'nasm-2.09.xx'
Conflicts:
	version

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-21 19:56:21 +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
bcf9f2a08b Merge branch 'nasm-2.09.xx' 2010-11-16 09:40:03 -08: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
Keith Kanios
3136d48212 preproc.c: fix handling of %? and %?? 2010-11-13 09:34:34 -06:00
Cyrill Gorcunov
5eaff1d2ca Merge branch 'cleanup' 2010-11-11 23:09:22 +03:00
Cyrill Gorcunov
eb7bf9811f Revert 29cb0bb1b3
Redundant call on nonsmart compilers doesn't
worth it in compare with two assignment operations.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 23:08:14 +03:00
Cyrill Gorcunov
49e8f698fc preproc: Add dump_token helper
While being debugging some nifty problem I found
that it might be useful to produce a full dump of
tokens, in particular text of tokens.

For this reason dump_token is here just to not loose
it. It doesn't affect normal build procedure since it
requires a special -DNASM_TRACE to be passed to the
compiler. Which of course we don't in a regular
compilations.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:35 +03:00
Cyrill Gorcunov
574fbf1972 preproc: Use nasm_zalloc more
To eliminate possible access into heap data

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:30 +03:00
Cyrill Gorcunov
a22e7a983c preproc: Use memset for stack allocated structure
To be on safe side

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:24 +03:00
Cyrill Gorcunov
6f38fe6cd5 preproc: inc_fopen -- set sl->next early
It's safer to init it early and be sure we not
miss anything after.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:18 +03:00
Cyrill Gorcunov
c515774a92 preproc: Use nasm_zalloc for new_ExpDef, new_ExpInv
Srink the code and make it a bit faster.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:13 +03:00
Cyrill Gorcunov
29cb0bb1b3 preproc: Use nasm_zalloc in new_Line
It's shorter

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:07 +03:00
Cyrill Gorcunov
325768ed4c autoconf: Add --with-ccache option
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:44:02 +03:00
Cyrill Gorcunov
a5aea577dd preproc.c: Get rid of tab/space mess
No change on binary level

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-11 22:43:56 +03:00
Cyrill Gorcunov
55cc4d0423 preproc: do_directive: Allocate 'Include' from zeroified-memory
If not all members of structure being allocated from
heap get initialized we better to use nasm_zalloc instead
of nasm_malloc.

For example inc gets allocated in do_directive being parially
initialized and we erroniously get mmac_depth set to some
crappy value leading to SIGSEV in result.

[ http://forum.nasm.us/index.php?topic=921.msg3257#msg3257 ]

nb: I've cleaned verror from tab/space mess while were at it

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-11-10 23:17:34 +03:00