summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test/popcnt.asm: simple test for the POPCNT instructionnasm-2.05.xxH. Peter Anvin2008-11-061-0/+32
| | | | | | Very simple test of POPCNT instructions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* The POPCNT instruction does not need sizes on memory operandsH. Peter Anvin2008-11-061-3/+3
| | | | | | | The POPCNT instruction should not require sizes on memory operands. Add the appropriate size flags for that to work. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2229703: POPCNT r64,rm64 not POPCNT r64,rm32H. Peter Anvin2008-11-061-1/+1
| | | | | | | The 64-bit version of the POPCNT instruction takes r64,rm64; not r64,rm32. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: BR 2222615: fix segfault on bogus %ifmacroH. Peter Anvin2008-11-061-1/+0
| | | | | | BR 2222615: Fix segmentation fault on %ifmacro without an argument. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: fix typo in the description of %unmacroH. Peter Anvin2008-10-291-1/+1
| | | | | | | The description of %unmacro used %unmacro in a place which should obviously have been %macro. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: fix capitalizationH. Peter Anvin2008-10-291-1/+1
| | | | | | | Make the capitalization of "The -t Option" consistent with the other options. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: remove duplicate entry for the "error" warning classH. Peter Anvin2008-10-291-3/+0
| | | | | | | Remove duplicate entry for the "error" warning class; leave at the end with "all", as being another meta-warning class. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: retroactively document updates to the warning optionsH. Peter Anvin2008-10-292-1/+20
| | | | | | | | | | | | Retroactively document the following changes to the warning options: - gcc-like syntax (-Wfoo, -Wno-foo) - "all" alias - "error" metawarning Added in 2.00rc1 but never documented. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.05.01nasm-2.05.01H. Peter Anvin2008-10-291-1/+1
|
* doc/changes.src: document -W/-w fix as a NASM 2.05.01 feature.H. Peter Anvin2008-10-291-0/+5
| | | | | | Make -W/-w fix a release note for NASM 2.05.01. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Better description of the number-overflow warningH. Peter Anvin2008-10-261-1/+1
| | | | | | | | | 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>
* BR: 2196966: make the -w/-W options work againH. Peter Anvin2008-10-261-3/+3
| | | | | | | | | 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>
* When issuing warnings for EA displacements, use the *EA* operandnasm-2.05H. Peter Anvin2008-10-231-1/+1
| | | | | | | When issuing warnings for EA displacements during address generation, actually look a the proper operand! Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.05H. Peter Anvin2008-10-231-1/+1
|
* doc/changes.src: update release notesH. Peter Anvin2008-10-231-0/+4
| | | | | | Update the release notes in preparation for NASM 2.05. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* The CRC32 instructions can take 66 prefixes as well as F2H. Peter Anvin2008-10-231-5/+5
| | | | | | | 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>
* test/crc32.asm: test the CRC32 instructionH. Peter Anvin2008-10-231-0/+37
| | | | | | Test for the CRC32 instruction. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2190521: fix the CRC32 opcodesH. Peter Anvin2008-10-231-5/+5
| | | | | | | A stray \1 bytecode was hiding in the CRC32 opcodes, causing complete havoc. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.05rc8nasm-2.05rc8H. Peter Anvin2008-10-221-1/+1
|
* BR 2187210: Fix PFRCPV and PFRSQRTVH. Peter Anvin2008-10-221-2/+2
| | | | | | Fix the Geode instructions PFRCPV and PFRSQRTV per bug report 2187210. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* assemble: not all backends handle intra-segment OUT_REL*ADRH. Peter Anvin2008-10-221-4/+11
| | | | | | | | | | | 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>
* BR 2148448: fix relative addresses in bin outputH. Peter Anvin2008-10-221-1/+2
| | | | | | | | 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>
* Update .gitignore to include additional generated filesH. Peter Anvin2008-10-191-0/+2
| | | | | | | pptok.ph and doc/inslist.src are generated files; list them in .gitignore. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.05rc7nasm-2.05rc7H. Peter Anvin2008-10-191-1/+1
|
* ELF64: once again, fix generation of "naked" OUT_REL*ADRH. Peter Anvin2008-10-181-10/+9
| | | | | | | | It is unclear if we will ever see any "naked" (absolute bytes) OUT_REL*ADR coming from the assembler, but if we do, we should generate them correctly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.05rc6nasm-2.05rc6H. Peter Anvin2008-10-171-1/+1
|
* doc/changes.src: document massive changes to ELF64 backendH. Peter Anvin2008-10-171-1/+1
| | | | | | | We didn't just fix the GOT stuff, but also now properly use RELA and so forth. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: PLT32, GOTPCREL, and GOTPCREL64 really need exactitudeH. Peter Anvin2008-10-171-3/+3
| | | | | | | | | | Now when the assembler is properly generating the address that we push down to the backend, enable requesting an exact value for these relocations (these are pointing to a specific GOT or PLT slot; the addend is used to adjust the computed value in the instruction, not for offset for the symbol.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: the "size" argument to OUT_REL*ADR isn't really the sizeH. Peter Anvin2008-10-171-3/+3
| | | | | | | | The "size" argument to the OUT_REL*ADR output types is actually intra-instruction offset, not the actual size. Thus, emit the size properly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* assemble: for OUT_REL*ADR, the "size" argument is not really size...H. Peter Anvin2008-10-171-5/+8
| | | | | | | | | For OUT_REL*ADR, the "size" argument is actually the offset inside the instruction; that is in fact why we encode the real size in the instruction itself. Thus, emit the offsets properly using this mechanism when generating relative EAs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test/elf64so.asm: demonstrate a case where we bind to the wrong symbolH. Peter Anvin2008-10-171-1/+6
| | | | | | | | Show an artificial case where we bind to the wrong symbol, due to the confusion in the output system between the size of relative symbols and their position. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: actually generate relative GOT/PLT references correctlyH. Peter Anvin2008-10-171-12/+10
| | | | | | | | | | | | Fix the arithmetic for relative GOT/PLT references. We still can't enable exactitude, because of the assumption that "size" is always the proper adjustment for the offset of the displacement inside the instruction, which is wrong in the case of displacements that are followed by an immediate. This also affects the list file, so it really should be fixed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test/Makefile: enable debugging info for elftest/elftest64H. Peter Anvin2008-10-171-6/+6
| | | | | | Enable debugging information for the ELF tests. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: GOTOFF64 doesn't need a gsym at allH. Peter Anvin2008-10-171-2/+1
| | | | | | | | GOTOFF64 is used for local variables (as a 64-bit offset from the GOT; only needed in the Medium PIC or Large PIC models.) It therefore should *not* be a elf_add_gsym_reloc() invocation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: We apparently don't need exactitude for GOTOFF64H. Peter Anvin2008-10-171-1/+1
| | | | | | | | | | I am having a bit of a hard time understanding the proper operation of the "exact" flag to elf_add_gsym_reloc(). We apparently won't generate proper GOTOFF64 relocations with this flag set; it is possible that there are *no* proper uses of this flag. This clearly needs to be figured out. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* elftest64: both Small PIC and Medium PIC model testsH. Peter Anvin2008-10-172-10/+35
| | | | | | Try both Small PIC and Medium PIC model references. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: GOT and PLT references need a symbol (a slot!) to referenceH. Peter Anvin2008-10-171-26/+33
| | | | | | | | | GOT and PLT references need a symbol; after all, they reference a GOT or PLT slot. Thus, they need elf_add_gsym_reloc(). Mungify the interface so that they can communicate the need for the PC-shifted offset into the relocation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: unbreak generating no-segment addressesH. Peter Anvin2008-10-171-111/+138
| | | | | | | | When generating an address that is *not* tied to a symbol, we just want to emit the bytes. I believe the assembler is already supposed to do that for us, but just in case, do it right here too. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* SAA: add saa_writeaddr() similar to other locationsH. Peter Anvin2008-10-172-0/+22
| | | | | | Provide saa_writeaddr() to write an integer in x86 format. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test/Makefile: the elftest objects depend on $(NASM)H. Peter Anvin2008-10-171-2/+2
| | | | | | If NASM has changed, we logically want to re-run the ELF tests... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: use the RELA addend field instead of relying on the code streamH. Peter Anvin2008-10-171-80/+94
| | | | | | | | | | The x86-64 ABI wants the symbol addend to reside in the addend field of the RELA relocation, not in the code stream. Apparently it's something one can get away with, but the linker would still botch it for some cases. Change it so we pass the proper output and emit zero into the code stream. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Test and Makefile rules for 32- and 64-bit ELF shared librariesH. Peter Anvin2008-10-174-0/+160
| | | | | Add Makefile rules for the 32-bit ELF shared library test, and add a 64-bit ELF shared library test (still work in progress.)
* NASM 2.05rc5nasm-2.05rc5H. Peter Anvin2008-10-161-1/+1
|
* Test for BR 2172659H. Peter Anvin2008-10-161-0/+15
| | | | | | Test for the bug fix for BR 2172659 (invalid byte-sized immediates.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2172659: Fix incorrect output value for byte operandsH. Peter Anvin2008-10-161-2/+2
| | | | | | | A typo in checkin c1377e9a98dd5ca6f7900c048df5d346d1733d05 caused a bunch of signed-byte immediates to incorrectly be issued as zero. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add reference to %+ from macro parameter concatenationH. Peter Anvin2008-10-151-0/+2
| | | | | | | Add a reference to the %+ operator from the section on macro parameter concatenation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: minor editorial changeH. Peter Anvin2008-10-151-4/+4
| | | | | | | Use the terms "defined" and "expanded" for single-line macros more consistently. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ELF64: fix various GOT relocationsH. Peter Anvin2008-10-151-9/+35
| | | | | | | Try to make the various GOT relocations do the right thing in ELF64, including erring out when appropriate. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Test for various ELF64 GOT referencesH. Peter Anvin2008-10-151-0/+25
| | | | | | Try to test for various GOT references in ELF64. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: add link to the macro packages when talking about themH. Peter Anvin2008-10-151-2/+2
| | | | | | | When discussing the standard macro packages in the context of __USE_*__ macros, link to them as well as to the %use directive. Signed-off-by: H. Peter Anvin <hpa@zytor.com>