Commit Graph

8220 Commits

Author SHA1 Message Date
Victor Do Nascimento
320f42099a oops - forgot changelog entry for the previous delta. 2022-05-18 16:26:21 +01:00
Mark Harmstone
145667f8d9 Add support for COFF secidx relocations
bfd	* coff-i386.c (in_reloc_p): Add R_SECTION.
	(howto_table): Add R_SECTION.
	(coff_pe_i386_relocation_section): Add support for R_SECTION.
	(coff_i386_reloc_type_lookup): Add support for
	BFD_RELOC_16_SECCIDX.
	* coff-x86_64.c (in_reloc_p): Add R_SECTION.
	(howto_table): Add R_SECTION.
	(coff_pe_amd64_relocation_section): Add support for R_SECTION.
	(coff_amd64_reloc_type_lookup): Add support for
	BFD_RELOC_16_SECCIDX.
	* reloc.c: Add BFD_RELOC_16_SECIDX.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

gas	* config/tc-i386.c (pe_directive_secidx): New function.
	(md_pseudo_table): Add support for secidx.
	(x86_cons_fix_new): Likewise.
	(tc_gen_reloc): Likewise.
	* expr.c (op_rank): Add O_secidx.
	* expr.h (operatorT): Likewise.
	* symbols.c (resolve_symbol_value): Add support for O_secidx.
	* testsuite/gas/i386/secidx.s: New test source file.
	* testsuite/gas/i386/secidx.d: New test driver file.
	* testsuite/gas/i386/i386.exp: Run new test.

include	* coff/i386.h: Define R_SECTION.
	* coff/x86_64.h: Likewise.

ld	* testsuite/ld-pe/secidx1.s: New test source file.
	* testsuite/ld-pe/secidx2.s: New test source file.
	* testsuite/ld-pe/secidx.d: New test driver file.
	* testsuite/ld-pe/secidx_64.d: New test driver file.
	* testsuite/ld-pe/pe.exp: Add new tests.
2022-04-07 14:47:17 +01:00
Andreas Krebbel
69341966de IBM zSystems: Add support for z16 as CPU name.
So far z16 was identified as arch14. After the machine has been
announced we can now add the real name.

gas/ChangeLog:

	* config/tc-s390.c (s390_parse_cpu): Add z16 as alternate CPU
	name.
	* doc/as.texi: Add z16 and arch14 to CPU string list.
	* doc/c-s390.texi: Add z16 to CPU string list.

opcodes/ChangeLog:

	* s390-mkopc.c (main): Enable z16 as CPU string in the opcode
	table.
2022-04-07 07:54:29 +02:00
Nick Clifton
19c26da69d Add code to display the contents of .debug_loclists sections which contain offset entry tables.
PR 28981
	* dwarf.c (fetch_indexed_value): Rename to fecth_indexed_addr and
	return the address, rather than a string.
	(fetch_indexed_value): New function - returns a value indexed by a
	DW_FORM_loclistx or DW_FORM_rnglistx form.
	(read_and_display_attr_value): Add support for DW_FORM_loclistx
	and DW_FORM_rnglistx.
	(process_debug_info): Load the loclists and rnglists sections.
	(display_loclists_list): Add support for DW_LLE_base_addressx,
	DW_LLE_startx_endx, DW_LLE_startx_length and
	DW_LLE_default_location.
	(display_offset_entry_loclists): New function.  Displays a
	.debug_loclists section that contains offset entry tables.
	(display_debug_loc): Call the new function.
	(display_debug_rnglists_list): Add support for
	DW_RLE_base_addressx, DW_RLE_startx_endx and DW_RLE_startx_length.
	(display_debug_ranges): Display the contents of the section's
	header.
	* dwarf.h (struct debug_info): Add loclists_base field.
	* testsuite/binutils-all/dw5.W: Update expected output.
	* testsuite/binutils-all/x86-64/pr26808.dump: Likewise.
2022-04-06 14:43:37 +01:00
Nick Clifton
a58b0053f4 z80 assembler: Fix new unexpected overflow warning in v2.37
PR 28791
	* config/tc-z80.c (emit_data_val): Do not warn about overlarge
	constants generated by bit manipulation operators.
	* testsuite/gas/z80/pr28791.s: New test source file.
	* testsuite/gas/z80/pr28791.d: New test driver file.
