2578 Commits

Author SHA1 Message Date
Cyrill Gorcunov
9fde335005 nassm.c: Use evaluate for section alignment
This allow us to write the whole expressions
on section alignments, such as

	align 0xa+6

or whatever math. Should be a way more convenient
than hardnumbers scheme we had.

Reported-by: Frank Kotler <fbkotler@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 12:05:51 +04:00
Cyrill Gorcunov
cb00cd1ba7 BR3288901: Relax concat rules in preprocessor code
We simply allow the following terminals to be concat'ed
if they are written without space or any other separator
inbetween.

        a := id | preproc-id | number | float | other
        b := id | preproc-id | number | float | other

        if match(a,b):
                s := concat(a,b)
                re-tokenize(s)

Basically it means it's up to code author to write
preproc code a way the sane production appears.

Some notes.

1) We don't concat strings.

2) The 'weirdpaste' test fails now because with relaxed
   rules it works as needed and was borken before.

   The lacmus snippet is

        %define N 1e%++%+ 5
        dd N, 1e+5

Previously the output was

        dd 1e+%+ 5, 1e+5

which is wrong since we have explicit concat here
with %+ operator. The new code production is correct
and looks like

        dd 1e+5, 1e+5

as expected.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 12:03:36 +04:00
Cyrill Gorcunov
80594e79ed insns: Mark VGATHERDPD as AVX2 instructions
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 12:01:52 +04:00
Cyrill Gorcunov
f753cd2fd3 Add IF_AVX2 flag
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 12:01:30 +04:00
H. Peter Anvin
08c023fffb Merge branch 'nasm-2.09.xx' 2011-06-23 13:41:01 -07:00
H. Peter Anvin
bf5652d220 rdoff: add missing dependency in Makefile
Add back a dependency which was accidentally dropped for the previous
build bug fix.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-06-23 13:40:06 -07:00
H. Peter Anvin
1f0e0bcf1f Merge branch 'nasm-2.09.xx' 2011-06-23 13:27:43 -07:00
H. Peter Anvin
c050362865 Makefile: hopefully fix rdoff parallel build problems
The strange dependency on nasmlib.o causes serious issues in parallel
build; hopefully fix it.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-06-23 13:26:59 -07:00
H. Peter Anvin
95adeabff5 Implement the VGATHERP instruction
As an initial test of the VSIB handling, implement the VGATHERP
instruction.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-06-22 18:20:28 -07:00
H. Peter Anvin
3089f7ef8a Add support for VSIB instructions
Add support for VSIB instructions, which use vector registers as the
index registers in an EA.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-06-22 18:19:28 -07:00
H. Peter Anvin
9f7ce6bdd9 NASM 2.10rc6 nasm-2.10rc6 2011-06-06 14:55:59 -07:00
H. Peter Anvin
55fe7735cf spec: update to match requirements of Fedora 14+
"PreReq" is no longer accepted as an alias for "Requires".  Sigh.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2011-06-06 14:53:22 -07:00
H. Peter Anvin
20306b2b8c NASM 2.10rc5 nasm-2.10rc5 2011-06-03 18:15:25 -07:00
Keith Kanios
8052664433 BR3282788: Fix 64-bit Mach-O bug that crashes NASM due to NULL symbols 2011-04-11 21:38:50 -05:00
Keith Kanios
918317c4ce Revert "nasmlib: added string replace (strrep) utility function"
This reverts commit dd9c9752ead3a39fec6f050bfe3ac8768defc02f.
2011-04-09 10:33:06 -05:00
Keith Kanios
256901bbbc Revert "nasmlib.c: fix issues with strrep utility function"
This reverts commit f16401f9aabb550a556d3a462f428a3b52f6f9c3.
2011-04-09 10:30:20 -05:00
Keith Kanios
f16401f9aa nasmlib.c: fix issues with strrep utility function 2011-04-08 01:20:09 -05:00
Keith Kanios
dd9c9752ea nasmlib: added string replace (strrep) utility function 2011-04-08 00:23:21 -05:00
Cyrill Gorcunov
a4f98b3aab Merge branch 'nasm-2.09.xx'
Conflicts:
	nasm.h
	version

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-04-06 19:12:17 +04:00
Cyrill Gorcunov
a4b1c5c68e NASM 2.09.08 nasm-2.09.08 2011-04-06 19:10:24 +04:00
Cyrill Gorcunov
47e7ecda1b doc: Updates for stable branch fix
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-04-06 19:08:34 +04:00
Cyrill Gorcunov
c1936da942 ofmt: Alias shortname must be used for __OUTPUT_FORMAT__ macro
__OUTPUT_FORMAT__ must consist of shortname of output format
or its alias, otherwise userspace ABI gets broken.

