aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
13 daysgas: Test predicate whether SFrame RA tracking is usedJens Remus1-2/+4
The existence of the macro SFRAME_FRE_RA_TRACKING only ensures the existence of the macro SFRAME_CFA_RA_REG and the predicate function sframe_ra_tracking_p. It does not indicate whether SFrame RA tracking is actually used. Test the return value of the SFrame RA tracking predicate function sframe_ra_tracking_p to determine whether RA tracking is used. This aligns the logic in functions get_fre_num_offsets and output_sframe_row_entry to the one used in all other places. gas/ * gen-sframe.c (get_fre_num_offsets, output_sframe_row_entry): Test predicate to determine whether SFrame RA tracking is used. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Don't skip SFrame FDE if .cfi_register specifies SP registerJens Remus1-3/+6
Neither ".cfi_offset SP, <offset>", ".cfi_register SP, <regno>", nor ".cfi_val_offset SP, <offset>" alter the tracking information to recover the stack pointer (SP). Doing so would need an explicit .cfi_def_cfa, which SFrame tracks. The stack pointer (SP) register contents on entry can be reconstructed from the SFrame CFA tracking information using information from the current and initial SFrame FREs of the SFrame FDE: 1. Compute CFA from the current CFA base register (SP or FP) and CFA offset from the SFrame CFA tracking information from the SFrame FRE for the current instruction address: CFA = <current_base_reg> + <current_cfa_offset> 2. Compute SP from the current CFA and the CFA offset from the SFrame CFA tracking information from the initial SFrame FRE of the FDE: SP = CFA - <initial_cfa_offset> While at it add comments to the processing of .cfi_offset and .cfi_val_offset that the SP can be reconstructed from the CFA tracking information. gas/ * gen-sframe.c (sframe_xlate_do_register): Do not skip SFrame FDE if .cfi_register specifies SP register. (sframe_xlate_do_offset,sframe_xlate_do_val_offset): Add comment that this is likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Don't skip SFrame FDE if .cfi_register specifies RA w/o trackingJens Remus1-1/+1
Do not skip SFrame FDE if .cfi_register specifies RA register without RA tracking being actually used. Without RA tracking the register contents can always be restored from the stack using the fixed RA offset from CFA. gas/ * gen-sframe.c (sframe_xlate_do_register): Do not skip SFrame FDE if .cfi_register specifies RA register without RA tracking being used. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Skip SFrame FDE if .cfi_window_saveJens Remus1-3/+22
CFI opcode DW_CFA_AARCH64_negate_ra_state is multiplexed with DW_CFA_GNU_window_save. Process DW_CFA_AARCH64_negate_ra_state on AArch64. Skip generation of SFrame FDE otherwise with the following warning message: skipping SFrame FDE; .cfi_window_save gas/ * gen-sframe.c: Skip SFrame FDE if .cfi_window_save. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Skip SFrame FDE if FP without RA on stackJens Remus1-2/+19
The SFrame format cannot represent the frame pointer (FP) being saved on the stack without the return address (RA) also being saved on the stack, if RA tracking is used. A SFrame FDE is followed by 1-3 offsets with the following information: Without RA tracking: 1. Offset from base pointer (SP or FP) to locate the CFA 2. Optional: Offset to CFA to restore the frame pointer (FP) With RA tracking: 1. Offset from base pointer (SP or FP) to locate the CFA 2. Optional: Offset to CFA to restore the return address (RA) 3. Optional: Offset to CFA to restore the frame pointer (FP) When RA tracking is used and a FDE is followed by two offsets the SFrame format does not provide any information to distinguish whether the second offset is the RA or FP offset. SFrame assumes the offset to be the RA offset, which may be wrong. Therefore skip generation of SFrame FDE information and print the following warning, if RA tracking is used and the FP is saved on the stack without the RA being saved as well: skipping SFrame FDE; FP without RA on stack gas/ * gen-sframe.c (sframe_do_fde): Skip SFrame FDE if FP without RA on stack, as the SFrame format cannot represent this case. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: User readable warnings if SFrame FDE is not generatedJens Remus5-28/+72
The following generic warning message, which is printed whenever the assembler skips generation of SFrame FDE, is not very helpful for the user: skipping SFrame FDE; CFI insn <name> (0x<hexval>) Whenever possible print meaningful warning messages, when the assembler skips generation of SFrame FDE: - skipping SFrame FDE; non-SP/FP register <regno> in .cfi_def_cfa - skipping SFrame FDE; non-SP/FP register <regno> in .cfi_def_cfa_register - skipping SFrame FDE; .cfi_def_cfa_offset without CFA base register in effect - skipping SFrame FDE; {FP|RA} register <regno> in .cfi_val_offset - skipping SFrame FDE; {SP|FP|RA} register <regno> in in .cfi_register - skipping SFrame FDE; .cfi_remember_state without prior SFrame FRE state - skipping SFrame FDE; non-default RA register <regno> gas/ * gen-sframe.h (SFRAME_FRE_BASE_REG_INVAL): New macro for invalid SFrame FRE CFA base register value of -1. * gen-sframe.c: User readable warnings if SFrame FDE is not generated. gas/testsuite/ * gas/cfi-sframe/common-empty-1.d: Update generic SFrame test case to updated warning message texts. * gas/cfi-sframe/common-empty-2.d: Likewise. * gas/cfi-sframe/common-empty-3.d: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Refactor SFrame CFI opcode DW_CFA_register processingJens Remus1-11/+26
Refactor SFrame processing of CFI opcode DW_CFA_register into a separate function. This harmonizes the CFI opcode processing. While at it reword the comment on CFI opcodes that are not processed. This is a purely mechanical change. gas/ * gen-sframe.c (sframe_do_cfi_insn, sframe_xlate_do_register): Refactor SFrame CFI opcode DW_CFA_register processing. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Warn if SFrame FDE is skipped due to non-default return columnJens Remus2-3/+8
Print a warning message if SFrame FDE is skipped due to a non-default DWARF return column (i.e. return address (RA) register number). This may be caused by the use of CFI directive .cfi_return_column with a non-default return address (RA) register number in the processed assembler source code. Warning: skipping SFrame FDE due to non-default DWARF return column gas/ * gen-sframe.c: Warn if SFrame FDE is skipped due to non-default DWARF return column. gas/testsuite/ * gas/cfi-sframe/common-empty-3.d: Update test case to expect for new warning message when SFrame FDE is skipped due to a non-default DWARF return column. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Skip SFrame FDE if CFI specifies non-FP/SP base registerJens Remus2-3/+11
Do not generate SFrame FDE if DWARF CFI directives .cfi_def_cfa or .cfi_def_cfa_register specify a CFA base register number other than the architecture-specific stack-pointer (SP) or frame-pointer (FP) register numbers. This also causes the assembler to print a warning message, so that skipping of the SFrame FDE does not occur silently. Update the generic ld SFrame test case to be architecture independent. Do not use CFI directive .cfi_def_cfa, as the specified CFA base register number is not a valid SP/FP register number on all architectures. An invalid SP/FP register number will now cause the assembler to print a warning message and skip SFrame FDE generation. Remove the offending CFI directive, that cannot be coded architecture- independent, as the test case requires SFrame information to be generated. This was reported by the Linaro-TCWG-CI for AArch64. gas/ * gen-sframe.c: Skip SFrame generation if CFI specifies non-FP/SP base register. ld/testsuite/ * ld-sframe/discard.s: Update generic SFrame test case to be architecture independent. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Print DWARF call frame insn name in SFrame warning messageJens Remus3-3/+50
SFrame generation prints the DWARF call frame instruction opcode in hexadecimal. Leverage get_DW_CFA_name to additionally print the DWARF call frame instruction name in human readable form, while also respecting fake CFI types. Use "(unknown)", if the DWARF call frame instruction name is not known. While at it use the terminology "instruction" for these DW_CFA_*, as suggested by Indu. This changes the following assembler SFrame generation warning message as follows: Old: Warning: skipping SFrame FDE due to DWARF CFI op 0x<hexval> New: Warning: skipping SFrame FDE; CFI insn <name> (0x<hexval>) gas/ * gen-sframe.c (sframe_get_cfi_name): New function to get the DWARF call frame instruction name for a DWARF call frame instruction opcode. (sframe_do_cfi_insn): Use sframe_get_cfi_name to print the DWARF call frame instruction name for the DWARF call frame instruction opcode in the warning message. gas/testsuite/ * gas/cfi-sframe/common-empty-1.d: Update expected SFrame warning message text for DWARF call frame insn name. * gas/cfi-sframe/common-empty-2.d: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysreadelf/objdump: Display SFrame fixed RA offset as 'f' in dumpJens Remus11-38/+40
For the SFrame FRE frame-pointer (FP) offset from CFA a 'u' is displayed if it is unavailable. For the SFrame FRE return-address (RA) offset from CFA a 'u' was displayed if the ABI uses a fixed RA offset from CFA. By chance a 'u' was also displayed if the RA offset is unavailable, as the string buffer was not initialized after formatting the FP offset. Note that it could not occur that the FP offset was erroneously displayed as RA offset, as the SFrame format cannot have a FRE with FP offset without RA offset. For the FRE RA offset display 'f' if the ABI uses a fixed RA offset from CFA. Display a 'u' if it is unavailable. libsframe/ * sframe-dump.c: Display SFrame fixed RA offset as 'f' in dump. gas/testsuite/ * gas/cfi-sframe/cfi-sframe-common-4.d: Test for RA displayed either as 'u' (if RA tracking) or as 'f' (fixed RA offset if no RA tracking). * gas/cfi-sframe/cfi-sframe-common-5.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-6.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-7.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-8.d: Likewise. * gas/cfi-sframe/cfi-sframe-x86_64-1.d: Test for RA displayed as 'f' (fixed RA offset), as x86-64 does not use RA tracking. * gas/scfi/x86_64/scfi-cfi-sections-1.d: Likewise. * gas/scfi/x86_64/scfi-dyn-stack-1.d: Likewise. ld/testsuite/ * ld-x86-64/sframe-plt-1.d: Test for RA displayed as 'f' (fixed RA offset), as x86-64 does not use RA tracking. * ld-x86-64/sframe-simple-1.d: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysreadelf/objdump: Dump SFrame CFA fixed FP and RA offsetsJens Remus17-0/+37
The SFrame format allows architectures to specify fixed offsets from the CFA, if any, from which the frame pointer (FP) and/or return address (RA) may be recovered. These offsets are stored in the SFrame header. For instance the SFrame generation in the assembler for x86 AMD64 specifies a fixed offset from the CFA, from which the return address (RA) may be recovered. When dumping the SFrame header, for instance in readelf/objdump with option --sframe, do also dump the specified fixed offsets from the CFA, if any, from which the frame pointer (FP) and return address (RA) may be recovered. Update the common SFrame test case verification patterns to allow for the optional dumping of the CFA fixed FP/RA offsets. Update the x86- specific SFrame and SCFI test case verification patterns to require a CFA fixed RA offset of -8. libsframe/ * sframe-dump.c: Dump CFA fixed FP and RA offsets. gas/testsuite/ * gas/cfi-sframe/cfi-sframe-common-1.d: Test for optional fixed FP and RA offsets. * gas/cfi-sframe/cfi-sframe-common-2.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-3.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-4.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-5.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-6.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-7.d: Likewise. * gas/cfi-sframe/cfi-sframe-common-8.d: Likewise. * gas/cfi-sframe/cfi-sframe-x86_64-1.d: Test for fixed RA offset. * gas/cfi-sframe/common-empty-1.d: Test for optional fixed FP and RA offsets. * gas/cfi-sframe/common-empty-2.d: Likewise. * gas/cfi-sframe/common-empty-3.d: Likewise. * gas/scfi/x86_64/scfi-cfi-sections-1.d: Test for SFrame fixed RA offset. * gas/scfi/x86_64/scfi-dyn-stack-1.d: Likewise. ld/testsuite/ * ld-x86-64/sframe-plt-1.d: Test for SFrame fixed RA offset. * ld-x86-64/sframe-simple-1.d: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysgas: Enhance arch-specific SFrame configuration descriptionsJens Remus4-14/+19
Explicitly mention "SFrame" in the descriptions for the architecture- specific SFrame configuration macros, variables, and functions. Use the term "frame pointer" (FP) instead of "base pointer". This aligns with the terminology used in the SFrame specification. Additionally it helps not to confuse "base-pointer register" with the term "BASE_REG" used in the specification to denote either the SP or FP register. Specify what the SFRAME_CFA_*_REG register numbers are used for: - SP (stack pointer): CFA tracking - FP (frame pointer): CFA and FP tracking - RA (return address): RA tracking Align the descriptions for definitions in the source files to the declarations in the header files. gas/ * config/tc-aarch64.h: Enhance architecture-specific SFrame configuration descriptions. * config/tc-aarch64.c: Likewise. * config/tc-i386.h: Likewise. * config/tc-i386.c: Likewise. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysx86: Remove unused SFrame CFI RA register variableJens Remus1-1/+0
gas/ * config/tc-i386.c (x86_sframe_cfa_ra_reg): Remove. Signed-off-by: Jens Remus <jremus@linux.ibm.com>
13 daysSupport APX CFCMOVCui, Lili13-2242/+3670
The CMOVcc instruction proposed by EVEX has four different forms, corresponding to the four possible combinations of EVEX.ND and EVEX.NF values. In the encoder part, when the CFCMOV template supports EVEX_NF, it means that it requires EVEX.NF to be 1. In the decoder part, CFCMOV_Fixup is used to reverse source and destination operands in the 2-operand case. gas/ChangeLog: * config/tc-i386.c (build_apx_evex_prefix): Set NF bit for cfcmov when the insn template supports EVEX_NF. * testsuite/gas/i386/x86-64-apx-inval.l: Add invalid tests for cfcmov. * testsuite/gas/i386/x86-64-apx-inval.s: Ditto. * testsuite/gas/i386/x86-64.exp: Add tests for cfcmov and cmov. * testsuite/gas/i386/x86-64-apx-cfcmov-intel.d: Ditto. * testsuite/gas/i386/x86-64-apx-cfcmov.d: Ditto. * testsuite/gas/i386/x86-64-apx-cfcmov.s: Ditto. opcodes/ChangeLog: * i386-dis-evex-prefix.h: Add cfcmov instructions. * i386-dis.c (CFCMOV_Fixup): Special handling of cfcmov. (putop): Print 'cf' for cfcmov instructions. * i386-opc.h (EVEX_NF): New. * i386-opc.tbl: Add cfcmov instructions. * i386-mnem.h: Regerated. * i386-tbl.h: Regerated.
13 daysAutomatic date update in version.inGDB Administrator1-1/+1
14 daysRISC-V: Tidy and complete testing of all architecture imply rules.Nelson Chu21-97/+177
gas/ * testsuite/gas/riscv/imply.s: New testcase for all imply cases. * testsuite/gas/riscv/imply.d: Likewise. * testsuite/gas/riscv/march-imply-i.s: Renamed to imply-zicsr-zifencei.s. * testsuite/gas/riscv/march-imply-i2p0-02.d: Renamed to imply-zicsr-zifencei-i2p0-misa-spec-2p2.d. * testsuite/gas/riscv/march-imply-i2p1-01.d/l: Renamed to imply-zicsr-zifencei-i2p1-misa-spec-20191213.d. * testsuite/gas/riscv/march-imply-i2p0-01.d: Removed. Combined into new imply testcase. * testsuite/gas/riscv/march-imply-i2p1-02.d: Likewise. * testsuite/gas/riscv/march-imply-a.d: Likewise. * testsuite/gas/riscv/march-imply-b.d: Likewise. * testsuite/gas/riscv/march-imply-f.d: Likewise. * testsuite/gas/riscv/march-imply-g.d: Likewise. * testsuite/gas/riscv/march-imply-h.d: Likewise. * testsuite/gas/riscv/march-imply-q.d: Likewise. * testsuite/gas/riscv/march-imply-smcsrind.d: Likewise. * testsuite/gas/riscv/march-imply-smstateen.d: Likewise. * testsuite/gas/riscv/march-imply-unsupported.d: Likewise. * testsuite/gas/riscv/march-imply-v.d: Likewise. * testsuite/gas/riscv/march-imply-zcd.d: Likewise. * testsuite/gas/riscv/march-imply-zcf.d: Likewise.
14 daysAvoid possible signed overflow in decode_local_label_nameAlan Modra1-4/+4
Matches what both fb_label_name and dollar_label_name use. * symbols.c (decode_local_label_name): Use unsigned variables.
14 daysgas/doc/riscv: Fixed typo of `.insn cj' formatNelson Chu1-1/+1
gas/ * doc/c-riscv.texi: Fixed typo of `.insn cj' format.
14 daysx86-64: Support APX NF TLS IE with 2 operandsLingling Kong8-20/+58
Support APX NF TLS IE with 2 operands.Verify it with ld and gold. gas/ * config/tc-i386.c (md_assemble): Allow APX NF TLS IE with 2 operands. * testsuite/gas/i386/x86-64-gottpoff.d: Updated. * testsuite/gas/i386/x86-64-gottpoff.s: Add APX NF TLS IE tests with 2 operands. gold/ * testsuite/x86_64_ie_to_le.s: Add APX NF TLS IE tests with 2 operands. * testsuite/x86_64_ie_to_le.sh: Updated. ld/ * testsuite/ld-x86-64/tlsbindesc.s: Add APX NF TLS IE tests with 2 operands. * testsuite/ld-x86-64/tlsbindesc.d: Updated. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise.
14 daysgas/doc/riscv: Fixed syntax of `.option arch' when reseting whole architectureNelson Chu1-2/+2
gas/ * doc/c-riscv.texi: Fixed syntax of `.option arc'h when reseting whole architecture. Don't need the `=' before ISA.
2024-07-03Automatic date update in version.inGDB Administrator1-1/+1
2024-07-02Accept unnamed array in gdb.ada/limited-length.expTom Tromey1-12/+9
Some compiler changes I'm working on cause a regression in gdb.ada/limited-length.exp -- with the changes, the array type is nameless and so is not mentioned in the max-value-size error message. Because the array type is nameless in the source code, this seems like an improvement to me, and so this patch changes the test to accept either form.
2024-07-02Use lwp field in ptid for AIX.Aditya Vidyadhar Kamath1-11/+8
Currently in AIX, the private data is used to maintain the kernel thread ID. This is a patch to trim the need to have another field in the private data of a thread in AIX. We want to use the lwp field to represent the kernel thread ID to match or make things similar to the Linux targets.
2024-07-01x86-64: Verify that TLS IE works with APX NFkonglin17-20/+64
Verify that {nf} add %reg1, foo@gottpoff(%rip), %reg2 {nf} add foo@gottpoff(%rip), %reg, %reg2 work correctly with ld and gold. gas/ * testsuite/gas/i386/x86-64-gottpoff.d: Updated. * testsuite/gas/i386/x86-64-gottpoff.s: Add tests for "{nf} add %reg1, foo@gottpoff(%rip), %reg2" and "{nf} add foo@gottpoff(%rip), %reg, %reg2". gold/ * testsuite/x86_64_ie_to_le.s: Add tests for "{nf} add %reg1, foo@gottpoff(%rip), %reg2" and "{nf} add foo@gottpoff(%rip), %reg, %reg2". * testsuite/x86_64_ie_to_le.sh: Updated. ld/ * testsuite/ld-x86-64/tlsbindesc.s: Add R_X86_64_CODE_6_GOTTPOFF for APX NF tests. * testsuite/ld-x86-64/tlsbindesc.d: Updated. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-07-02Automatic date update in version.inGDB Administrator1-1/+1
2024-07-01ld: Move foo before delete in dl5.ccH.J. Lu1-1/+1
* testsuite/ld-elf/dl5.cc (main): Move foo before delete. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-07-01MAINTAINERS: Update my e-mail addressClaudiu Zissulescu1-1/+1
Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
2024-07-01LoongArch: Remove unused code in ld test suiteXi Ruoyao2-9/+0
These seems some left over from MIPS code and they do not make any sense for LoongArch. Signed-off-by: Xi Ruoyao <xry111@xry111.site>
2024-07-01PR31941 objcopy --globalize-symbolAlan Modra1-0/+1
I think FILE symbols are special, and I can't see why anyone would want them to be made global. The fact that no one has reported this bug since commit 7b4a0685e80a in 2005 supports that claim. PR 31941 * objcopy.c (filter_symbols): Don't allow BSF_FILE symbols to be made global.
2024-07-01Automatic date update in version.inGDB Administrator1-1/+1
2024-06-30ld: Avoid folding new and delete pairsH.J. Lu3-10/+19
GCC 15 may fold new and delete pairs, like A *bb = new A[10]; delete [] bb; bb = new (std::nothrow) A [10]; delete [] bb; as shown in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115712 Avoid folding new and delete pairs by adding a function call between new and delete. * testsuite/ld-elf/dl5.cc: Include "dl5.h". (A): Removed. Call foo between new and delete. * testsuite/ld-elf/dl5.h: New file. * testsuite/ld-elf/new.cc: Include "dl5.h". (foo): New function. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-07-01objcopy: Allow making symbol global and weak on same invocationMarcus Nilsson3-15/+27
Previously objcopy had to be run twice in order to make a local symbol weak, first once to globalize it, and once again to mark it as weak. * objcopy.c (filter_symbols): Weaken symbols after making local/global changes. * testsuite/binutils-all/symbols-5.d, * testsuite/binutils-all/symbols-5.s: New test.
2024-06-30tweak latest vms-alpha.c changeAlan Modra1-1/+1
It's that tiny bit nicer to have the "len" expression in order of the components in the buffer.
2024-06-30Assertion `(data) <= (end)' failed in read_basesAlan Modra1-24/+29
* dwarf.c (skip_attribute): Don't increment data past end. Use SKIP_{S,U}LEB rather than READ_{S,U}LEB.
2024-06-30Re: Rewrite SHT_GROUP handlingAlan Modra1-50/+52
Some more error tweaks. Report a zero entry as "invalid entry.." rather than "unknown type..", and allow a section to be mentioned twice in a group. * elf.c (process_sht_group_entries): Tweak error messages, and allow a duplicate index in a group without reporting an error.
2024-06-30Automatic date update in version.inGDB Administrator1-1/+1
2024-06-29ld: pass -g for ld-elf testsSam James2-2/+2
The "DWARF parse during linker error" and "Build warn libbar.so" tests require debug information. configure defaults to "-O2 -g" but if overriding *FLAGS when building tests, this might be lost. Explicitly pass -g given these tests require it. Originally reported downstream in Gentoo at https://bugs.gentoo.org/934149. ld/ * testsuite/ld-elf/dwarf.exp: Pass -g for "DWARF parse during linker error". * testsuite/ld-elf/shared.exp: Ditto for "Build warn libbar.so".
2024-06-29Automatic date update in version.inGDB Administrator1-1/+1
2024-06-28aarch64: Add support for Armv9.5-A architectureClaudio Bantaloukas13-4/+42
The new -march=armv9.5-a flag enables access to the mandatory cpa, lut and faminmax extensions. Existing test cases for features are extended to verify they work without additional flags.
2024-06-28ld/doc: drop stray blankJan Beulich1-4/+3
Old enough tools demand no blank between @option and the opening figure brace. Re-wrap the paragraph as well while at it.
2024-06-28LoongArch: Do not check R_LARCH_SOP_PUSH_ABSOLUTE to avoid broken links to ↵Lulu Cai1-5/+6
old object files R_LARCH_SOP_PUSH_ABSOLUTE with -fPIC was heavily used in the era of gas-2.38. We do not check this relocation to prevent broken links with old object files.
2024-06-28x86/APX: apply NDD-to-legacy transformation to further CMOVcc formsJan Beulich5-32/+82
With both sources being registers, these insns are almost commutative; the only extra adjustment needed is inversion of the encoded condition.
2024-06-28x86/APX: extend TEST-by-imm7 optimization to CTESTccJan Beulich6-49/+149
The same properties apply there.
2024-06-28x86/APX: optimize {nf}-form IMUL-by-power-of-2 to SHLJan Beulich6-12/+264
..., for differing only in the resulting EFLAGS, which are left untouched anyway. That's a shorter encoding, available as long as certain constraints on operands are met; see code comments. (SHL-by-1 forms may then be subject to further optimization that was introduced earlier.) Note that kind of as a side effect this also converts multiplication by 1 to shift by 0, which is a plain move or even no-op anyway. That could be further shrunk (as could be presence of shifts/rotates by 0 in the original code as well as a fair set of other {nf}-form insns), yet the expectation (for now) is that people won't write such code in the first place.
2024-06-28x86-64: restrict by-imm31 optimizationJan Beulich4-18/+21
Avoid changing the encoding when there's no size gain: If there's a REX or REX2 prefix anyway and the base opcode wouldn't be changed, dropping just REX.W / REX2.W has no (size) effect. (Same for the AND-by-imm7 case in the same big conditional.) While there also pull out the .qword check: For the 2-register-operands case whether that's done on the 1st or 2nd operand doesn't matter. Due to reduction in necessary parentheses this improves readability a tiny bit.
2024-06-28x86/APX: optimize certain {nf}-form insns to LEAJan Beulich7-15/+1819
..., as that leaves EFLAGS untouched anyway. That's a shorter encoding, available as long as certain constraints on operand size and registers are met; see code comments. Note that this requires deferring to derive encoding_evex from {nf} presence, as in optimize_encoding() we want to avoid touching the insns when {evex} was also used. Note further that this requires want_disp32() to now also consider the opcode: We don't want to replace i.tm.mnem_off, for diagnostics to still report the original mnemonic (or else things can get confusing). While there, correct adjacent mis-indentation.
2024-06-28x86/APX: optimize {nf}-form rotate-by-width-less-1Jan Beulich5-16/+88
Unlike for the legacy forms, where there's a difference in the resulting EFLAGS.CF, for the NF variants the immediate can be got rid of in that case by switching to a 1-bit rotate in the opposite direction.
2024-06-28x86/APX: optimize {nf} forms of ADD/SUB with specific immediatesJan Beulich8-22/+1648
Unlike for the legacy forms, where there's a difference in the resulting EFLAGS, for the NF variants we can safely replace ones using 0x80 by the respectively other insn while negating the immediate, saving 3 immediate bytes (just 1 though for 16-bit operand size). Similarly we can replace ones using 1 / -1 by INC/DEC (eliminating the immediate).
2024-06-28gas: .irp/.irpc are macro-likeJan Beulich1-2/+2
... for the purposes of get_line_sb() and _find_end_of_line(): They support \@ just like macros do, and hence the special casing there also needs applying.