2022-03-21 11:33:59 +00:00
Nick Clifton
2f49159cfb Updated French translation for the gas sub-directory. 2022-01-28 12:16:03 +00:00
Nick Clifton
5fe73d4624 Update Bulgarian, French, Romaniam and Ukranian translation for some of the sub-directories 2022-01-24 14:22:49 +00:00
Nick Clifton
f908e960c5 Change version number to 2.38.50 and regenerate files 2022-01-22 12:39:28 +00:00
Nick Clifton
a74e1cb344 Add markers for 2.38 branch 2022-01-22 12:08:55 +00:00
Nick Clifton
6c037fdbf0 Update the config.guess and config.sub files from the master repository and regenerate files. 2022-01-17 16:21:22 +00:00
Sergey Belyashov
1adce770ea Fix Z80 assembly failure.
PR 28762
	* app.c (do_scrub_chars): Correct handling when the symbol is not 'af'.
2022-01-17 13:00:17 +00:00
Alan Modra
a2c5833233 Update year range in copyright notice of binutils files
The result of running etc/update-copyright.py --this-year, fixing all
the files whose mode is changed by the script, plus a build with
--enable-maintainer-mode --enable-cgen-maint=yes, then checking
out */po/*.pot which we don't update frequently.

The copy of cgen was with commit d1dd5fcc38ead reverted as that commit
breaks building of bfp opcodes files.
2022-01-02 12:04:28 +10:30
Nick Clifton
f3be70df1b Fix AVR assembler so that it creates relocs that will work with linker relaxation.
PR 28686
gas	* config/tc-avr.h (tc_fix_adjustable): Define.
	* config/tc-avr.c (avr_fix_adjustable): New function.
	* testsuite/gas/all/gas.exp: Skip tests that need adjustable fixups.
	* testsuite/gas/elf/elf.exp: Likewise.
	* testsuite/gas/avr/diffreloc_withrelax.d: Adjust expected output.
	* testsuite/gas/avr/pc-relative-reloc.d: Adjust expected output.

ld	* testsuite/ld-avr/avr-prop-7.d: Adjust expected output.
	* testsuite/ld-avr/avr-prop-8.d: Likewise.
	* testsuite/ld-avr/pr13402.d: Likewise.
2021-12-16 16:40:57 +00:00
Tom de Vries
4780e5e493 [gas] Fix file 0 dir with -gdwarf-5
In out_dir_and_file_list, if file 0 is copied from file 1, only the filename
is copied, and the dir and md5 fields are left to their default values.

Fix this by adding the copy of the dir and md5 fields.

gas/ChangeLog:

2021-11-26  Tom de Vries  <tdevries@suse.de>

	PR 28629
	* dwarf2dbg.c (out_dir_and_file_list): When copying file 1 to file 0,
	also copy dir and md5 fields.
	* testsuite/gas/i386/dwarf5-line-4.d: Adjust expected output.
2021-11-26 09:59:45 +01:00
Nick Clifton
578c64a45a Add multibyte character warning option to the assembler.
* as.c (parse_args): Add support for --multibyte-handling.
	* as.h (multibyte_handling): Declare.
	* app.c (scan_for_multibyte_characters): New function.
	(do_scrub_chars): Call the new function if multibyte warning is
	enabled.
	* input-scrub,c (input_scrub_next_buffer): Call the multibyte
	scanning function if multibyte warnings are enabled.
	* symbols.c (struct symbol_flags): Add multibyte_warned bit.
	(symbol_init): Call the multibyte scanning function if multibyte
	symbol warnings are enabled.
	(S_SET_SEGMENT): Likewise.
	* NEWS: Mention the new feature.
	* doc/as.texi: Document the new feature.
	* testsuite/gas/all/multibyte.s: New test source file.
	* testsuite/gas/all/multibyte1.d: New test driver file.
	* testsuite/gas/all/multibyte1.l: New test expected output.
	* testsuite/gas/all/multibyte2.d: New test driver file.
	* testsuite/gas/all/multibyte2.l: New test expected output.
	* testsuite/gas/all/gas.exp: Run the new tests.
2021-11-18 16:48:19 +00:00
Eric Botcazou
f9402ccaa9 Deal with full path in .file 0 directive
Gas uses the directory part, if present, of the .file 0 directive to set
entry 0 of the directory table in DWARF 5, which represents the "current
directory".

Now Gas also uses the file part of the same directive to set entry 0 of the
file table, which represents the "current compilation file".  But the latter
need not be located in the former so GCC will use a full path in the file
part when it is passed a full path:

gcc -c /full/path/test.c -save-temps

yields:

 .file 0 "/current/directory" "/full/path/test.c"

in the assembly file and:

 The Directory Table (offset 0x22, lines 2, columns 1):
  Entry Name
  0     (indirect line string, offset: 0x25): /current/directory
  1     (indirect line string, offset: 0x38): /full/path

 The File Name Table (offset 0x30, lines 2, columns 2):
  Entry Dir     Name
  0     0       (indirect line string, offset: 0x43): /full/path/test.c

in the object file.  Note the full path and the questionable Dir value in
the 0 entry of the file table.
2021-11-15 12:56:10 +01:00
Markus Klein
d6dc01baf7 ARM assembler: Allow up to 32 single precision registers in the VPUSH and VPOP instructions.
PR 28436
	* config/tc-arm.c (do_vfp_nsyn_push_pop_check): New function.
	(do_vfp_nsyn_pop): Use the new function.
	(do_vfp_nsyn_push): Use the new function.
	* testsuite/gas/arm/v8_1m-mve.s: Add new instructions.
	* testsuite/gas/arm/v8_1m-mve.d: Updated expected disassembly.
2021-10-28 17:17:25 +01:00
Nick Alcock
b9004024b9 configure: regenerate in all projects that use libtool.m4
(including sim/, which has no changelog.)

bfd/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.

binutils/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.

gas/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.

gprof/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.

ld/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.

libctf/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.
	* Makefile.in: Regenerate.

opcodes/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.

zlib/ChangeLog
2021-09-27  Nick Alcock  <nick.alcock@oracle.com>

	* configure: Regenerate.
2021-09-27 20:31:24 +01:00
Peter Bergner
4d5d5d4689 PowerPC: Enable mfppr mfppr32, mtppr and mtppr32 extended mnemonics on POWER5
SPR 896 and the mfppr mfppr32, mtppr and mtppr32 extended mnemonics were added
in ISA 2.03, so enable them on POWER5 and later.

opcodes/
	* ppc-opc.c (powerpc_opcodes) <mfppr, mfppr32, mtppr, mtppr32>: Enable
	on POWER5 and later.

gas/
	* testsuite/gas/ppc/power5.s: New test.
	* testsuite/gas/ppc/power5.d: Likewise.
	* testsuite/gas/ppc/ppc.exp: Run it.
	* testsuite/gas/ppc/power7.s: Remove tests for mfppr, mfppr32, mtppr
	and mtppr32.
	* testsuite/gas/ppc/power7.d: Likewise.
2021-09-25 18:21:17 -05:00
Jan Beulich
168495916d MIPS: don't use get_symbol_name() for section parsing. With s_change_section() later calling obj_elf_section(), it seems better to pre-parse the section name by the same function that will be used there. This way no differences in what is accepted will result.
gas	* config/tc-mips.c (s_change_section): Use obj_elf_section_name to
	parse the section name.
2021-09-13 11:02:48 +01:00
Jan Beulich
5a2947cf17 ia64: don't use get_symbol_name() for section parsing. With cross_section() later calling obj_elf_section(), it seems better to pre-parse the section name by the same function that will be used there. This way no differences in what is accepted will result.
gas	* config/tc-ia64.c (cross_section): Use obj_elf_section_name to
	parse the section name.
2021-09-13 11:00:25 +01:00
Nick Clifton
718aefcf55 Fix the V850 assembler's generation of relocations for the st.b instruction.
PR 28292
gas	* config/tc-v850.c (handle_lo16): Also accept
	BFD_RELOC_V850_LO16_SPLIT_OFFSET.
	* testsuite/gas/v850/split-lo16.s: Add extra line.
	* testsuite/gas/v850/split-lo16.d: Update expected disassembly.

opcodes	* v850-opc.c (D16): Use BFD_RELOC_V850_LO16_SPLIT_OFFSET in place
	of BFD_RELOC_16.
2021-09-02 12:16:10 +01:00
Darius Galis
12612c24a6 Fix a typo in the RX asse,bler. The Double-precision floating-point exception handling control register name is DECNT not DCENT.
* config/rx-parse.y (DECNT): Fixed typo.
	* testsuite/gas/rx/dpopm.sm (DECNT): Fixed typo.
	* testsuite/gas/rx/dpushm.sm (DECNT): Fixed typo.
	* testsuite/gas/rx/macros.inc (DECNT): Fixed typo.
2021-08-11 14:01:55 +01:00
Nick Clifton
5393ca689a Fix an internal error in the CSKY assembler when asked to resolve an overlarge constant.
PR 28215
	* config/tc-csky.c (md_apply_fix): Correctly handle a fixup that
	involves an overlarge constant.
2021-08-11 13:49:30 +01:00
Matt Jacobson
d86d1fc7f9 Add a -mno-dollar-line-separator command line option to the AVR assembler.
Some frontends, like the gcc Objective-C frontend, emit symbols with $
characters in them.  The AVR target code in gas treats $ as a line separator,
so the code doesn?t assemble correctly.

Provide a machine-specific option to disable treating $ as a line separator.

	* config/tc-avr.c (enum options): Add option flag.
	(struct option): Add option -mno-dollar-line-separator.
	(md_parse_option): Adjust treatment of $ when option is present.
	* config/tc-avr.h: Use avr_line_separator_chars.
2021-08-11 10:03:19 +01:00
Nick Clifton
bda3d9fbc8 Fix typo in previous delta 2021-08-11 08:44:40 +01:00
Nick Clifton
3ee0cd9e55 Updated Serbian and Russian translations for various sub-directories 2021-08-10 16:40:37 +01:00
Nick Clifton
3417bfca67 GAS: DWARF-5: Ensure that the 0'th entry in the directory table contains the current working directory.
* dwarf2dbg.c (get_directory_table_entry): Ensure that dir[0]
	contains current working directory.
	(out_dir_and_file_list): Likewise.
	* testsuite/gas/elf/dwarf-5-dir0.s: New test source file.
	* testsuite/gas/elf/dwarf-5-dir0.d: New test driver.
	* testsuite/gas/elf/elf.exp: Run the new test.
	* testsuite/gas/elf/dwarf-5-file0.d: Adjust expected output.
	* testsuite/gas/i386/dwarf5-line-1.d: Likewise.
	* testsuite/gas/i386/dwarf5-line-2.d: Likewise.
2021-08-09 17:23:22 +01:00
Alan Modra
9cce9fab90 gas: default TC_VALIDATE_FIX_SUB to 0
gas/write.c provides a fallback TC_VALIDATE_FIX_SUB define that can be
a problem for some targets, the problem being that a non-zero
definition of TC_VALIDATE_FIX_SUB says that some uses of fx_subsy are
OK, in effect that the target will handle fx_subsy in md_apply_fix
and/or tc_gen_reloc.  A lot of targets don't have the necessary
md_apply_fix and tc_gen_reloc support.  So a safer default is to
disallow fx_subsy by default.

I've had a good look over target usage of fx_subsy, and think I've
caught all the cases where targets need TC_VALIDATE_FIX_SUB.  Possible
failures would be limited to alpha, microblaze, ppc and s390 (the
targets that define UNDEFINED_DIFFERENCE_OK), or targets that generate
fixups with BFD_RELOC_GPREL32/16 and use a syntax explicitly showing
a difference expression.

	* write.c (TC_VALIDATE_FIX_SUB): Default to 0.
	* config/tc-hppa.h (TC_VALIDATE_FIX_SUB): Define.
	* config/tc-microblaze.h (TC_VALIDATE_FIX_SUB): Define.
	* config/tc-alpha.h (TC_VALIDATE_FIX_SUB): Define for ECOFF.
	* config/tc-ppc.h (TC_VALIDATE_FIX_SUB): Don't define for ELF.
	Do define for XCOFF.
2021-07-14 21:52:20 +09:30
Clément Chigot
51d29b8cac objdump: add DWARF support for AIX
DWARF sections have special names on AIX which need be handled
by objdump in order to correctly print them.
This patch also adds the correlation in bfd for future uses.

bfd/
	* libxcoff.h (struct xcoff_dwsect_name): Add DWARF name.
	* coff-rs6000.c (xcoff_dwsect_names): Update.
	* coffcode.h (sec_to_styp_flags): Likewise.
	(coff_new_section_hook): Likewise.
binutils/
	* dwarf.h (struct dwarf_section): Add XCOFF name.
	* dwarf.c (struct dwarf_section_display): Update.
	* objdump.c (load_debug_section): Add XCOFF name handler.
	(dump_dwarf_section): Likewise.
gas/
	* config/tc-ppc.c (ppc_change_debug_section): Update to
	match new name's field.
2021-07-14 21:40:05 +09:30
Tucker
ef744040b4 Add the SEC_ELF_OCTETS flag to debug sections created by the assembler.
PR 28054
gas	* config/obj-elf.c (obj_elf_change_section): Set the
	SEF_ELF_OCTETS flag on debug sections.
2021-07-12 17:12:13 +01:00
Andreas Krebbel
b180e8298b Add changelog entries for last commit 2021-07-07 14:17:05 +02:00
Nick Clifton
ffa5352c0c Fix problems translating messages when a percentage sign appears at the end of a string.
PR 28051
gas	* config/tc-i386.c (offset_in_range): Reformat error messages in
	order to fix problems when translating.
	(md_assemble): Likewise.
	* messages.c (as_internal_value_out_of_range): Likewise.
	* read.c (emit_expr_with_reloc): Likewise.
	* testsuite/gas/all/overflow.l Change expected output format.
	* po/gas.pot: Regenerate.

bfd	* coff-rs6000.c (xcoff_reloc_type_tls): Reformat error messages in
	order to fix problems when translating.
	* cofflink.c (_bfd_coff_write_global_sym): Likewise.
	* elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
	Likewise.
	* po/bfd.pot: Regenerate.
2021-07-07 10:25:41 +01:00
Nick Clifton
346d80ef33 Update version number and regenerate files 2021-07-03 15:16:48 +01:00
Nick Clifton
514192487e Add markers for 2.37 branch 2021-07-03 14:50:57 +01:00
Alan Modra
62194b631d Re: Fix minor NDS32 renaming snafu
Some extern declarations differ in constnes to their definitions too.
Let's make sure this sort of thing doesn't happen again, but putting
the externs in a header where they belong.

gas/
	* config/tc-nds32.c (nds32_keyword_gpr): Don't declare.
	(md_begin): Constify k.
opcodes/
	* nds32-dis.c (nds32_find_reg_keyword): Constify arg and return.
	(nds32_parse_audio_ext, nds32_parse_opcode): Constify psys_reg.
	(nds32_field_table, nds32_opcode_table, nds32_keyword_table),
	(nds32_opcodes, nds32_operand_fields, nds32_keywords),
	(nds32_keyword_gpr): Move declarations to..
	* nds32-asm.h: ..here, constifying to match definitions.
2021-07-02 20:48:55 +09:30
Nick Clifton
af82b082c2 Fix minor NDS32 renaming snafu.
* config/tc-nds32.c: Change all references of keyword_gpr to
	nds32_keyword_gpr.
2021-07-02 10:45:02 +01:00
Mike Frysinger
52b8387412 opcodes: constify & scope microblaze opcodes
This is exporting the variable "opcodes" as a large writable blob.
This is not a namespace friendly name, so add a "microblaze" prefix,
and then sprinkle const over its definition & use.
2021-07-01 17:55:26 -04:00
Mike Frysinger
6c2ede018c opcodes: constify aarch64_opcode_tables
This table is huge (~350k), so stop putting it into writable .data
since it's only const data.
2021-07-01 17:51:00 -04:00
Clément Chigot
1daf786ba3 gas: update csect alignment for PPC prefixed instructions on XCOFF
Power10 prefixed instructions must not cross 64-byte boundaries.
This is already handled.
However, on XCOFF, the csect must be updated to match the new
alignment.

	* config/tc-ppc.c (md_assemble): Update ppc_current_csect
	alignment when finding prefixed instructions.
2021-06-24 10:51:27 +09:30
Alan Modra
ded5cb9444 picojava assembler and disassembler fixes
Commit 54758c3e39 made changes to the picojava support based on
https://sourceware.org/pipermail/binutils/2005-November/045136.html
An update from picojava to picojava II, I think.  Unfortunately the
patch neglected any changes to the gas testsuite, resulting in
"FAIL: pj" since that date.  This patch makes a few relatively simple
changes to cure the regression.

gas/
	* config/tc-pj.c (md_apply_fix): Apply PJ_CODE_REL32 relocs.
	* testsuite/gas/pj/ops.s: Update jsr, ret, getstatic,
	putstatic, getfield, putfield, invokevirtual, invokespecial,
	invokestatic, invokeinterface, goto_w, jsr_w assembly.  Delete
	version 1 picojava opcodes.
	* testsuite/gas/pj/ops.d: Match expected output.
opcodes/
	* pj-dis.c (print_insn_pj): Don't print trailing tab.  Do
	print separator for pcrel insns.
2021-06-22 17:44:45 +09:30
Alan Modra
03e689aaac ubsan errors when 32-bit bfd
A shift count exceeding the size of the value is undefined behaviour,
and so is negating a signed LONG_MIN.

	* config/tc-z80.c (signed_overflow, unsigned_overflow): Avoid UB.
2021-06-19 11:08:55 +09:30
Alan Modra
43f71bc5df ppc raw test failure when 32-bit bfd
The test contained an expression that can't be evaluated unless
expressions are 64-bit.

	* testsuite/gas/ppc/raw.s: Use 0 as pli constant.
	* testsuite/gas/ppc/raw.d: Update to suit.
2021-06-19 11:08:55 +09:30
Jan Beulich
162c6aef1f gas: fold symbol table entries generated for .startof.() / .sizeof.()
When the same such construct is used multiple times in a source file,
there's still no need to emit a separate symbol each time. Under the
assumption that there won't be many of these, use a simple array
lookup method to record previously used symbols.
2021-06-18 13:51:52 +02:00
Nick Clifton
96cbfd9f04 Fix an assertion failure in the AArch64 assembler triggered by incorrect instruction syntax.
PR 27904
	* config/tc-aarch64.c (ldst_lo12_determine_real_reloc_type):
	Generate a syntax error message if the reloc qualifier does not
	match the instruction's size.
2021-06-17 16:19:20 +01:00
Clément Chigot
bcf8470303 gas: handle csect in bss section for XCOFF
Latest gcc versions are now generating csects instead of .lcomm
for bss symbols.
Some adjustements are needed in order to handle them.

	* config/tc-ppc.c (md_begin): Create bss section with dummy
	symbol.
	(ppc_frob_symbol): Output XTY_CM for bss csects.
	(ppc_fix_adjustable): Adjust condition to avoid bss csects.
2021-06-17 23:29:47 +09:30
Clément Chigot
3478a63d7e gas: ensure sections contents is zero for BFD_RELOC_PPC*_TLSM on XCOFF.
AIX ld expects the section contents for relocations BFD_RELOC_PPC_TLSM
or BFD_RELOC_PPC64_TLSM to be zero.
Actually, it seems to be the case for all the TLS relocations
generated by AIX assembly but only these two are mandatory.

	* config/tc-ppc.c (md_apply_fix): Adjust addend to nullify
	section contents for BFD_RELOC_PPC_TLSM or
	BFD_RELOC_PPC64_TLSM.
	* testsuite/gas/ppc/xcoff-tlsm-32.d: New test.
	* testsuite/gas/ppc/xcoff-tlsm-64.d: New test.
	* testsuite/gas/ppc/xcoff-tlsm.s: New test.
	* testsuite/gas/ppc/aix.exp: Run new tests.
2021-06-17 15:38:09 +09:30
Jan Beulich
bb32eac5a9 gas: fix hex float parsing from .dcb.? directives
Unlike for .dc.? the parsing here failed to skip the colon before
calling hex_float(). To avoid both variants of parsing going out of sync
again, introduce a helper used by both.
2021-06-16 08:55:52 +02:00
Jan Beulich
4504a63467 gas: fix overflow diagnostics
While the logic in fixup_segment() so far was off by 1 for fixups
dealing with quantities without known signedness, thus failing to report
an overflow when e.g. a byte-sized resulting value is -0x100, the logic
in emit_expr_with_reloc() reported an overflow even on large negative
values when the respective positive ones would not be warned
about, and when fixup_segment() wouldn't do so either. Such diagnostics
all ought to follow a similar pattern of what value range is acceptable.
(If expressions' X_unsigned was reliably set, emit_expr_with_reloc()'s
checking might make sense to tighten based on that flag.)

Note that with commit 80aab57939 ("Changes to let cons handle bignums
like general expressions") having added handling of nbytes >
sizeof(valueT) in the O_constant case, converting to O_big, the setting
to zero of "hibit" had become dead. With "hibit" no longer used, this
code now gets dropped altogether. But additionally a respective know()
gets inserted.
2021-06-16 08:55:20 +02:00
Jan Beulich
b00af7c8c6 x86: bring "gas --help" output for --32 etc in sync with reality
The testsuite uses the output to determine whether BFD64 is in effect.

--x32 is supported for ELF only; don't advertise it for PE/COFF. --64 is
also supported for Mach-O; advertise it. Adjust the testsuite's BFD64
check accordingly.

Also replace "code" by "object", since it's the object format that the
options primarily control. It's also _initial_ code bitness, but this
can be changed by directives.
2021-06-15 08:01:12 +02:00