Commit Graph

2008 Commits

Author SHA1 Message Date
Cyrill Gorcunov
1f6a046d85 BR2975768: Update AMD LWP instructions to match upcoming changes
The former changes have been committed to binutils.
From initial message:

|
| 2010-03-22 Quentin Neill <quentin.neill@amd.com>
|           Sebastian Pop  <sebastian.pop@amd.com>
|
|	opcodes/
|	* i386-dis.c (OP_LWP_I): Removed.
|	(reg_table): Do not use OP_LWP_I, use Iq.
|	(OP_LWPCB_E): Remove use of names16.
|	(OP_LWP_E): Same.
|	* i386-opc.tbl: Removed 16bit LWP insns.  32bit LWP insns
|	should not set the Vex.length bit.
|	* i386-tbl.h: Regenerated.
|
|	gas/
|	* testsuite/gas/i386/x86-64-lwp.s: Remove use of 16bit LWP insns.
|	* testsuite/gas/i386/lwp.s: Same.
|	* testsuite/gas/i386/x86-64-lwp.d: Updated.
|	* testsuite/gas/i386/lwp.d: Updated.
|

So there is no 16 bit instructions anymore.
Also xop.l field should be set to 0.

Based on patch from nasm64developer

Reported-by: nasm64developer
Signed-off-by: nasm64developer
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-03-25 00:37:26 +03:00
Victor van den Elzen
0d268fb78c BR 2496848: Tighten ea checks
Check if the offset and the representation are equivalent.

Disallow REL on absolute addresses.
I'm not sure what that would mean and the output formats don't support it.

Warn about ignored displacement size modifiers.
2010-03-12 23:52:04 +01:00
Victor van den Elzen
defdaebcbb NASM 2.08.01 2010-03-10 23:18:57 +01:00
Victor van den Elzen
35eb2ea2ee preproc.c: Fix regression introduced in bebf0d215 2010-03-10 22:33:48 +01:00
Cyrill Gorcunov
c158c713d1 NASM 2.08 2010-03-10 23:46:06 +03:00
Cyrill Gorcunov
90bb2850fa doc/changes.src: Restore empty line.
Due to previous commit empty line was occasionally
removed which make text harder to read. Restore it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-03-03 23:15:25 +03:00
Cyrill Gorcunov
3dce1e162d Update doc/changes.src
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-03-03 23:13:48 +03:00
Cyrill Gorcunov
27fb3703a5 misc/tag-release: Make it usable for remote repos
In case if the commiter has a main repo configured as remote
one and also has various tags (and don't want to push every
tag he has out to the main repo) he may use misc/tag-release
new functionality.

For example I have NASM remote repo as well known

	git://repo.or.cz/nasm.git

and a number of my own local tags/branches which I
would like to not sprinkle into a master repo.

So to make a release (say 2.08) I may just type

	misc/tag-release 2.08 git+ssh://xxx@repo.or.cz/srv/git/nasm.git master

and this command will push master branch into main repo with "nasm-2.08" tag.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-03-03 22:41:45 +03:00
Cyrill Gorcunov
305b2b43c4 NASM 2.08rc10
We decided to defer recursive macro support
for now.

Hope this is the last RC before 2.08 final release.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-03-01 00:56:01 +03:00
Cyrill Gorcunov
f09116f445 preproc.c: Turn off rmacro,exitmacro support
We've a problem in supporting [i]rmacro, exitmacro
facilities at moment.

In a sake of not holding new NASM release any longer these
directives are just marked as being "forbidden".

This allow us to not squash much changes in current source
code base but remain on a safe side same time.

Reviewed-by: Keith Kanios <keith@kanios.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-28 12:24:20 +03:00
H. Peter Anvin
3031bb8ee2 phash.ph: we haven't required the Graph module for a long time
We removed the need for the Graph module back at checkin
c593173e11 in 2008.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-02-18 10:36:21 -08:00
Cyrill Gorcunov
7bb0e5263a labels.c: Fix NULL dereference on too long identifiers
In case if label is local and exceed maximum allowed length
we get NULL dereference. Fix it and warn a user about an accident.

Note that we don't print identifier itself since we know it's too
big. Line number of error is enough.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-18 19:06:14 +03:00
Cyrill Gorcunov
1579c88185 Revert "doc/nasmdoc.src: Get rid of id length restriction"
This reverts commit 3012d5d430.

