To make code more compact we introduce the
following string helpers:
1) nasm_scip_spaces - skip leading spaces
2) nasm_skip_word - skip leading non-spaces
3) nasm_zap_spaces - zap leading spaces with zero
4) nasm_zap_spaces_rev - zap spaces in reverse order
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
is_class does not checking flags "strictly". Which means
it may fail if type is specified to REGMEM and you check for
is_class(MEMORY, ...).
Anyway in current patch we check for REGISTER which doesn't
overlap and it is safe to use is_class here.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Do an "exclusive" test for a REGISTER operand when deciding to treat
sizes as wildcards. "Exclusive" meaning don't just accept any class
that could be REGISTER, but something that is strictly a part of the
REGISTER class.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Register with no size are a bit special: we don't honor extrinsic
register sizes in the first place ("oword xmm1" gives a warning,
even), and they should match any xmmrm size. As such, explicitly
handle sizeless register operands as a hard match, instead of relying
on the fuzzy-matching mechanism to handle them.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add integration rules in order to use NASM
seamlessly in your VS2k8.
Signed-off-by: Henry Tumblin <htumblin@users.sourceforge.net>
Signed-off-by: Frank Kotler <fbkotler@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
VERSION is already defined in version.nsh
no need to define it araing otherwise nsis
compiler fails.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
We always have "restore point" but such an action will
allow us to test new installer in more wide audience.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
- We need to change slashes to direct ones
- Installer file should be postfixed with plain "-installer"
- Remove nasm.exe duplication
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Lets start using new NSIS features like
Modern UI2, Multiuser install.
The file named nasm2.nsi by purpose -- we should
_not_ break existing functionality.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This represent "end of compilation unit" token.
Since gcc does (almost) the same lets be on the
same side.
Though to be precise gcc puts offset which points
to the first byte right after the last instruction
issued but in fact string index is analyzed only
so we may safely write zero here (without relocation
as well).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
1) nasm_free is safe against NULL passed so call
it without test
2) dwarf32_output: check for debug_immcall early
and get out of procedure if success. This allow
us to move code blocks left removing indents.
3) dwarf32_findfile and dwarf32_findsect: no need
for 'else' when 'if' target is plain return.
Move code blocks left removing indents.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Consolidate I_none opcode to be used everywhere
instead of mix (-1,I_none).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
There is a hope we'll be supporting dwarf in full form in future. So
I've encoded the standard constants (though binutils uses some
additional codes).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add strlcpy() function and implementation, and use configure to detect
if strlcpy() is natively available on the system.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This is the null implementation of the function debug_directive. For
some reason it ended up getting mangled as "null_debug_routine".
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
At moment we can't overrun buffer even if we would like to
but better to stay on a safe side and use snprintf.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
All other templates do not have them
so lets unify the approach.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
If [DEBUG id] has id longer then 80 symbols (well, 79 actually plus
EOS) then stack will be just overwritten.
Fix it with explicit check for identifier being too long.
Based on an initial version by Cyrill Gorcunov <gorcunov@gmail.com>.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Convert Intel AVX instructions to explisit size
format. Part 2.
Also CLMUL converted as well.
Btw, VPINSR was a bit broken since SB constraint
is not applied on all forms but requires 16,32,64
memory sizes too. Fixed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Convert Intel AVX instructions to explisit size
format. Part 1.
Also SAR instruction is touched as well.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Fix case where \\ needs to be written as \\\\ in order to appear as a
double backslash. Also add mention of release candidates and
snapshots.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
"Optimise" (and other -ise words) is en_GB, "optimize" (and other
"-ize" words) is en_US. Stick to en_US since that is what we seens to
be using more already.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>