There is no reason why the warning-generating ilog2 has to be only the
floor variant. However, I am pretty sure we can simply implement the
ilog2cw() as a macro only; we can always fix that if that turns out to
be incorrect.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Output the kerning tables in the metrics headers. This will hopefully
make it possible to support kerning later (e.g. using the PostScript kshow
operator with some kind of kerning function.)
Note: the previous ordering of the metrics output was sensitive to the
particular hashing algorithm used in that version of Perl. This
version sorts them in order to keep them stable, but which obviously
completely changes the (otherwise unmodified) widths part of the output.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
The code to handle building in a separate directory had seriously
bitrotted. This contains a number of fixes to make it possible,
including bits like the documentation which never worked in the past.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Document the label fix; although a global error, it was user-visible
in the Codeview backend so document it as such.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Jim Kukunas <james.t.kukunas@linux.intel.com>
We probably ought to release 2.12.01 in the short term. So far the
changes that have accumulated have all been build fixes.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Instead of completely useless sequential line numbers, emit line
numbers corresponding to the line numbers in the source code.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Remove the --allow-64-bits relocation, and instead make it a
suppressible warning in the case of a zero-extended relocation, and an
error in the case of a sign-extended relocation.
Relocations which can be losslessly represented in the output format
do not issue any diagnostic at all, as there is no problem in that
case.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add the option --allow-64-bit to permit the generation of 64-bit code
even for a 16/32-bit output format.
Using NASM to do some boot strapping code and ran into trouble when
trying to emit a few 64-bit instructions in the OMF object file doing
the mode switching. While I can see how the "error: obj output format
does not support 64-bit code" message can be a useful reality check
for application programmers, it prevents low-level programmers from
doing what they want. It if was just a harmless warning, it wouldn't
be so bad, but it turns BITS 64 into BITS 16. The main trick to mixing
64-bit code into OMF and other 32-bit output formats is to avoid
64-bit sized fixups, which normally isn't too hard.
[hpa: shortened the option name to --allow-64-bit, minor code cleanups]
Signed-off-by: Knut St. Osmundsen <bird-nasm@anduin.net>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add the CLFLUSHOPT instruction from the Intel Instruction Set
Architecture Extensions document version 319433-018 (Feb 2014).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Add the XSAVEC, XSAVES, and XRSTORS instructions from the Intel SDM
release 253665-050US (Feb 2014).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
[nosplit eax] has been encoded as [eax*1+0] since 0.98.34.
But this seems like unexpected behavior.
So only when a register is multiplied, that will be treated
as an index. ([nosplit eax*1] -> [eax*1+0])
Document is updated accordingly.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
[nosplit eax+eax] was encoded [eax*2] previously but
this seems against the user's intention.
So in this case, nosplit is ignored now and [eax+eax] will be
generated.
Document is also updated accordingly.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Added bnd warning and nobnd prefix. DEFAULT directive section
has got more description about BND-related settings.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>
Allow specifying {vex3} or {vex2} (the latter is currently always
redundant, unless we end up with instructions at some point can be
specified with legacy prefixes or VEX) to select a specific encoding
of VEX-encoded instructions.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Added the list of features added since 2.10 release.
Nasmdoc is also updated with those new features.
Signed-off-by: Jin Kyu Song <jin.kyu.song@intel.com>