Commit Graph

2407 Commits

Author SHA1 Message Date
Jasper Neuman
619bfc87d1 insns.h: Add BMI1 and BMI2 flags for further usage
Signed-off-by: Jasper Neuman <jasper.neumann@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-07 00:03:49 +04:00
Cyrill Gorcunov
4e40962918 preproc: Drop useless assignments
new_ExpDef does zalloc'ate memory so no need
to assign zeros again.

Same time it should fix MSC complains on NULL assignment
on boolean variable.

Reported-by: Jasper Neuman <jasper.neumann@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-06 23:12:55 +04:00
Cyrill Gorcunov
454b0f23b8 Merge branch 'nasm-2.09.xx'
Conflicts:
	version

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-04 00:51:53 +04:00
Cyrill Gorcunov
ffee19a3b2 NASM 2.09.09
Just a few fixes only but serious enough to yield
new stable series

 - Unitialized memory parsing in bin format section attibutes.
 - MachO NULL dereference

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-04 00:49:12 +04:00
Cyrill Gorcunov
68868b09e3 doc: Describe changes for stable version
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-04 00:47:08 +04:00
Keith Kanios
52afa0c5d4 BR3282788: Fix 64-bit Mach-O bug that crashes NASM due to NULL symbols 2011-07-04 00:38:33 +04:00
Cyrill Gorcunov
56dd9fd83d output/outbin.c: initialize section attribs upon creation
Basically it's backport of commits

11db774a15
3bc3ff2fb6
c13deef255
e3f4780665

They were missed to back-merge in a first place.

Reported-by: Keith Kanios <keith@kanios.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-04 00:33:24 +04:00
Cyrill Gorcunov
86b2ad05f8 preproc: Move Preproc type to preproc_ops structure
There is no need to hide this structure into a type.
The former preproc_ops is a way more descriptive.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-07-02 00:15:24 +04:00
Cyrill Gorcunov
0ad6a7b293 preproc: Refactor smacro paramters expansion
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-30 01:36:45 +04:00
Cyrill Gorcunov
194ba892ca preproc: Add smacro paramter helpers
I belive this should simply code a bit.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-30 01:16:35 +04:00
Cyrill Gorcunov
5b6c96b9fd preproc: Alignment in loop
Just for easier reading

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-30 00:22:53 +04:00
Cyrill Gorcunov
8a61142504 insns: Mark AVX2 instructions as FUTURE
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-29 23:35:53 +04:00
Cyrill Gorcunov
290eac7569 preproc: Finally drop context-through search
2.09 series was the last one we support context-thru search
(and we were issuing a warning about that) so drop all-context
from get_ctx() routine.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-28 02:01:47 +04:00
Cyrill Gorcunov
b6c6ca96e7 preproc: nasm_free is safe against NULL argument
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-28 01:33:02 +04:00
Cyrill Gorcunov
c6a742cb6b Revert "BR3288901: Relax concat rules in preprocessor code"
This reverts commit cb00cd1ba7.

As Victor pointed out some tests do not pass with this commit
so revert it until things get fixed.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-27 01:23:09 +04:00
Cyrill Gorcunov
fdd0ac5f43 preproc: Add trace point into paste_tokens
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-27 01:22:27 +04:00
Cyrill Gorcunov
2e04600e3d preproc: Some more tracing calls
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-26 23:33:56 +04:00
Cyrill Gorcunov
9d1141aea9 preproc: Missed double charp in nasm_trace
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-26 23:07:35 +04:00
Cyrill Gorcunov
9880ea4572 insns: A few more AVX2 instructions
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-26 10:45:10 +04:00
Cyrill Gorcunov
92569ece7b insns: Add VPERMD instruction
We somehow missed it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-26 02:07:22 +04:00
Cyrill Gorcunov
767a4e8313 test: Add movd.asm
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-26 01:53:38 +04:00
Cyrill Gorcunov
ed33be2519 insns: Allow MOVD xmmreg,rm32 to be used in 32bit mode
Reported-by: Keith Kanios <keith@kanios.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-26 01:49:29 +04:00
Cyrill Gorcunov
fc0c1281db preproc: Add tokenization tracing
It's a bit more than that, also TRACE=1 make
flag added to run this facility on and off
at compiling time.

Debug feature only, doesn't affect regular users.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 19:51:44 +04:00
Cyrill Gorcunov
82667ff5d3 preproc.c: Get rid of a few tabs and update year
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 19:34:19 +04:00
Cyrill Gorcunov
3eba69a63a preproc.c: Use list_reverse helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 18:16:54 +04:00
Cyrill Gorcunov
396b5dfe95 nasmlib: Add list_reverse helper
There is no way to make it as a helper function
for a while, we need to unify list processing
in general (ie to use abstract list type).

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 18:15:41 +04:00
Cyrill Gorcunov
87225da76d nasmlib: Add list_last helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 18:15:21 +04:00
Cyrill Gorcunov
a39912dcd9 Move numvalue herleper into nasmlib.h
No need to duplicate implementation.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 12:10:40 +04:00
Cyrill Gorcunov
fb27fc21e7 preproc: Drop unused 'mtok' variable
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2011-06-25 12:08:30 +04:00
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 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 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 dd9c9752ea.
2011-04-09 10:33:06 -05:00
Keith Kanios
256901bbbc Revert "nasmlib.c: fix issues with strrep utility function"
This reverts commit f16401f9aa.
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 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