nasm64developer pointed out that we still have this
limit in label.c (IDLEN_MAX).

Reported-by: nasm64developer
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-17 01:21:54 +03:00
Cyrill Gorcunov
8e48edb68a preproc.c: Eliminate parasite comment on PP_STACKSIZE
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-17 00:11:07 +03:00
Cyrill Gorcunov
accda195a3 preproc.c: Fix tab\space mess
It's really hard to read the code which is
terribly messed in tabs\spaces. Fix it all
at once. It's dirty work but has to be done
once.

No change on binary level.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-17 00:11:01 +03:00
Cyrill Gorcunov
3012d5d430 doc/nasmdoc.src: Get rid of id length restriction
We always allocate enough memory to hold identifiers
with any length. So lets remove restriction from
documentation.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-17 00:08:55 +03:00
Cyrill Gorcunov
2e624179ad doc/nasmdoc.src: Point to the correct license file
There is no "COPYING" but "LICENSE" file.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-17 00:08:36 +03:00
Cyrill Gorcunov
e2063ab9e4 doc/nasmdoc.src: It's 2010 already
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-17 00:08:28 +03:00
H. Peter Anvin
190223ab29 NASM 2.08rc9 2010-02-15 10:16:18 -08:00
H. Peter Anvin
3af3779826 doc/changes.src: update in preparation of 2.08 release
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-02-15 10:15:53 -08:00
Cyrill Gorcunov
a327c65d28 preproc.c: Fix SIGSEV on missed %endm
In case if EOF is reached (or due to any
other case pp_cleanup is being called) we
do free "defining" macro but forgot to set
pointer to NULL itself which leads to attempt
to free memory again for this macro on further
pp_cleanup calls.
2010-02-14 17:27:10 +03:00
Cyrill Gorcunov
bebf0d2157 preproc.c: Fix NULL dereference on package absence
If package can't be retrieved we should not attempt
to dereference NULL'ed pointer which leads to segmentation
fault.

Reported-by: Serge
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-12 22:00:18 +03:00
Cyrill Gorcunov
d5d36498aa NASM 2.08rc8 2010-02-11 22:11:16 +03:00
Cyrill Gorcunov
6fe313a719 output/outbin.c: Fix misprinted alignment bound
Due to a misprint in commit
9b66d8e4c3

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-11 21:49:58 +03:00
Cyrill Gorcunov
c56d9ad350 expand_smacro: Don't search for ID in global context
The corner case is the code like

%define foo 1
%push bar
%$foo:
%pop

for which v2.07 ends up with "foo = 1" while 0.98.39
issue an error.

hpa said that ideally we may need to create a context
structure for the global context but this seems to be
too agressive for 2.08.

Based on patch from nasm64developer

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-11 21:28:41 +03:00
Cyrill Gorcunov
3cbd9e7215 Elf: Drop useless SEG_ALIGN_1
No need for SEG_ALIGN_1 since we have switched
to ALIGN helper.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-11 21:28:34 +03:00
Cyrill Gorcunov
9b66d8e4c3 Use ALIGN helper
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-11 21:28:30 +03:00
Cyrill Gorcunov
89fe355ad0 nasmlib.h: Introduce ALIGN helpers
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-11 21:28:27 +03:00
Per Jessen
53252e0cc3 preproc.c: Use 16 byte offset in "flat64" stack model
The first argument passed on stack with "flat64" stack model
(stack frame with base pointer) should be pointed by
[rbp + 16].

Signed-off-by: Per Jessen <per@computer.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-11 21:28:22 +03:00
Cyrill Gorcunov
7ce4250a63 doc/nasmdoc.src: Delete misplaced "point" sign
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-02-10 23:31:03 +03:00
Alexander Ilyin
424f7bb106 contrib/MSVC6.txt: Add guide how to use nasm in MSVC6
It's possible to use nasm as asm compiled right within
MSVC6 IDE. Lets point it out via a small guide.

Signed-off-by: Alexander Ilyin <dragity@mail.ru>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-24 23:17:55 +03:00
Cyrill Gorcunov
f9958faaea nasmlib.c: Use UINT64_C for 64bit constants
In a sake of portability we should better use
UINT64_C instead of open-coded ULL postfix.

