summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-15Rename filenames to 8.3 formatH. Peter Anvin11-324/+316
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>
2010-06-08expand_mmac_params: Expand local single macros unconditionallyCyrill Gorcunov1-8/+1
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>
2010-06-08expand_mmac_params: Expand local single macros unconditionallyCyrill Gorcunov1-6/+1
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>
2010-06-07outobj: handle compilers without 64-bit switch() supportH. Peter Anvin1-1/+5
OpenWatcom, in particular, doesn't handle switch() statements with 64-bit expressions, sigh. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-06-07outelf32: handle compilers without 64-bit switch() supportH. Peter Anvin1-14/+22
OpenWatcom, in particular, doesn't handle switch() statements with 64-bit expressions, sigh. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-06-06NASM 2.09rc1Cyrill Gorcunov1-1/+1
2010-06-05nasmdoc: Document macro parameters rangeCyrill Gorcunov1-1/+43
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-06-05expand_mmac_params_range: Simplify conditionCyrill Gorcunov1-4/+2
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-06-05preproc.c: Fix argument indices checking in parameters rangeCyrill Gorcunov1-2/+4
Otherwise %{-1:-1} fails. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-06-05preproc.c: Introduce macros parameters range expansionCyrill Gorcunov1-77/+164
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>
2010-06-04expand_mmac_params: Format conditionCyrill Gorcunov1-3/+3
It's much easier to read aligned Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-06-03nasmlib: Rename elements() macro to ARRAY_SIZECyrill Gorcunov4-8/+7
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>
2010-06-02preproc.c: Use list_ helpersCyrill Gorcunov1-33/+23
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-06-02expand_mmac_params: Don't forget to handle TOK_OTHERCyrill Gorcunov1-1/+2
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>
2010-06-02BR3005117: Expland local single macro before pasting tokensCyrill Gorcunov1-0/+26
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>
2010-05-07New %use package "fp"H. Peter Anvin1-0/+54
New standard macro package with utility macros for floating-point constants. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-05-07nasmdoc: document octal/binary floating-pointH. Peter Anvin1-5/+9
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-05-07nasmdoc: add missing commaH. Peter Anvin1-1/+1
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-05-07nasmdoc: update the full set of numeric prefix/suffix characters.H. Peter Anvin1-7/+11
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-05-06outobj: update error messageH. Peter Anvin1-2/+2
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>
2010-05-06outobj: properly error on unsupported relocationsH. Peter Anvin1-12/+38
Error out on any relocations not supported by the backend. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-05-06outelf64: update copyright dateH. Peter Anvin1-1/+1
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-05-06ELF support for 8-bit relocationsH. Peter Anvin2-35/+92
Support 8-bit relocations (OUT_ADDRESS and OUT_REL1ADR) in ELF. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-05-06Permit short intersegment jumpsH. Peter Anvin1-9/+13
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>
2010-05-06Add support for one-byte relocationsH. Peter Anvin6-126/+68
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>
2010-04-28MachO: Fix misprinted macho_sectalignCyrill Gorcunov2-4/+4
macho_sectalign was occasionally misprinted with macho_setcalign, fix it. No change on functionality. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-25obj: Implement sectalign helperCyrill Gorcunov1-1/+44
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-25macho: Implement sectalign handlerCyrill Gorcunov2-2/+36
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-25ieee: Fix section index match in sectalign handlerCyrill Gorcunov1-1/+1
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-25headers: Update yearCyrill Gorcunov4-8/+8
It's 2010 now Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-25outieee: Implement sectalign handlerCyrill Gorcunov1-1/+23
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22outbin: Drop current_section variableCyrill Gorcunov1-7/+3
There is no need for it anymore. Reported-by: "H. Peter Anvin" <hpa@linux.intel.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22outbin: Prune ancient format_mode variableCyrill Gorcunov1-42/+22
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>
2010-04-22ilog2: optimize use of bsr for x86-64H. Peter Anvin1-6/+6
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>
2010-04-22doc: use bouncer URLs for the ABI docsH. Peter Anvin1-2/+2
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>
2010-04-22bin: Implement sectalign handlerCyrill Gorcunov1-3/+24
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22coff: Use IMAGE_SCN_ALIGN_MASK macroCyrill Gorcunov1-2/+2
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22coff: Allow alignment greater then 64 bytes on winCyrill Gorcunov1-1/+5
On win32/64 we have no 64 bytes limit so hit it on "coff" target only. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22coff: Fix section alignment computationCyrill Gorcunov1-8/+7
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>
2010-04-22coff: Use predefined macros instead of numbers and style fixCyrill Gorcunov1-145/+160
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22ilog2: Use ROUND helperCyrill Gorcunov1-43/+22
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22ilog2: Get rid of tabsCyrill Gorcunov1-69/+69
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-22pecoff.h: Complete headerCyrill Gorcunov1-2/+269
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>
2010-04-21Remove open-coded ilog2() implementationsH. Peter Anvin3-67/+3
When we need integer log2, use the new library routine. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-04-21Add generic ilog2 functionsH. Peter Anvin7-12/+216
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>
2010-04-21Makefile: clean up the lib directory on make cleanH. Peter Anvin4-0/+10
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2010-04-21standard.mac: Update section alignment on align callCyrill Gorcunov1-0/+2
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>
2010-04-21coff: Use predefined macro in common section flagsCyrill Gorcunov1-6/+49
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-21coff: Use predefined macro and eliminate open coded constantsCyrill Gorcunov1-16/+9
Not all are covered but process initiated. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2010-04-21pecoff.h: Add more constantsCyrill Gorcunov1-0/+90
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>