For example source code still can refer to __OUTPUT_FORMAT__=elf,
instead of __OUTPUT_FORMAT__=elf32.

BR3246990

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-04-06 18:32:15 +04:00
H. Peter Anvin
2250195a1a Merge branch 'nasm-2.09.xx' 2011-03-15 15:41:54 -07:00
Jiri Malak
f2536e10a0 openwcom.mak: Update to use features from newer WMAKE
Change the OpenWatcom WMAKE Makefile to use the facilities available
in WMAKE to support cross-compilation properly.

See BR 3079573.
2011-03-15 15:40:53 -07:00
Cyrill Gorcunov
a09fe1ebfb Merge branch 'nasm-2.09.xx'
Conflicts:
	doc/changes.src
	version

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-12 22:35:42 +03:00
Cyrill Gorcunov
faa13a2414 NASM 2.09.07
- Fix crash for -a option
 - Fix VEXTRACTF128, VMASKMOVPS instructions

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
nasm-2.09.07
2011-03-12 22:31:15 +03:00
Cyrill Gorcunov
eb9b2943c6 doc: Update changes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-07 12:44:43 +03:00
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
8dcfd883c7 preproc.c: Fix use-after-free bug
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-03-05 23:54:49 +03:00
Cyrill Gorcunov
a5c9912303 NASM 2.10rc4 nasm-2.10rc4 2011-02-28 10:05:15 +03:00
Cyrill Gorcunov
1616b9d665 Merge branch 'nasm-2.09.xx'
Conflicts:
	doc/changes.src
	output/outbin.c
	version

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 10:03:53 +03:00
Cyrill Gorcunov
a59c759e09 NASM 2.09.06 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
befc631d04 elf64: Use nasm_zalloc helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 09:45:43 +03:00
Cyrill Gorcunov
efc249d8fc outelf32: Use nasm_zalloc helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 09:40:43 +03:00
Cyrill Gorcunov
b4af1ac765 outcoff: Use nasm_zalloc helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 09:33:08 +03:00
Cyrill Gorcunov
c13deef255 bin: Use nasm_zalloc for default section creation
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 09:28:25 +03:00
Cyrill Gorcunov
6b27129f80 preproc: Use nasm_zalloc helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 08:45:52 +03:00
Cyrill Gorcunov
3bc3ff2fb6 bin: Use nasm_zalloc helper for section allocation in a sake of simplicity
Instead of opencoded zero assignments better to use nasm_zalloc
and set fields which are supposed to be non-nil. This simplifies
code and makes it more readable.

Also note the field 'ifollows' renamed to 'prev' as it should
be from the very beginning in terms of lists.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-02-28 01:26:24 +03:00
Keith Kanios
11db774a15 output/outbin.c: initialize section align/start attributes upon creation 2011-02-27 13:14:32 -06:00
Cyrill Gorcunov
4e45e61055 Merge branch 'nasm-2.09.xx' 2011-02-23 00:49:41 +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
8c918b30b9 Merge branch 'nasm-2.09.xx' 2011-02-21 18:19:26 +03:00