[ BR2938449 ]

Reported-by: Alexander Ilyin <dragity@mail.ru>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-24 21:28:28 +03:00
H. Peter Anvin
75764da5dc NASM 2.08rc7 2010-01-12 09:07:02 -08:00
Cyrill Gorcunov
d879900c5a nasm.c: Restore strings broken by indent
A number of strings are broken by nindent passed over the nasm.c.
Though the compiler doesn't care about this fact it's really
unpleasant to have a string split at "dot" symbol.

Lets restore it in a sake of readability.

(No change on binary level)

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-09 20:36:18 +03:00
H. Peter Anvin
b849f7f6f7 README: add note to see the AUTHORS file 2010-01-06 20:56:11 -08:00
H. Peter Anvin
c8d10038e2 insns.dat: in 64-bit mode, accept "monitor rax,ecx,edx".
The first argument to MONITOR is an address, so it should be 64 bits
(RAX) in 64-bit mode.

The preferred form is still just plain "monitor".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2010-01-06 16:07:26 -08:00
Cyrill Gorcunov
48a434e1a9 Mkfiles: Add depends on stabs.h for Elf output
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 16:19:43 +03:00
Cyrill Gorcunov
7a8098c7cb doc/changes.src: Update changes
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 15:41:22 +03:00
Cyrill Gorcunov
a135658e83 ELF: Explicitly point out SYM_GLOBAL, SYM_LOCAL binding
Instead of implicit declaration of global symbols obtained
by STB_GLOBAL << 4, and local symbols by STB_LOCAL << 4
use ELF32_ST_MKBIND helpers.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 15:04:46 +03:00
Cyrill Gorcunov
de623f2679 elf.h: Add ELFXX_ST_MKBIND and move ELFXX_ST_ helpers
The profit of ELFXX_ST_MKBIND helper is that we
will use it for SYM_GLOBAL explicitly pointing
out from where this magic 0x10 came from.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 15:04:41 +03:00
Cyrill Gorcunov
126faf2e3b output/outelfX.c: Use definitions from stabs.h
Also made Makefile.in to handle dependency.
There are some makefiles in Mkfiles\ should
be fixed as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 15:04:36 +03:00
Cyrill Gorcunov
d1428b23da Add common STABs definition into output/stabs.h
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 15:04:31 +03:00
Cyrill Gorcunov
c9862c009b outelfX.c: Trivial cleanup
Some tab\space convertions together with
trivial style nitfix.

No change on binary level.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 15:04:26 +03:00
Cyrill Gorcunov
762e401937 BR2924380: Add AMD LWP instructions
nasm64developer reported that we have no LWP support yet.
Add this feature.

Reported-by: nasm64developer <nasm64developer@users.sf.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 14:58:06 +03:00
Cyrill Gorcunov
5890ab39f8 BR2924383: fix XOP instructions
nasm64developer reported a few nits in XOP
instruction templates. Plain typo in specification
(http://support.amd.com/us/Processor_TechDocs/43479.pdf)
and opcode errors.

Reported-by: nasm64developer <nasm64developer@users.sf.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 00:40:54 +03:00
Cyrill Gorcunov
c09bd81ff3 BR2924583: fix FMA4 instructions
nasm64developer reported that VFNMADDSD and VFNMADDSS
have "m" and "s" operands swapped in instruction templates
file.

Reported-by: nasm64developer <nasm64developer@users.sf.net>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-03 00:09:41 +03:00
Cyrill Gorcunov
3b4c769d99 Elf: Allow symbols binding to undefined section
Commit 2ddcd03900
did bind symbols (in case of omitted SECTION directive)
to .text section but break COMMON binding.
Fix it.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-01-02 23:00:43 +03:00
Cyrill Gorcunov
3e73cfc8b7 doc/nasmdoc.src: Update the number of sync points in docs
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2009-12-22 23:42:07 +03:00
Cyrill Gorcunov
faaad6e75d sync.c: Get sync points limit back
We should explicitly check if we can hold the sync
point, otherwise we may wrap the array index and
reach incorrect value (if we're lucky).

So instead we make the index "almost" unlmited.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2009-12-22 23:42:03 +03:00
Cyrill Gorcunov
f064c1cb02 sync.c: Style nitfix
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2009-12-22 23:41:59 +03:00