Age | Commit message (Collapse) | Author | Files | Lines |
|
Apparently some people still care about compiling native on MS-DOS,
and we don't have a significant number of files which need adjustment.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Peter proposed to expand local single macros unconditionally.
This should not hurt but give us more cleaner code in result.
Reported-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Peter proposed to expand local single macros unconditionally.
This should not hurt but give us more cleaner code in result.
Reported-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
OpenWatcom, in particular, doesn't handle switch() statements with
64-bit expressions, sigh.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
OpenWatcom, in particular, doesn't handle switch() statements with
64-bit expressions, sigh.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Otherwise %{-1:-1} fails.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Introduce an ability to expand multi-line macros parameters in
a range/sequence manner.
For this purpose a special form is introduced %{x:y} which means to
expand %{x:y} to %{x},%{x+1},%{x+2},...,%{y}.
Both arguments could be negative or positive but MUST NOT be zero.
The arguments take into account possible %rotate as well.
Note that unlike the approach implemented in yasm we refer :-1 as
_last_ argument passed to a macro call, this makes possible to refer
the last element from macro via record as %{-1:-1} which could be
a convenient trick.
Also you can refer the argument in reverse order, ie it's legitime
to write %{5:4}, or even to reverse the all arguments %{-1:1}.
An example
|
| %macro mpar 1-*
| db %{1:-2}
| %endmacro
|
| mpar 1,2,3,4,5,6
in result we'll get the sequence of 1,2,3,4,5
Reported-by: nasm64developer <nasm64developer@users.sf.net>
Inspired-by: Mathieu Monnier <mathieu.monnier@polytechnique.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
It's much easier to read aligned
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
ARRAY_SIZE is a well known name pointing out that
we're dealing with array in macro argument.
Also to be on a safe side prefix_name helper should
check the index been in bounds more precisely.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
TOK_OTHER is legitime to follow TOK_PREPROC_ID so don't forget to handle it as well.
[ An addition to commit ec88c1beac00 ]
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
When we have switched to unified token pasting code we loose
backward compatibility. Restore it.
Note that new code MUST not expluatate this facility but rather
use paste macro %+ explicitly.
N.B. this patch is probably the candidate for revert, though
to give it a chance I commit it.
Reported-by: Alexey Dokuchaev
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
New standard macro package with utility macros for floating-point
constants.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
The possible sizes we can encounter are 1, 2, 4, 8... make sure we get
a proper error message.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Error out on any relocations not supported by the backend.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Support 8-bit relocations (OUT_ADDRESS and OUT_REL1ADR) in ELF.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Allow an intersegment jump to be short (OUT_REL1ADR) if explicitly
specified so by the user.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Add OUT_REL1ADR (one-byte relative address) and support for
OUT_ADDRESs with size == 1. Add support for it in
outbin and outdbg. *It still needs to be added to other backends*,
both the OUT_REL*ADR and OUT_ADDRESS codepaths need to be handled.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
macho_sectalign was occasionally misprinted
with macho_setcalign, fix it. No change on functionality.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
It's 2010 now
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
There is no need for it anymore.
Reported-by: "H. Peter Anvin" <hpa@linux.intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
format_mode is always set to 1 so there is no need to
keep this variable. "Old chicken bit" (c) :)
Reported-by: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
On x86-64 platforms, we can rely on BSR not changing the destination
operand when the input is zero.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
MSDN can't seem to keep their URLs stable, so use bouncer links
that we can change if necessary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
On win32/64 we have no 64 bytes limit so hit it on
"coff" target only.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Section alignment is broken due to not being
direct "align -> power of two set" mapping but
rather including second addition operation.
Fix it by introducing coff_sectalign_flags helper.
This also allow us to use this helper for getting
rid of open coded computation as well.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Put in all constants pecoff v8 states. Most probably we
will never need most of them but lets have them here for
completeness.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
When we need integer log2, use the new library routine.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Add ilog2_{32,64}() and alignlog2_{32,64}() ... the latter is intended
for alignment statements and return -1 for non-power-of-2 other than 0
(which returns 0).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
Achieved via sectalign call. Note that not all output
targets (ie formats) may handle sectalign yet, most
of them just ignore this entity.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Not all are covered but process initiated.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|