summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* elf16: WIP: support for 16-bit segmented relocations in ELF32elf16H. Peter Anvin2018-12-242-70/+126
| | | | | | | | | | | | | | Add very preliminary support for 16-bit segmented relocations. This does not handle segmented programming in any kind of programmer-friendly way, but it is the beginning to something testable. (Prototype) binutils: URL: https://github.com/hjl-tools/binutils-gdb Branch: users/hjl/16bit Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* elf.h: add relocation numbers for segmented supportH. Peter Anvin2018-12-241-1/+4
| | | | | | | Add relocation numbers reserved/intended for segmented support in ELF32. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefile: make doc depend on warnings.srcH. Peter Anvin2018-12-241-1/+1
| | | | | | warnings.src needs to exist for make doc to work. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test: nasm-t -- Use plain stderr extension for error streamCyrill Gorcunov2018-12-232-1/+1
| | | | | | Just to unify with other tests Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* test: nasm-t -- Add clzero caseCyrill Gorcunov2018-12-234-0/+51
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* build: Add missing PA_ADD_LDFLAGS helperCyrill Gorcunov2018-12-232-1/+10
| | | | | | Fixes b0121dc312a83ab4912769e36c9f2cbe9493545d Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Merge tag 'nasm-2.14.01'H. Peter Anvin2018-12-222-0/+29
|\ | | | | | | | | | | | | | | | | NASM 2.14.01 Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * NASM 2.14.01nasm-2.14.01H. Peter Anvin2018-12-221-1/+1
| |
| * insns.dat: accept explicit ax/eax/rax operand to CLZEROH. Peter Anvin2018-12-222-0/+29
| | | | | | | | | | | | | | | | | | AMD documents this instruction with an rax operand. The error behavior implies this is an address-size-sensitive instruction. Add support for specifying the explicit operand, but consistent with normal ndisasm behavior, don't disassemble the implicit operand. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | autogen.sh: add code to re-run configure afterwardsH. Peter Anvin2018-12-222-2/+13
| | | | | | | | | | | | | | Add code to autogen.sh to (re-)run configure, with preserved configuration. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | autoconf: use librarized autoconf setupH. Peter Anvin2018-12-2222-215/+4406
| | | | | | | | | | | | | | I have been setting up a cross-project librarized autoconf setup; use it for NASM as well. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | test: nasm-t -- Add more details into READMECyrill Gorcunov2018-12-201-7/+69
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | assemble_file(): break up this gigantic messH. Peter Anvin2018-12-182-176/+209
| | | | | | | | | | | | Break up this gigantic mess which touches way too many layers. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Makefile.in: add target for running travisH. Peter Anvin2018-12-181-0/+5
| | | | | | | | | | | | Just like "make test", add "make travis". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Don't convert the various RESx instructions to RESBH. Peter Anvin2018-12-183-19/+9
| | | | | | | | | | | | | | All it does is complicate things; instead leave the opcode where it is. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | With buffered warnings, change the handling of error passesH. Peter Anvin (Intel)2018-12-1815-89/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With buffered warnings, most warnings *must* be issued on every pass, so ERR_PASS1 is simply wrong in most cases. ERR_PASS1 now means "force this warning to be output even in pass_first(). This is to be used for the case where the warning is only executed in pass_first() code; this is highly discouraged as it means the warnings will not appear in the list file and subsequent passes may make the warning suddenly vanish. ERR_PASS2 just as before suppresses an error or warning unless we are in pass_final(). Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Merge remote-tracking branch 'origin/nasm-2.14.xx'H. Peter Anvin (Intel)2018-12-181-2/+5
|\ \ | |/
| * test/Makefile: add .aout targetH. Peter Anvin (Intel)2018-12-181-2/+5
| | | | | | | | | | | | We had no target for generating an aout format file. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Clean up the handling of various passesH. Peter Anvin (Intel)2018-12-1822-299/+353
| | | | | | | | | | | | | | | | | | The use of pass0, pass1, pass2, and "pass" passed as an argument is really confusing and already caused a severe bug in the 2.14.01 release cycle. Clean them up and be far more explicit about what various passes mean. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | test: nasm-t -- Update testsCyrill Gorcunov2018-12-164-9/+2826
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | nasm: Fix condition in skip_this_passCyrill Gorcunov2018-12-161-1/+1
| | | | | | | | | | | | We should not match both condition. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | asm/nasm.c: Drop tabsCyrill Gorcunov2018-12-151-45/+45
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Make read buffer up to 4MCyrill Gorcunov2018-12-151-2/+2
| | | | | | | | | | | | Need to implement read on demand but later. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | compier: Zap __builtin_constant_p on gcc 4.x seriesCyrill Gorcunov2018-12-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is been discovered that on gcc-4.8.4 compiler can't properly evaluate __builtin_constant_p. | gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 | | In file included from asm/nasm.c:38:0: | asm/nasm.c: In function ‘assemble_file’: | ./include/compiler.h:377:27: error: first argument to ‘__builtin_choose_expr’ not a constant | # define if_constant(x,y) __builtin_choose_expr(is_constant(x),(x),(y)) | ^ | ./include/nasmlib.h:145:23: note: in expansion of macro ‘if_constant’ | static_assert(if_constant(x, 1), #x); \ | ^ | ./include/nasmlib.h:167:9: note: in expansion of macro ‘nasm_try_static_assert’ | nasm_try_static_assert(x); \ | ^ | asm/nasm.c:1544:17: note: in expansion of macro ‘nasm_assert’ | nasm_assert(output_ins.times >= 0); | Zap it for 4.x series so we could run our tests. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | build: aclocal.m4 -- Provide arguments to mainCyrill Gorcunov2018-12-151-1/+1
| | | | | | | | | | | | Which will allow to address these args inside test if needed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | nasmlib: Fix space/tabs messCyrill Gorcunov2018-12-151-28/+28
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | compiler: Brace __builtin_constant_p argumentCyrill Gorcunov2018-12-151-1/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Update multisectionCyrill Gorcunov2018-12-152-2/+2
| | | | | | | | | | | | We start printing [-w+other] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Update riprelCyrill Gorcunov2018-12-151-6592/+5184
| | | | | | | | | | | | We provide [-w+other] in output. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Update prefix66Cyrill Gorcunov2018-12-151-6/+6
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Update multisectionCyrill Gorcunov2018-12-151-1/+1
| | | | | | | | | | | | Now we provide -w-other in output. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Update moutCyrill Gorcunov2018-12-151-1/+1
| | | | | | | | | | | | We start printing space after file name. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Fix typoCyrill Gorcunov2018-12-152-3/+5
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Update floatb testCyrill Gorcunov2018-12-152-1/+8
| | | | | | | | | | | | | | We start reporting overflow in float-points which we previously missed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Update bcd testCyrill Gorcunov2018-12-151-2/+2
| | | | | | | | | | | | We start printing [-w+other] in warning report. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Reverse the comparision orderCyrill Gorcunov2018-12-151-2/+2
| | | | | | | | | | | | | | | | Comparing new and old data is inconvenient since it rathe shows the reverse diff. Use straight direction instead. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: nasm-t -- Move data reading out of cmp_stdCyrill Gorcunov2018-12-151-12/+15
| | | | | | | | | | | | | | Since the only purpose of cmp_std is to compare outputs. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | nasm_assert(): try to run at compile time if possibleH. Peter Anvin (Intel)2018-12-145-21/+71
| | | | | | | | | | | | | | | | | | | | Try to make nasm_assert() do a static assert if the argument can be evaluated at compile time by any particular compiler. We also provide nasm_try_static_assert() which will assert a compile-time expression if and only if we can determine we have a constant at compile time *and* we know that the compiler has a way to handle it. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | warnings: make WARN_* constant obligatory for warningsH. Peter Anvin (Intel)2018-12-147-47/+46
| | | | | | | | | | | | Make it an error to have ERR_WARNING without a suppression level. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | nasm_warnf() -> nasm_warn()H. Peter Anvin (Intel)2018-12-1417-98/+106
| | | | | | | | | | | | | | | | We want to strongly encourage writers of warnings to create warning categories, so remove the flagless nasm_warn() and change nasm_warnf() to nasm_warn(). Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Merge tag 'nasm-2.14.01rc5'H. Peter Anvin (Intel)2018-12-147-26/+55
|\ \ | |/ | | | | | | | | | | | | | | NASM 2.14.01rc5 Resolved Conflicts: asm/labels.c asm/nasm.c version
| * NASM 2.14.01rc5nasm-2.14.01rc5H. Peter Anvin (Intel)2018-12-141-1/+1
| |
| * Document the -Ov option, minor fix for gcc -OgH. Peter Anvin (Intel)2018-12-142-2/+9
| | | | | | | | | | | | | | | | | | The -Ov option is useful but was undocumented. Add an initialization to keep gcc from complaining at optimization level -Og. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * labels.c: redefine test should be passn, not pass0H. Peter Anvin (Intel)2018-12-141-4/+5
| | | | | | | | | | | | Stupid thinko: lpass should be passn + 1, not pass0 + 1. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * --no-line: new option to ignore %line directivesH. Peter Anvin (Intel)2018-12-146-22/+40
| | | | | | | | | | | | | | For debugging preprocessed code, it is useful to be able to ignore %line directives rather than having to filter them out externally. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | build: Add warnings to PERLREQCyrill Gorcunov2018-12-141-0/+1
| | | | | | | | | | | | Missed from 723ab481a6550454a6f834bb854e751744ca340a Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Restore the ability to have ? in identifiers, except ? itselfH. Peter Anvin (Intel)2018-12-146-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ? in identifiers turns out to be used in the field even in non-TASM mode. Resolve this by allowing it in an identifier still, but treat '?' by itself the same as we would a keyword, meaning that it needs to be separated from other identifier characters. In other words: a ? b : c ; conditional expression a?b:c ; seg:off expression seg = a?b, off = c Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Define and use offsetin() instead of offsetof()H. Peter Anvin (Intel)2018-12-142-1/+8
| | | | | | | | | | | | | | | | New macro which defines the offset on an object rather than a type. This macro, as far as I know, ought to be fully portable, unlike the fallback version of offsetof(). Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | strlist, warnings: improve strlist, buffer warnings until errorH. Peter Anvin (Intel)2018-12-145-22/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make strlist_free() take a pointer to a pointer, so we can set it to NULL. Buffer warnings on a strlist until we either get an error or we are in pass 2. Hopefully this should let us get rid of a lot of the ERR_PASS* bullshit, which far too often causes messages to get lost. asm/labels.c contains one example of a warning that cannot be made correct with a specific pass number. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | hashtbl: fix errors in hash_iterate() and hash_free()H. Peter Anvin (Intel)2018-12-141-13/+10
| | | | | | | | | | | | | | Both of these functions were apparently subtly broken after the revamp to the new interfaces. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>