These two really need to be done together, in order for constructs
such as %[%1] to work properly. Furthermore, fix a token-pasting bug
in expand_mmac_params().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Better grammar and fix incorrect description of the number-overflow
warning (it is not just limited to 64-bit arithmetic overflow, it also
triggers when trying to squeeze in a value which is too large into an
immediate.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The code to parse the -w/-W options was updating warning_on[], not
warning_on_global[], but warning_on[] is reset at the beginning of
each pass (to let the warning directive work); as a result the -w/-W
options don't actually do anything at all.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Set STT_TLS in symbol table for symbols declared
in thread local storage sections. Note that,
for now at least, such symbols must also be
declared as GLOBAL.
Remove unnecessary duplicated patterns; with indirection we can handle
lists of any length.
For 16-bit generic padding, alternate between SI and DI dependencies.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Use expand_id() for the argument to %use, instead of expand_smacro().
This really makes more sense for a "naked" argument. This is a
semantic change, but is unlikely to break any real code.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Allow the %pop directive to take an identifier (an assert on the
context name); unify the parsing parts of %push, %repl, and %pop.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
When producing the mangled version number, don't add a subminor if
there isn't a patch level or release candidate number. Thus, 2.05p1
is 2.05.00.01, but 2.05 can just be 2.05.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Fix op2 references not yet converted to accessing op2; add an opy
pointer similar to the opx pointer instead of multiple references.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The bytecode format assumes max 4 operands pretty strictly, but we
already have one instruction with 5 operands, and it's likely to get
more. Support them via extension prefixes (similar to REX prefixes).
For bytecodes which use argument bytes we encode the number directly,
however.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
When issuing warnings for EA displacements during address generation,
actually look a the proper operand!
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The CRC32 instructions require F2, but can also take a 66 prefix to
set the operand size. This is not the SSE model of prefix extension.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Not all backends can handle being handled an intrasegment OUT_REL*ADR,
and we don't fix them up in common code either (which would be the
logical thing to do -- right now we fix them up in a bunch of
individual places.)
For now, just fix up the one in address generation.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The "bin" format was misinterpreting the overloading of the "size"
argument to out(), which caused another source of 64-bit relative
offset errors.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Fix the case where the terminal token pastes with the first token of
the unmodified sequence. This is a really ugly version; we need to
merge the two instances plus the one in expand_mmac_params().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
When locating the end of a %[...] construct, we need to end up with
the pointer pointing to the terminating character.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Use a "times" construct rather than "%rep" for higher performance.
No need to preprocess the same line over and over for no good reason.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Linked lists where an element may be deleted or substituted during
processing can be subtle to deal with. Fix the iteration conditions
in this particular case.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>