Commit Graph

88 Commits

Author SHA1 Message Date
Gunther Nikl 9ad4cfa8c3 [PATCH 4/4]: Add generic prototype for md_pcrel_from_section
This patch removes the need for target headers to provide a custom prototype
for md_pcrel_from_section.

	* tc.h (md_pcrel_from_section): Add prototype.
	* config/tc-aarch64.h (md_pcrel_from_section): Remove prototype.
	* config/tc-arc.h (md_pcrel_from_section): Likewise.
	* config/tc-arm.h (md_pcrel_from_section): Likewise.
	* config/tc-avr.h (md_pcrel_from_section): Likewise.
	* config/tc-bfin.h (md_pcrel_from_section): Likewise.
	* config/tc-bpf.h (md_pcrel_from_section): Likewise.
	* config/tc-csky.h (md_pcrel_from_section): Likewise.
	* config/tc-d10v.h (md_pcrel_from_section): Likewise.
	* config/tc-d30v.h (md_pcrel_from_section): Likewise.
	* config/tc-epiphany.h (md_pcrel_from_section): Likewise.
	* config/tc-fr30.h (md_pcrel_from_section): Likewise.
	* config/tc-frv.h (md_pcrel_from_section): Likewise.
	* config/tc-iq2000.h (md_pcrel_from_section): Likewise.
	* config/tc-lm32.h (md_pcrel_from_section): Likewise.
	* config/tc-m32c.h (md_pcrel_from_section): Likewise.
	* config/tc-m32r.h (md_pcrel_from_section): Likewise.
	* config/tc-mcore.h (md_pcrel_from_section): Likewise.
	* config/tc-mep.h (md_pcrel_from_section): Likewise.
	* config/tc-metag.h (md_pcrel_from_section): Likewise.
	* config/tc-microblaze.h (md_pcrel_from_section): Likewise.
	* config/tc-mmix.h (md_pcrel_from_section): Likewise.
	* config/tc-moxie.h (md_pcrel_from_section): Likewise.
	* config/tc-msp430.h (md_pcrel_from_section): Likewise.
	* config/tc-mt.h (md_pcrel_from_section): Likewise.
	* config/tc-or1k.h (md_pcrel_from_section): Likewise.
	* config/tc-ppc.h (md_pcrel_from_section): Likewise.
	* config/tc-rl78.h (md_pcrel_from_section): Likewise.
	* config/tc-rx.h (md_pcrel_from_section): Likewise.
	* config/tc-s390.h (md_pcrel_from_section): Likewise.
	* config/tc-sh.h (md_pcrel_from_section): Likewise.
	* config/tc-xc16x.h (md_pcrel_from_section): Likewise.
	* config/tc-xstormy16.h (md_pcrel_from_section): Likewise.
2020-04-08 12:28:10 +01:00
Alan Modra b3adc24a07 Update year range in copyright notice of binutils files 2020-01-01 18:42:54 +10:30
Barnaby Wilks 5312fe52e9 Add generic and ARM specific support for half-precision IEEE 754 floating point numbers to the assembler.
Half precision floating point numbers will be encoded using the IEEE 754
half precision floating point format - 16 bits in total, 1 for sign, 5
for exponent and 10 bits of  mantissa.

This patch implements the float16 directive for both the IEEE 754 format
and the Arm alternative format for the Arm backend.

The syntax of the directive is:

  .float16 <0-n decimal numbers>
e.g.
  .float16 12.0
  .float16 0.23, 433.1, 0.06

The Arm alternative format is almost identical to the IEEE 754 format,
except that it doesn't encode for NaNs or Infinity (instead an exponent
of 0x1F represents a normalized number in the range 65536 to 131008).

The alternative format is documented in the reference manual:

  https://static.docs.arm.com/ddi0487/db/DDI0487D_b_armv8_arm.pdf?_ga=2.72318806.49764181.1561632697-999473562.1560847439

Which format is used is controlled by the .float16_format <format>
directive, where if <format> = ieee, then use the IEEE 754
half-precision format else if <format> = alternative, then use the
Arm alternative format

Or the format can be set on the command line via the -mfp16-format
option that has a similar syntax.  -mfp16-format=<ieee|alternative>.
This also fixes the format and it cannot be changed by any directives.

Once the format has been set (either by the command line option or a directive) it cannot be changed,
and any attempts to change it (i.e. with the float16_format directive) will result in a warning and the
line being ignored.

For ELF targets the appropriate EABI attribute will be written out at the end of assembling
if the format has been explicitly specified. If no format has been explicitly specified then no
EABI attributes will be written.

If the format is not explicitly specified then any float16 directives are encoding using the IEEE 754-2008
format by default until the format is fixed or changed with the float16_format directive.

gas	* config/tc-arm.c (enum fp_16bit_format): Add enum to represent the 2 float16 encodings.
	(md_atof): Set precision for float16 type.
	(arm_is_largest_exponent_ok): Check for whether to encode with the IEEE or alternative
	format.
	(set_fp16_format): Parse a float16_format directive.
	(arm_parse_fp16_opt): Parse the fp16-format command line option.
	(aeabi_set_public_attributes): For ELF encode the FP16 format EABI attribute.
	* config/tc-arm.h (TC_LARGEST_EXPONENT_IS_NORMAL): Macro that expands to
	arm_is_largest_exponent_ok.
	(arm_is_largest_exponent_ok): Add prototype for arm_is_largest_exponent_ok function.
	* doc/c-arm.texi: Add documentation for .float16, .float16_format and -mfp16-format=
	* testsuite/gas/arm/float16-bad.d: New test.
	* testsuite/gas/arm/float16-bad.l: New test.
	* testsuite/gas/arm/float16-bad.s: New test.
	* testsuite/gas/arm/float16-be.d: New test.
	* testsuite/gas/arm/float16-format-bad.d: New test.
	* testsuite/gas/arm/float16-format-bad.l: New test.
	* testsuite/gas/arm/float16-format-bad.s: New test.
	* testsuite/gas/arm/float16-format-opt-bad.d: New test.
	* testsuite/gas/arm/float16-format-opt-bad.l: New test.
	* testsuite/gas/arm/float16-le.d: New test.
	* testsuite/gas/arm/float16.s: New test.
	* testsuite/gas/arm/float16-eabi-alternative-format.d: New test.
	* testsuite/gas/arm/float16-eabi-ieee-format.d: New test.
	* testsuite/gas/arm/float16-eabi-no-format.d: New test.
	* testsuite/gas/arm/float16-eabi.s: New test.

	* config/atof-ieee.c (H_PRECISION): Macro for precision of float16
	type.
	(atof_ieee): Set precision and exponent bits for encoding float16
	types.
	(gen_to_words): NaN and Infinity encoding for float16.
	(ieee_md_atof): Set precision for encoding float16 type.
2019-08-12 11:08:36 +01:00
Andre Vieira 5ee9134313 [PATCH 2/57][Arm][GAS] Add support for MVE instructions: vpst, vadd, vsub and vabd
gas/ChangeLog:
2019-05-16  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* config/tc-arm.c (enum it_instruction_type): Rename to...
	(enum pred_instruction_type): ... this. Include VPT types.
	(it_insn_type): Rename to ...
	(pred_insn_type): .. this.
	(arm_it): Change comment.
	(enum arm_reg_type): Add new value.
	(reg_expected_msgs): New entry.
	(asm_opcode): Add mayBeVecPred member.
	(BAD_SYNTAX, BAD_NOT_VPT, BAD_OUT_VPT, BAD_VPT_COND, MVE_NOT_IT,
	 MVE_NOT_VPT, MVE_BAD_PC, MVE_BAD_SP): New diagnostic MACROS.
	(arm_vcond_hsh): New table for vector condition codes.
	(now_it): Rename to ...
	(now_pred): ... this.
	(now_it_compatible): Rename to ...
	(now_pred_compatible): ... this.
	(in_it_block): Rename to ...
	(in_pred_block): ... this.
	(handle_it_state): Rename to ...
	(handle_pred_state): ... this. And change it to accept VPT blocks.
	(set_it_insn_type): Rename to ...
	(set_pred_insn_type): ... this.
	(set_it_insn_type_nonvoid): Rename to ...
	(set_pred_insn_type_nonvoid): ... this.
	(set_it_insn_type_last): Rename to ...
	(set_pred_insn_type_last): ... this.
	(record_feature_use): Moved.
	(mark_feature_used): Likewise.
	(parse_typed_reg_or_scalar): Add new case for REG_TYPE_MQ.
	(emit_insn): Use renamed functions and variables.
	(enum operand_parse_code): Add new operands.
	(parse_operands): Handle new operands.
	(do_scalar_fp16_v82_encode): Change predication detection.
	(do_it): Use renamed functions and variables.
	(do_t_add_sub): Likewise.
	(do_t_arit3): Likewise.
	(do_t_arit3c): Likewise.
	(do_t_blx): Likewise.
	(do_t_branch): Likewise.
	(do_t_bkpt_hlt1): Likewise.
	(do_t_branch23): Likewise.
	(do_t_bx): Likewise.
	(do_t_bxj): Likewise.
	(do_t_cond): Likewise.
	(do_t_csdb): Likewise.
	(do_t_cps): Likewise.
	(do_t_cpsi): Likewise.
	(do_t_cbz): Likewise.
	(do_t_it): Likewise.
	(do_mve_vpt): New function to handle VPT blocks.
	(encode_thumb2_multi): Use renamed functions and variables.
	(do_t_ldst): Use renamed functions and variables.
	(do_t_mov_cmp): Likewise.
	(do_t_mvn_tst): Likewise.
	(do_t_mul): Likewise.
	(do_t_nop): Likewise.
	(do_t_neg): Likewise.
	(do_t_rsb): Likewise.
	(do_t_setend): Likewise.
	(do_t_shift): Likewise.
	(do_t_smc): Likewise.
	(do_t_tb): Likewise.
	(do_t_udf): Likewise.
	(do_t_loloop): Likewise.
	(do_neon_cvt_1): Likewise.
	(do_vfp_nsyn_cvt_fpv8): Likewise.
	(do_vsel): Likewise.
	(do_vmaxnm): Likewise.
	(do_vrint_1): Likewise.
	(do_crypto_2op_1): Likewise.
	(do_crypto_3op_1): Likewise.
	(do_crc32_1): Likewise.
	(it_fsm_pre_encode): Likewise.
	(it_fsm_post_encode): Likewise.
	(force_automatic_it_block_close): Likewise.
	(check_it_blocks_finished): Likewise.
	(check_pred_blocks_finished): Likewise.
	(arm_cleanup): Likewise.
	(now_it_add_mask): Rename to ...
	(now_pred_add_mask): ... this. And use new variables and functions.
	(NEON_ENC_TAB): Add entries for vabdl, vaddl and vsubl.
	(N_I_MVE, N_F_MVE, N_SU_MVE): New MACROs.
	(neon_check_type): Generalize error message.
	(mve_encode_qqr): New MVE generic encoding function.
	(neon_dyadic_misc): Change to accept MVE variants.
	(do_neon_dyadic_if_su): Likewise.
	(do_neon_addsub_if_i): Likewise.
	(do_neon_dyadic_long): Likewise.
	(vfp_or_neon_is_neon): Add extra checks.
	(check_simd_pred_availability): Helper function to check SIMD
	instruction availability with respect to predication.
	(enum opcode_tag): New suffix value.
	(opcode_lookup): Change to handle VPT blocks.
	(new_automatic_it_block): Rename to ...
	(close_automatic_it_block): ...this.
	(TxCE, TxC3, TxC3w, TUE, TUEc, TUF, CE, C3, ToC, ToU,
	 toC, toU, CL, cCE, cCL, C3E, xCM_, UE, UF, NUF, nUF,
	 NCE_tag, NCE, NCEF, nCE_tag, nCE, nCEF): Add default value for new
	field.
	(mCEF, mnCEF, mnCE, MNUF, mnUF, mToC, MNCE, MNCEF): New MACROs.
	(insns): Redefine vadd, vsub, cabd, vabdl, vaddl, vsubl to accept MVE
	variants. Add entries for vscclrm, and vpst.
	(md_begin): Add arm_vcond_hsh initialization.
	* config/tc-arm.h (enum it_state): Rename to...
	(enum pred_state): ...this.
	(struct current_it): Rename to...
	(struct current_pred): ...this.
	(enum pred_type): New enum.
	(struct arm_segment_info_type): Use current_pred.
	* testsuite/gas/arm/armv8_3-a-fp-bad.l: Update error message.
	* testsuite/gas/arm/armv8_3-a-simd-bad.l: Update error message.
	* testsuite/gas/arm/dotprod-illegal.l: Update error message.
	* testsuite/gas/arm/mve-vaddsubabd-bad-1.d: New test.
	* testsuite/gas/arm/mve-vaddsubabd-bad-1.l: New test.
	* testsuite/gas/arm/mve-vaddsubabd-bad-1.s: New test.
	* testsuite/gas/arm/mve-vaddsubabd-bad-2.d: New test.
	* testsuite/gas/arm/mve-vaddsubabd-bad-2.l: New test.
	* testsuite/gas/arm/mve-vaddsubabd-bad-2.s: New test.
	* testsuite/gas/arm/mve-vpst-bad.d: New test.
	* testsuite/gas/arm/mve-vpst-bad.l: New test.
	* testsuite/gas/arm/mve-vpst-bad.s: New test.
	* testsuite/gas/arm/neon-ldst-es-bad.l: Updated error message.
2019-05-16 16:19:31 +01:00
H.J. Lu db22231044 gas: Pass max_bytes to TC_FRAG_INIT
ommit 3ae729d5a4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Mar 7 04:18:45 2018 -0800

    x86: Rewrite NOP generation for fill and alignment

increased MAX_MEM_FOR_RS_ALIGN_CODE to 4095 which resulted in increase
of assembler time and memory usage by 5 times for inputs with many
.p2align directives, which is typical for LTO output.  This patch passes
max_bytes to TC_FRAG_INIT so that MAX_MEM_FOR_RS_ALIGN_CODE can be set
as needed and tracked by backend it so that HANDLE_ALIGN can check the
maximum alignment for each rs_align_code frag.  Wall time to assemble
the same cc1plus.s:

before:

423.78user 0.89system 7:05.71elapsed 99%CPU

after:

102.35user 0.27system 1:42.89elapsed 99%CPU

	PR gas/24165
	* frags.c (frag_var_init): Pass max_chars to TC_FRAG_INIT as
	max_bytes.
	* config/tc-aarch64.h (TC_FRAG_INIT): Add and pass max_bytes to
	aarch64_init_frag.
	* /config/tc-arm.h (TC_FRAG_INIT): And and pass max_bytes to
	arm_init_frag.
	* config/tc-avr.h (TC_FRAG_INIT): And and ignore max_bytes.
	* config/tc-ia64.h (TC_FRAG_INIT): Likewise.
	* config/tc-mmix.h (TC_FRAG_INIT): Likewise.
	* config/tc-nds32.h (TC_FRAG_INIT): Likewise.
	* config/tc-ns32k.h (TC_FRAG_INIT): Likewise.
	* config/tc-rl78.h (TC_FRAG_INIT): Likewise.
	* config/tc-rx.h (TC_FRAG_INIT): Likewise.
	* config/tc-score.h (TC_FRAG_INIT): Likewise.
	* config/tc-tic54x.h (TC_FRAG_INIT): Likewise.
	* config/tc-tic6x.h (TC_FRAG_INIT): Likewise.
	* config/tc-xtensa.h (TC_FRAG_INIT): Likewise.
	* config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): Set to
	(alignment ? ((1 << alignment) - 1) : 1)
	(i386_tc_frag_data): Add max_bytes.
	(TC_FRAG_INIT): Add and track max_bytes.
	(HANDLE_ALIGN): Replace MAX_MEM_FOR_RS_ALIGN_CODE with
	fragP->tc_frag_data.max_bytes.
	* doc/internals.texi: Update TC_FRAG_TYPE with max_bytes.
2019-02-10 04:34:22 -08:00
Alan Modra 827041555a Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
Alan Modra 2ac93be706 Remove arm-aout and arm-coff support
This also removes arm-netbsd (not arm-netbsdelf!), arm-openbsd, and
arm-riscix.  Those targets weren't on the obsolete list but they are
all aout, and it doesn't make all that much sense to remove arm-aout
without removing them too.

bfd/
	* Makefile.am: Remove arm-aout and arm-coff support.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* aout-arm.c: Delete.
	* armnetbsd.c: Delete.
	* riscix.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* testsuite/binutils-all/arm/objdump.exp: Remove arm-aout and
	arm-coff support.
	* testsuite/binutils-all/objcopy.exp: Likewise.
	* testsuite/lib/binutils-common.exp: Likewise.
gas/
	* Makefile.am: Remove arm-aout and arm-coff support.
	* config/tc-arm.c: Likewise.
	* config/tc-arm.h: Likewise.
	* configure.tgt: Likewise.
	* testsuite/gas/aarch64/codealign.d: Likewise.
	* testsuite/gas/aarch64/mapping.d: Likewise.
	* testsuite/gas/aarch64/mapping2.d: Likewise.
	* testsuite/gas/arm/adds-thumb1-reloc-local-armv7-m.d: Likewise.
	* testsuite/gas/arm/adds-thumb1-reloc-local.d: Likewise.
	* testsuite/gas/arm/addsw-bad.d: Likewise.
	* testsuite/gas/arm/align.d: Likewise.
	* testsuite/gas/arm/align64.d: Likewise.
	* testsuite/gas/arm/arch7.d: Likewise.
	* testsuite/gas/arm/arch7a-mp.d: Likewise.
	* testsuite/gas/arm/arch7em.d: Likewise.
	* testsuite/gas/arm/archv8m-main-dsp-5.d: Likewise.
	* testsuite/gas/arm/arm-it-auto-2.d: Likewise.
	* testsuite/gas/arm/arm-it-auto-3.d: Likewise.
	* testsuite/gas/arm/arm-it-auto.d: Likewise.
	* testsuite/gas/arm/arm-it-bad-2.d: Likewise.
	* testsuite/gas/arm/arm-it.d: Likewise.
	* testsuite/gas/arm/armv7e-m+fpv5-d16.d: Likewise.
	* testsuite/gas/arm/armv7e-m+fpv5-sp-d16.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-scalar-thumb.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-scalar.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-simd-thumb.d: Likewise.
	* testsuite/gas/arm/armv8-2-fp16-simd.d: Likewise.
	* testsuite/gas/arm/armv8-a+crypto.d: Likewise.
	* testsuite/gas/arm/armv8-a+fp.d: Likewise.
	* testsuite/gas/arm/armv8-a+ras.d: Likewise.
	* testsuite/gas/arm/armv8-a+rdma-warning.d: Likewise.
	* testsuite/gas/arm/armv8-a+rdma.d: Likewise.
	* testsuite/gas/arm/armv8-a+simd.d: Likewise.
	* testsuite/gas/arm/armv8-a-barrier-thumb.d: Likewise.
	* testsuite/gas/arm/armv8-r+fp.d: Likewise.
	* testsuite/gas/arm/armv8-r+simd.d: Likewise.
	* testsuite/gas/arm/armv8-r-barrier-thumb.d: Likewise.
	* testsuite/gas/arm/armv8_1-a+simd.d: Likewise.
	* testsuite/gas/arm/armv8_2+rdma.d: Likewise.
	* testsuite/gas/arm/armv8_2-a.d: Likewise.
	* testsuite/gas/arm/armv8_3-a-fp.d: Likewise.
	* testsuite/gas/arm/armv8_3-a-simd.d: Likewise.
	* testsuite/gas/arm/armv8a-automatic-hlt.d: Likewise.
	* testsuite/gas/arm/armv8a-automatic-lda.d: Likewise.
	* testsuite/gas/arm/attr-syntax.d: Likewise.
	* testsuite/gas/arm/automatic-bw.d: Likewise.
	* testsuite/gas/arm/automatic-cbz.d: Likewise.
	* testsuite/gas/arm/automatic-clrex.d: Likewise.
	* testsuite/gas/arm/automatic-lda.d: Likewise.
	* testsuite/gas/arm/automatic-ldaex.d: Likewise.
	* testsuite/gas/arm/automatic-ldaexb.d: Likewise.
	* testsuite/gas/arm/automatic-ldrex.d: Likewise.
	* testsuite/gas/arm/automatic-ldrexd.d: Likewise.
	* testsuite/gas/arm/automatic-movw.d: Likewise.
	* testsuite/gas/arm/automatic-sdiv.d: Likewise.
	* testsuite/gas/arm/automatic-strexb.d: Likewise.
	* testsuite/gas/arm/barrier-bad-thumb.d: Likewise.
	* testsuite/gas/arm/barrier-bad.d: Likewise.
	* testsuite/gas/arm/barrier-thumb.d: Likewise.
	* testsuite/gas/arm/barrier.d: Likewise.
	* testsuite/gas/arm/bignum1.d: Likewise.
	* testsuite/gas/arm/blx-bad.d: Likewise.
	* testsuite/gas/arm/blx-bl-convert.d: Likewise.
	* testsuite/gas/arm/blx-local.s: Likewise.
	* testsuite/gas/arm/crc32-armv8-a-bad.d: Likewise.
	* testsuite/gas/arm/crc32-armv8-a.d: Likewise.
	* testsuite/gas/arm/crc32-armv8-r-bad.d: Likewise.
	* testsuite/gas/arm/crc32-armv8-r.d: Likewise.
	* testsuite/gas/arm/dis-data.d: Likewise.
	* testsuite/gas/arm/dis-data2.d: Likewise.
	* testsuite/gas/arm/dis-data3.d: Likewise.
	* testsuite/gas/arm/eabi_attr_1.d: Likewise.
	* testsuite/gas/arm/fp-save.d: Likewise.
	* testsuite/gas/arm/group-reloc-alu-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-alu-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-alu.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldc-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldc-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldc.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldr-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldr-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldr.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldrs-encoding-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldrs-parsing-bad.d: Likewise.
	* testsuite/gas/arm/group-reloc-ldrs.d: Likewise.
	* testsuite/gas/arm/insn-error-a.d: Likewise.
	* testsuite/gas/arm/insn-error-t.d: Likewise.
	* testsuite/gas/arm/inst-po-2.d: Likewise.
	* testsuite/gas/arm/inst-po-3.d: Likewise.
	* testsuite/gas/arm/inst-po-be.d: Likewise.
	* testsuite/gas/arm/inst-po.d: Likewise.
	* testsuite/gas/arm/ldconst.d: Likewise.
	* testsuite/gas/arm/ldgesb-bad.d: Likewise.
	* testsuite/gas/arm/ldgesh-bad.d: Likewise.
	* testsuite/gas/arm/ldst-offset0.d: Likewise.
	* testsuite/gas/arm/local_function.d: Likewise.
	* testsuite/gas/arm/local_label_coff.d: Likewise.
	* testsuite/gas/arm/local_label_elf.d: Likewise.
	* testsuite/gas/arm/mapping.d: Likewise.
	* testsuite/gas/arm/mapping2.d: Likewise.
	* testsuite/gas/arm/mapping3.d: Likewise.
	* testsuite/gas/arm/mapping4.d: Likewise.
	* testsuite/gas/arm/mapshort-elf.d: Likewise.
	* testsuite/gas/arm/mask_1-armv8-a.d: Likewise.
	* testsuite/gas/arm/mask_1-armv8-r.d: Likewise.
	* testsuite/gas/arm/movs-thumb1-reloc-local-armv7-m.d: Likewise.
	* testsuite/gas/arm/movs-thumb1-reloc-local.d: Likewise.
	* testsuite/gas/arm/movw-local.d: Likewise.
	* testsuite/gas/arm/mrs-msr-thumb-v6t2.d: Likewise.
	* testsuite/gas/arm/mrs-msr-thumb-v7-m.d: Likewise.
	* testsuite/gas/arm/mrs-msr-thumb-v7e-m.d: Likewise.
	* testsuite/gas/arm/msr-imm-bad.d: Likewise.
	* testsuite/gas/arm/msr-reg-bad.d: Likewise.
	* testsuite/gas/arm/msr-reg-thumb.d: Likewise.
	* testsuite/gas/arm/nomapping.d: Likewise.
	* testsuite/gas/arm/nops.d: Likewise.
	* testsuite/gas/arm/pic.d: Likewise.
	* testsuite/gas/arm/pinsn.d: Likewise.
	* testsuite/gas/arm/plt-1.d: Likewise.
	* testsuite/gas/arm/pr21458.d: Likewise.
	* testsuite/gas/arm/pr9722.d: Likewise.
	* testsuite/gas/arm/strex-t.d: Likewise.
	* testsuite/gas/arm/t2-branch-global.d: Likewise.
	* testsuite/gas/arm/target-reloc-1.d: Likewise.
	* testsuite/gas/arm/thumb-b-bad.d: Likewise.
	* testsuite/gas/arm/thumb-w-bad.d: Likewise.
	* testsuite/gas/arm/thumb-w-good.d: Likewise.
	* testsuite/gas/arm/thumb.d: Likewise.
	* testsuite/gas/arm/thumb2_it.d: Likewise.
	* testsuite/gas/arm/thumb2_it_auto.d: Likewise.
	* testsuite/gas/arm/thumb2_it_search.d: Likewise.
	* testsuite/gas/arm/thumb2_ldmstm.d: Likewise.
	* testsuite/gas/arm/thumb2_ldr_immediate_armv6.d: Likewise.
	* testsuite/gas/arm/thumb2_ldr_immediate_armv6t2.d: Likewise.
	* testsuite/gas/arm/thumb2_ldr_immediate_highregs_armv6t2.d: Likewise.
	* testsuite/gas/arm/thumb2_pool.d: Likewise.
	* testsuite/gas/arm/thumb2_vpool.d: Likewise.
	* testsuite/gas/arm/thumb2_vpool_be.d: Likewise.
	* testsuite/gas/arm/thumb32.d: Likewise.
	* testsuite/gas/arm/thumbver.d: Likewise.
	* testsuite/gas/arm/tls.d: Likewise.
	* testsuite/gas/arm/tls_vxworks.d: Likewise.
	* testsuite/gas/arm/undefined.d: Likewise.
	* testsuite/gas/arm/undefined_coff.d: Likewise.
	* testsuite/gas/arm/unwind.d: Likewise.
	* testsuite/gas/arm/v4bx.d: Likewise.
	* testsuite/gas/arm/vcmp-noprefix-imm.d: Likewise.
	* testsuite/gas/arm/vcvt-bad.d: Likewise.
	* testsuite/gas/arm/vfma1.d: Likewise.
	* testsuite/gas/arm/vldconst.d: Likewise.
	* testsuite/gas/arm/vldconst_be.d: Likewise.
	* testsuite/gas/arm/vldm-arm.d: Likewise.
	* testsuite/gas/arm/vldr.d: Likewise.
	* testsuite/gas/arm/weakdef-1.d: Likewise.
	* testsuite/gas/arm/weakdef-2.d: Likewise.
	* config/te-riscix.h: Delete.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am: Remove arm-aout and arm-coff support.
	* configure.tgt: Likewise.
	* testsuite/ld-arm/attr-merge-div-00.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-01-m3.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-01.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-02.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-10-m3.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-10.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-11.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-12.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-120.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-20.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-21.d: Likewise.
	* testsuite/ld-arm/attr-merge-div-22.d: Likewise.
	* testsuite/ld-arm/attr-merge-hardfp-use-1.d: Likewise.
	* testsuite/ld-arm/attr-merge-hardfp-use-2.d: Likewise.
	* testsuite/ld-arm/attr-merge-nosection-1.d: Likewise.
	* testsuite/ld-arm/attr-merge-unknown-2.d: Likewise.
	* testsuite/ld-arm/attr-merge-unknown-2r.d: Likewise.
	* testsuite/ld-arm/attr-merge-unknown-3.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-1.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-10.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-10r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-11.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-11r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-12.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-12r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-13.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-13r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-14.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-14r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-1r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-2.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-2r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-3.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-3r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-4.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-4r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-5.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-5r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-6.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-6r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-7.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-7r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-8.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-8r.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-9.d: Likewise.
	* testsuite/ld-arm/attr-merge-vfp-9r.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-00-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-00.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-02-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-02.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-04-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-04.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-20-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-20.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-22-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-22.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-24-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-40-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-40.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-42-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-44-nowarn.d: Likewise.
	* testsuite/ld-arm/attr-merge-wchar-44.d: Likewise.
	* testsuite/ld-arm/eabi-hard-float.d: Likewise.
	* testsuite/ld-arm/eabi-soft-float-ABI4.d: Likewise.
	* testsuite/ld-arm/eabi-soft-float-r.d: Likewise.
	* testsuite/ld-arm/eabi-soft-float.d: Likewise.
	* testsuite/ld-arm/gc-hidden-1.d: Likewise.
	* emulparams/armaoutb.sh: Delete.
	* emulparams/armaoutl.sh: Delete.
	* emulparams/armcoff.sh: Delete.
	* emulparams/armnbsd.sh: Delete.
	* emulparams/riscix.sh: Delete.
	* scripttempl/armaout.sc: Delete.
	* scripttempl/armcoff.sc: Delete.
	* scripttempl/riscix.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-25 09:38:17 +09:30
Alan Modra ddb000396c Remove arm-epoc-pe support
bfd/
	* Makefile.am: Remove arm-epoc-pe support.
	* coff-arm.c: Likewise.
	* config.bfd: Likewise.
	* configure.ac: Likewise.
	* targets.c: Likewise.
	* epoc-pe-arm.c: Delete.
	* epoc-pei-arm.c: Delete.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* po/SRC-POTFILES.in: Regenerate.
binutils/
	* configure.ac: Remove arm-epoc-pe support.
	* dlltool.c: Likewise.
	* configure: Regenerate.
gas/
	* Makefile.am: Remove arm-epoc-pe support.
	* config/tc-arm.h: Likewise.
	* configure.tgt: Likewise.
	* testsuite/gas/all/gas.exp: Likewise.
	* testsuite/gas/arm/local_label_coff.d: Likewise.
	* testsuite/gas/arm/undefined.d: Likewise.
	* testsuite/gas/arm/undefined_coff.d: Likewise.
	* config/te-epoc-pe.h: Delete.
	* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
ld/
	* Makefile.am: Remove arm-epoc-pe support.
	* configure.tgt: Likewise.
	* emultempl/pe.em: Likewise.
	* pe-dll.c: Likewise.
	* testsuite/ld-scripts/fill.d: Likewise.
	* testsuite/ld-scripts/fill16.d: Likewise.
	* emulparams/arm_epoc_pe.sh: Delete.
	* scripttempl/epocpe.sc: Delete.
	* Makefile.in: Regenerate.
	* po/BLD-POTFILES.in: Regenerate.
2018-04-16 20:29:05 +09:30
Alan Modra 219d1afa89 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
Thomas Preud'homme c168ce07e5 [ARM] Keep separation between extensions and architecture bits throughout execution
=== Context ===

This patch is part of a patch series to add support for ARMv8-R
architecture. Its purpose is to keep the distinction between
architecture feature bits and extension ones after parsing has occured.

=== Motivation ===

This distinction is necessary to allow the Tag_CPU_arch build attribute
value to be exactly as per the architecture of the selected CPU. With
mixed architecture and extension feature bit, it is impossible to find
an architecture with an exact match of feature bit and the build
attribute value logic must then select the closest match which might not
be the right architecture. The previous patch in the patch series makes
the distinction possible when parsing -mcpu and .cpu directives but the
distinction gets lost after. Similarly feature bits contributed by
extensions in -march or .arch_extensions directive are mixed together
with architecture extensions.

=== Patch description ===

The patch adds new feature bit pointer for extension feature bits.
Information from the parsing regarding extensions can then be kept
separate in those. This requires adapting arm_parse_extension to deal
with two feature bits, allowing the architecture bits to be marked as
const. It also requires extra care when setting cpu_variant and
selected_cpu because the extension bits are optional since there might
not be any extension in use.

Note that contrary to cpu feature bits, the extension feature bits are
made read/write and are always dynamically allocated. This allows to
unconditionally free them in arm_md_post_relax added for this occasion,
thereby fixing a longstanding memory leak when arm_parse_extension was
invoked (XNEW of ext_fset without corresponding XDELETE).
Introduction of arm_md_post_relax is necessary to only free the
extension feature bits after aeabi_set_attribute_string has been called
for the last time.

2017-06-21  Thomas Preud'homme  <thomas.preudhomme@arm.com>

gas/
	* config/tc-arm.c (dyn_mcpu_ext_opt): New static variable.
	(dyn_march_ext_opt): Likewise.
	(md_begin): Copy extension feature bits alongside architecture ones.
	Merge extensions feature bits in selected_cpu and cpu_variant if there
	is some.
	(arm_parse_extension): Pass architecture and extension feature bits in
	separate parameters, with architecture bits being read only.  Update
	**opt_p directly rather than *ext_set and initialize it if needed.
	(arm_parse_cpu): Stop merging architecture and extension feature bits
	and instead use mcpu_cpu_opt and dyn_mcpu_ext_opt to memorize them
	respectively.  Adapt to change in parameters of arm_parse_extension.
	(arm_parse_arch): Adapt to change in parameters of arm_parse_extension.
	(aeabi_set_attribute_string): Make function static.
	(arm_md_post_relax): New function.
	(s_arm_cpu): Stop merging architecture and extension feature bits and
	instead use mcpu_cpu_opt and dyn_mcpu_ext_opt to memorize them
	respectively.  Merge extension feature bits in cpu_variant
	if there is any.
	(s_arm_arch): Reset extension feature bit.  Set selected_cpu from
	*mcpu_cpu_opt and cpu_variant from selected_cpu and *mfpu_opt for
	consistency with s_arm_cpu.
	(s_arm_arch_extension): Update *dyn_mcpu_ext_opt rather than
	selected_cpu, allocating it before hand if needed.  Set selected_cpu
	from it and then cpu_variant.
	(s_arm_fpu): Merge *mcpu_ext_opt feature bits if any in cpu_variant.
	* config/tc-arm.h (md_post_relax_hook): Set to arm_md_post_relax.
	(aeabi_set_public_attributes): Delete external declaration.
	(arm_md_post_relax): Declare externally.
2017-06-21 14:11:14 +01:00
Alan Modra 91cb9803fc Allow target files access to default TC_FORCE_RELOCATION defines
* write.c (GENERIC_FORCE_RELOCATION_LOCAL): Define.
	(TC_FORCE_RELOCATION_LOCAL): Use it.
	(GENERIC_FORCE_RELOCATION_SUB_SAME): Define.
	(TC_FORCE_RELOCATION_SUB_SAME): Use it.
	* config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL,
	TC_FORCE_RELOCATION_SUB_SAME): Use GENERIC defines.
	* config/tc-aarch64.h: Similarly.
	* config/tc-avr.h: Similarly.
	* config/tc-cris.h: Similarly.
	* config/tc-i386.h: Similarly.
	* config/tc-i960.h: Similarly.
	* config/tc-ia64.h: Similarly.
	* config/tc-microblaze.h: Similarly.
	* config/tc-mips.h: Similarly.
	* config/tc-msp430.h: Similarly.
	* config/tc-nds32.h: Similarly.
	* config/tc-pru.h: Similarly.
	* config/tc-riscv.h: Similarly.
	* config/tc-rl78.h: Similarly.
	* config/tc-s390.h: Similarly.
	* config/tc-sh.h: Similarly.
	* config/tc-sh64.h: Similarly.
	* config/tc-sparc.h: Similarly.
	* config/tc-xtensa.h: Similarly.
	* config/tc-mn10300.h: Similarly.
	(GENERIC_FORCE_RELOCATION_LOCAL): Define.
	* config/tc-msp430.c (msp430_force_relocation_local): Modify to
	be addition to rather than replacement of standard
	TC_FORCE_RELOCATION_LOCAL.
2017-05-16 10:35:02 +09:30
Alan Modra 2571583aed Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
Nick Clifton 3930612461 Remove support for creating ARM NOREAD sections.
gas	* config/obj-elf.c (obj_elf_change_section): Remove support for
	ARM NOREAD sections.
	* config/tc-arm.c (arm_elf_section_letter): Delete.
	* config/tc-arm.h (md_elf_section_letter): Delete.
	* doc/c-arm.texi (ARM Section Attribute): Delete section.
	* testsuite/gas/arm/section-execute-only.d: Delete.
	* testsuite/gas/arm/section-execute-only.s: Delete.

ld	* testsuite/ld-arm/arm-elf.exp: Remove ARM NOREAD section tests.
	* testsuite/ld-arm/thumb1-input-section-flag-match.d: Delete.
	* testsuite/ld-arm/thumb1-input-section-flag-match.s: Delete.
	* testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.d: Delete.
	* testsuite/ld-arm/thumb1-noread-not-present-mixing-two-section.s: Delete.
	* testsuite/ld-arm/thumb1-noread-present-one-section.d: Delete.
	* testsuite/ld-arm/thumb1-noread-present-one-section.s: Delete.
	* testsuite/ld-arm/thumb1-noread-present-two-section.d: Delete.
	* testsuite/ld-arm/thumb1-noread-present-two-section.s: Delete.
2016-02-04 11:57:57 +00:00
Mickael Guene 91f68a68f9 Add support for an ARM specific 'y' section attribute flag to mark the section as NOREAD.
bfd/ChangeLog:
      * elf32-arm.c ((elf32_arm_special_sections): Remove catch of noread
      section using '.text.noread' pattern.

gas/ChangeLog:
      * config/obj-elf.c (obj_elf_change_section) : Allow arm section with
      SHF_ARM_NOREAD section flag.
      * config/tc-arm.h (md_elf_section_letter) : Implement this hook to
      handle letter 'y'.
     (arm_elf_section_letter) : Declare it.
      * config/tc-arm.c (arm_elf_section_letter): Handle letter 'y' to set
      SHF_ARM_NOREAD section flag.
      * doc/c-arm.texi (ARM section attribute 'y'): Document it.

gas/testsuite/ChangeLog:
      * gas/arm/section-execute-only.s: New test case.
      * gas/arm/section-execute-only.d: Expected output.

ld/testsuite/ChangeLog:
      * ld-arm/thumb1-noread-not-present-mixing-two-section.s: Add 'y'
      attribute usage.
      * ld-arm/thumb1-noread-present-one-section.s: Likewise.
      * ld-arm/thumb1-noread-present-two-section.s: Likewise.
      * ld-arm/thumb1-input-section-flag-match.s: Likewise.

binutils/ChangeLog:
      * readelf.c (get_elf_section_flags): Display y letter for section
      with SHF_ARM_NOREAD section flag in readelf section output.
      (process_section_headers): Add y letter in readelf section output
      key mapping for ARM architecture.
2016-01-20 12:53:50 +00:00
Alan Modra 6f2750feaf Copyright update for binutils 2016-01-01 23:00:01 +10:30
Nick Clifton f27c5390b2 Fix GAS testsuite failures for COFF/PE based ARM targets.
PR gas/19276
gas	* config/tc-arm.h (SUB_SEGMENT_ALIGN): Do not define for COFF/PE
	targets.

testsuite	* gas/arm/align64.d: Skip for COFF/PE targets.
	* gas/arm/bundle-lock.d: Adjust for COFF/PE targets.
2015-12-04 15:07:10 +00:00
Alan Modra 2e57ce7b14 More fallout from "Allow symbol and label names to be enclosed in double quotes"
Some of the TC_START_LABEL implementations need to adjust the end of
the symbol, when a colon doesn't mean a label definition.  That means
they need access to nul_char both the restore the NUL location (it may
be a quote rather than a colon) and to store the new nul_char.  Others
need adjusting to step over a potential trailing quote.

	PR gas/18581
	* config/tc-aarch64.h (TC_START_LABEL): Redefine.
	* config/tc-arm.c (tc_start_label_without_colon): Delete params.
	Use input_line_pointer directly.
	* config/tc-arm.h (TC_START_LABEL): Redefine.
	(TC_START_LABEL_WITHOUT_COLON): Redefine.
	(tc_start_label_without_colon): Update prototype.
	* config/tc-bfin.c (bfin_start_label): Delete ptr param.  Check
	for NUL instead.
	* config/tc-bfin.h (bfin_start_label): Update prototype.
	(TC_START_LABEL): Redefine.
	* config/tc-d30v.h (TC_START_LABEL): Redefine.
	* config/tc-fr30.c (restore_colon): Rewrite.
	(fr30_is_colon_insn): Add nul_char param.  Return int.  Bump
	i_l_p over quote.  Update restore_colon calls.
	* config/tc-fr30.h (TC_START_LABEL): Redefine.
	(fr30_is_colon_insn): Update prototype.
	* config/tc-m32c.c (restore_colon, m32c_is_colon_insn): As above.
	* config/tc-m32c.h (TC_START_LABEL): Redefine.
	(m32c_is_colon_insn): Update prototype.
	* config/tc-m32r.h (TC_START_LABEL): Redefine.
	* config/tc-mep.h (TC_START_LABEL): Redefine.
	* config/tc-nds32.h (TC_START_LABEL): Redefine.
	* config/tc-tic54x.c (tic54x_start_label): Replace params with
	nul_char and next_char.  Step over trailing quote.
	* config/tc-tic54x.h (TC_START_LABEL_WITHOUT_COLON): Redefine.
	(tic54x_start_label): Update prototype.
	* read.c (TC_START_LABEL): Redefine.  Update invocation.
	(TC_START_LABEL_WITHOUT_COLON): Update invocation.
	* config/tc-nios2.c (s_nios2_set): Save initial input_line_pointer
	and restore if calling s_set.  Don't restore delim again.
2015-08-27 23:19:59 +09:30
Alan Modra db2ed2e0b9 Rationalize ARM .align
* gas/config/tc-arm.c (s_align): Delete.
	(md_pseudo_table): Use s_align_ptwo for "align".
	* gas/config/tc-arm.h (TC_ALIGN_ZERO_IS_DEFAULT): Define.
	* read.c (s_align): Modify for TC_ALIGN_ZERO_IS_DEFAULT.
2015-08-17 09:05:54 +09:30
Nick Clifton ae8714c271 Change ARM symbol name verification code so that it only triggers when the form "name = val" is used.
PR gas/18347
	* config/tc-arm.h (TC_EQUAL_IN_INSN): Define.
	* config/tc-arm.c (arm_tc_equal_in_insn): New function.  Move
	the symbol name checking code to here from...
	(md_undefined_symbo): ... here.
2015-05-08 17:28:26 +01:00
Richard Earnshaw 7a5c933c7c [ARM]: Don't tail-pad over-aligned functions to the alignment boundary.
2015-04/24  Richard Earnshaw  <rearnsha@arm.com>

	gas/
	* config/tc-arm.h (arm_min): New function.
	(SUB_SEGMENT_ALIGN): Define.

	gas/testsuite/
	* gas/arm/align64.d: Delete trailing padding NOPs.

	ld/testsuite/
	* ld-arm/armthumb-lib.d: Regenerate expected output.
	* ld-arm/armthumb-lib.d: Likewise.
	* ld-arm/armthumb-lib.sym: Likewise.
	* ld-arm/cortex-a8-fix-b-rel-arm.d: Likewise.
	* ld-arm/cortex-a8-fix-b-rel-thumb.d: Likewise.
	* ld-arm/cortex-a8-fix-b.d: Likewise.
	* ld-arm/cortex-a8-fix-bcc-rel-thumb.d: Likewise.
	* ld-arm/cortex-a8-fix-bcc.d: Likewise.
	* ld-arm/cortex-a8-fix-bl-rel-arm.d: Likewise.
	* ld-arm/cortex-a8-fix-bl-rel-plt.d: Likewise.
	* ld-arm/cortex-a8-fix-bl-rel-thumb.d: Likewise.
	* ld-arm/cortex-a8-fix-bl.d: Likewise.
	* ld-arm/cortex-a8-fix-blx-bcond.d: Likewise.
	* ld-arm/cortex-a8-fix-blx-rel-arm.d: Likewise.
	* ld-arm/cortex-a8-fix-blx-rel-thumb.d: Likewise.
	* ld-arm/cortex-a8-fix-blx.d: Likewise.
	* ld-arm/cortex-a8-fix-hdr.d: Likewise.
	* ld-arm/farcall-mixed-app-v5.d: Likewise.
	* ld-arm/farcall-mixed-app.d: Likewise.
	* ld-arm/farcall-mixed-lib-v4t.d: Likewise.
	* ld-arm/farcall-mixed-lib.d: Likewise.
	* ld-arm/mixed-app-v5.d: Likewise.
	* ld-arm/mixed-app.d: Likewise.
	* ld-arm/mixed-lib.d: Likewise.
2015-04-24 15:54:39 +01:00
Nick Clifton 93ef582deb Fixes a problem generating relocs for thumb function calls to local symbols defined in other sections.
PR gas/17444
	* config/tc-arm.h (MD_APPLY_SYM_VALUE): Pass the current segment
	to arm_apply_sym_value.  Update prototype.
	* config/tc-arm.c (arm_apply_sym_value): Add segment argument.
	Do not apply the value if the symbol is in a different segment to
	the current segment.
2015-03-12 15:58:37 +00:00
Alan Modra b90efa5b79 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
Terry Guo 3cfdb7812c Calculate ARM arch attribute after relaxation
gas/
2014-11-21  Terry Guo  <terry.guo@arm.com>

	* config/tc-arm.c (md_assemble): Do not consider relaxation.
	(md_convert_frag): Test and set target arch attribute accordingly.
	(aeabi_set_attribute_string): Turn it into a global function.
	* config/tc-arm.h (md_post_relax_hook): Enable it for ARM target.
	(aeabi_set_public_attributes): Declare it.

gas/testsuite/
2014-11-21  Terry Guo  <terry.guo@arm.com>

	* gas/arm/attr-arch-assumption.d: New file.
	* gas/arm/attr-arch-assumption.s: Likewise.

ld/testsuite/
2014-11-21  Terry Guo  <terry.guo@arm.com>

	* ld-arm/tls-longplt-lib.s: Require ARMv6T2.
	* ld-arm/tls-longplt.s: Likewise.
	* ld-arm/tls-longplt-lib.d: Updated.
	* ld-arm/tls-longplt.d: Likewise.
2014-11-21 11:54:39 +08:00
Alan Modra 62ebcb5cbe gas TC_PARSE_CONS_EXPRESSION communication with TC_CONS_FIX_NEW
A number of targets pass extra information from TC_PARSE_CONS_EXPRESSION
to TC_CONS_FIX_NEW via static variables.  That's OK, but not best
practice.  tc-ppc.c goes further in implementing its own replacement
for cons(), because the generic one doesn't allow relocation modifiers
on constants.  This patch fixes both of these warts.

	* gas/config/tc-alpha.h (TC_CONS_FIX_NEW): Add RELOC parameter.
	* gas/config/tc-arc.c (arc_cons_fix_new): Add reloc parameter.
	* gas/config/tc-arc.h (arc_cons_fix_new): Update prototype.
	(TC_CONS_FIX_NEW): Add RELOC parameter.
	* gas/config/tc-arm.c (cons_fix_new_arm): Similarly
	* gas/config/tc-arm.h (cons_fix_new_arm, TC_CONS_FIX_NEW): Similarly.
	* gas/config/tc-cr16.c (cr16_cons_fix_new): Similarly.
	* gas/config/tc-cr16.h (cr16_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
	* gas/config/tc-crx.h (TC_CONS_FIX_NEW): Similarly.
	* gas/config/tc-m32c.c (m32c_cons_fix_new): Similarly.
	* gas/config/tc-m32c.h (m32c_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
	* gas/config/tc-mn10300.c (mn10300_cons_fix_new): Similarly.
	* gas/config/tc-mn10300.h (mn10300_cons_fix_new, TC_CONS_FIX_NEW):
	Similarly.
	* gas/config/tc-ns32k.c (cons_fix_new_ns32k): Similarly.
	* gas/config/tc-ns32k.h (cons_fix_new_ns32k): Similarly.
	* gas/config/tc-pj.c (pj_cons_fix_new_pj): Similarly.
	* gas/config/tc-pj.h (pj_cons_fix_new_pj, TC_CONS_FIX_NEW): Similarly.
	* gas/config/tc-rx.c (rx_cons_fix_new): Similarly.
	* gas/config/tc-rx.h (rx_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
	* gas/config/tc-sh.c (sh_cons_fix_new): Similarly.
	* gas/config/tc-sh.h (sh_cons_fix_new, TC_CONS_FIX_NEW): Similarly.
	* gas/config/tc-tic54x.c (tic54x_cons_fix_new): Similarly.
	* gas/config/tc-tic54x.h (tic54x_cons_fix_new, TC_CONS_FIX_NEW):
	Similarly.
	* gas/config/tc-tic6x.c (tic6x_cons_fix_new): Similarly.
	* gas/config/tc-tic6x.h (tic6x_cons_fix_new, TC_CONS_FIX_NEW):
	Similarly.
	* gas/config/tc-arc.c (arc_parse_cons_expression): Return reloc.
	* gas/config/tc-arc.h (arc_parse_cons_expression): Update proto.
	* gas/config/tc-avr.c (exp_mod_data): Make global.
	(pexp_mod_data): Delete.
	(avr_parse_cons_expression): Return exp_mod_data pointer.
	(avr_cons_fix_new): Add exp_mod_data_t pointer param.
	(exp_mod_data_t): Move typedef..
	* gas/config/tc-avr.h: ..to here.
	(exp_mod_data): Declare.
	(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
	(avr_parse_cons_expression, avr_cons_fix_new): Update prototype.
	(TC_CONS_FIX_NEW): Update.
	* gas/config/tc-hppa.c (hppa_field_selector): Delete static var.
	(cons_fix_new_hppa): Add hppa_field_selector param.
	(fix_new_hppa): Adjust.
	(parse_cons_expression_hppa): Return field selector.
	* gas/config/tc-hppa.h (parse_cons_expression_hppa): Update proto.
	(cons_fix_new_hppa): Likewise.
	(TC_PARSE_CONS_RETURN_TYPE, TC_PARSE_CONS_RETURN_NONE): Define.
	* gas/config/tc-i386.c (got_reloc): Delete static var.
	(x86_cons_fix_new): Add reloc param.
	(x86_cons): Return got reloc.
	* gas/config/tc-i386.h (x86_cons, x86_cons_fix_new): Update proto.
	(TC_CONS_FIX_NEW): Add RELOC param.
	* gas/config/tc-ia64.c (ia64_cons_fix_new): Add reloc param.  Adjust
	calls.
	* gas/config/tc-ia64.h (ia64_cons_fix_new): Update prototype.
	(TC_CONS_FIX_NEW): Add reloc param.
	* gas/config/tc-microblaze.c (parse_cons_expression_microblaze):
	Return reloc.
	(cons_fix_new_microblaze): Add reloc param.
	* gas/config/tc-microblaze.h: Formatting.
	(parse_cons_expression_microblaze): Update proto.
	(cons_fix_new_microblaze): Likewise.
	* gas/config/tc-nios2.c (nios2_tls_ldo_reloc): Delete static var.
	(nios2_cons): Return ldo reloc.
	(nios2_cons_fix_new): Delete.
	* gas/config/tc-nios2.h (nios2_cons): Update prototype.
	(nios2_cons_fix_new, TC_CONS_FIX_NEW): Delete.
	* gas/config/tc-ppc.c (md_pseudo_table): Remove quad, long, word,
	short.  Make llong use cons.
	(ppc_elf_suffix): Return BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
	(ppc_elf_cons): Delete.
	(ppc_elf_parse_cons): New function.
	(ppc_elf_validate_fix): Don't check for BFD_RELOC_UNUSED.
	(md_assemble): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
	* gas/config/tc-ppc.h (TC_PARSE_CONS_EXPRESSION): Define
	(ppc_elf_parse_cons): Declare.
	* gas/config/tc-sparc.c (sparc_cons_special_reloc): Delete static var.
	(sparc_cons): Return reloc specifier.
	(cons_fix_new_sparc): Add reloc specifier param.
	(sparc_cfi_emit_pcrel_expr): Use emit_expr_with_reloc.
	* gas/config/tc-sparc.h (TC_PARSE_CONS_RETURN_TYPE): Define.
	(TC_PARSE_CONS_RETURN_NONE): Define.
	(sparc_cons, cons_fix_new_sparc): Update prototype.
	* gas/config/tc-v850.c (hold_cons_reloc): Delete static var.
	(v850_reloc_prefix): Use BFD_RELOC_NONE rather than BFD_RELOC_UNUSED.
	(md_assemble): Likewise.
	(parse_cons_expression_v850): Return reloc.
	(cons_fix_new_v850): Add reloc parameter.
	* gas/config/tc-v850.h (parse_cons_expression_v850): Update proto.
	(cons_fix_new_v850): Likewise.
	* gas/config/tc-vax.c (vax_cons_special_reloc): Delete static var.
	(vax_cons): Return reloc.
	(vax_cons_fix_new): Add reloc parameter.
	* gas/config/tc-vax.h (vax_cons, vax_cons_fix_new): Update proto.
	* gas/config/tc-xstormy16.c (xstormy16_cons_fix_new): Add reloc param.
	* gas/config/tc-xstormy16.h (xstormy16_cons_fix_new): Update proto.
	* gas/dwarf2dbg.c (TC_PARSE_CONS_RETURN_NONE): Provide default.
	(emit_fixed_inc_line_addr): Adjust exmit_expr_fix calls.
	* gas/read.c (TC_PARSE_CONS_EXPRESSION): Return value.
	(do_parse_cons_expression): Adjust.
	(cons_worker): Pass return value from TC_PARSE_CONS_EXPRESSION
	to emit_expr_with_reloc.
	(emit_expr_with_reloc): New function handling reloc, mostly
	extracted from..
	(emit_expr): ..here.
	(emit_expr_fix): Add reloc param.  Adjust TC_CONS_FIX_NEW invocation.
	Handle reloc.
	(parse_mri_cons): Convert to ISO.
	* gas/read.h (TC_PARSE_CONS_RETURN_TYPE): Define.
	(TC_PARSE_CONS_RETURN_NONE): Define.
	(emit_expr_with_reloc): Declare.
	(emit_expr_fix): Update prototype.
	* gas/write.c (write_object_file): Update TC_CONS_FIX_NEW invocation.
2014-04-09 14:29:05 +09:30
Daniel Gutson 2e6976a881 Add support for ARM assembler produced by CodeCompositor Studio.
* config/tc-arm.c (codecomposer_syntax): New flag that states whether the
	CCS syntax compatibility mode is on or off.
	(asmfunc_states): New enum to represent the asmfunc directive state.
	(asmfunc_state): New variable holding the asmfunc directive state.
	(comment_chars): Rename to arm_comment_chars.
	(line_separator_chars): Rename to arm_line_separator_chars.
	(s_ccs_ref): New function that handles the .ref directive.
	(asmfunc_debug): New function.
	(s_ccs_asmfunc): New function that handles the .asmfunc directive.
	(s_ccs_endasmfunc): New function that handles the .endasmfunc directive.
	(s_ccs_def): New function that handles the .def directive.
	(tc_start_label_without_colon): New function.
	(md_pseudo_table): Added new CCS directives.
	(arm_ccs_mode): New function that handles the -mccs command line option.
	(arm_long_opts): Added new -mccs command line option.
	* config/tc-arm.h (LABELS_WITHOUT_COLONS): New macro.
	(TC_START_LABEL_WITHOUT_COLON): New macro.
	(tc_start_label_without_colon): Added extern function declaration.
	(tc_comment_chars): Define.
	(tc_line_separator_chars): Define.
	* app.c (do_scrub_begin): Use tc_line_separator_chars, if defined.
	* read.c (read_begin): Likewise.
	* doc/as.texinfo: Add documentation for the -mccs command line
	option.
	* doc/c-arm.texi: Likewise.
	* doc/internals.texi: Document tc_line_separator_chars.
	* NEWS: Mention the new feature.

	* gas/arm/ccs.s: New test case.
	* gas/arm/ccs.d: New expected disassembly.
2014-03-19 14:31:25 +00:00
Alan Modra 4b95cf5c0c Update copyright years 2014-03-05 22:16:15 +10:30
Roland McGrath bacebabc8e gas/
* config/tc-arm.c (arm_symbol_chars): New variable.
	* config/tc-arm.h (tc_symbol_chars): New macro, defined to that.

gas/testsuite/
	* gas/arm/macro-pld.s: New file.
	* gas/arm/macro-pld.d: New file.
2012-11-20 17:53:46 +00:00
Matthew Gretton-Dann 5a01bb1d0f * gas/config/tc-arm.c (do_t_it): Fully initialise now_it.
(new_automatic_it_block): Likewise.
	(handle_it_block): Record whether current instruction is
	conditionally executed.
	* gas/config/tc-arm.c (depr_insn_mask): New structure.
	(depr_it_insns): New variable.
	(it_fsm_post_encode): Warn on deprecated uses.
	* gas/config/tc-arm.h (current_it): Add new fields.
	* gas/testsuite/gas/arm/armv8-a-it-bad.d: New testcase.
	* gas/testsuite/gas/arm/armv8-a-it-bad.l: Likewise.
	* gas/testsuite/gas/arm/armv8-a-it-bad.s: Likewise.
	* gas/testsuite/gas/arm/ldr-t-bad.s: Update testcase.
	* gas/testsuite/gas/arm/ldr-t.d: Likewise.
	* gas/testsuite/gas/arm/ldr-t.s: Likewise.
	* gas/testsuite/gas/arm/neon-cond-bad-inc.s: Likewise.
	* gas/testsuite/gas/arm/sp-pc-validations-bad-t: Likewise.
	* gas/testsuite/gas/arm/vfp-fma-inc.s: Likewise.
	* gas/testsuite/gas/arm/vfp-neon-syntax-inc.s: Likewise.
2012-08-24 07:57:19 +00:00
Roland McGrath fa94de6b5c gas/
2012-03-12  Roland McGrath  <mcgrathr@google.com>

	* config/tc-arm.c (arm_frag_max_var): New function.
	* config/tc-arm.h: Declare it.
	(md_frag_max_var): New macro.

	* config/tc-i386.c (i386_frag_max_var): New function.
	* config/tc-i386.h: Declare it.
	(md_frag_max_var): New macro.

	* doc/as.texinfo (Bundle directives): New node.
	(Pseudo Ops): Add it to the menu.
	* NEWS: Mention new feature.
	* read.c [md_frag_max_var] (HANDLE_BUNDLE): New macro.
	[HANDLE_BUNDLE] (bundle_align_p2): New variable.
	[HANDLE_BUNDLE] (bundle_lock_frchain, bundle_lock_frag): New variables.
	[HANDLE_BUNDLE] (start_bundle, pending_bundle_size, finish_bundle):
	New functions.
	(assemble_one): New function if [HANDLE_BUNDLE], #define directly
	to md_assembly if not.
	(read_a_source_file): Call assemble_one in place of md_assemble.
	(read_a_source_file) [HANDLE_BUNDLE]: Check for unterminated
	.bundle_lock at end of processing.
	[HANDLE_BUNDLE] (s_bundle_align_mode, s_bundle_lock, s_bundle_unlock):
	New functions.
	[HANDLE_BUNDLE] (potable): Add their entries.
	* read.h: Declare new functions.

gas/testsuite/
2012-03-12  Roland McGrath  <mcgrathr@google.com>

	* gas/i386/bundle-bad.s: New file.
	* gas/i386/bundle-bad.d: New file.
	* gas/i386/bundle-bad.l: New file.
	* gas/i386/i386.exp: Run it.

	* gas/arm/bundle.s: New file.
	* gas/arm/bundle.d: New file.
	* gas/arm/bundle-lock.s: New file.
	* gas/arm/bundle-lock.d: New file.

	* gas/i386/bundle.s: New file.
	* gas/i386/bundle.d: New file.
	* gas/i386/x86-64-bundle.s: New file.
	* gas/i386/x86-64-bundle.d: New file.
	* gas/i386/bundle-lock.s: New file.
	* gas/i386/bundle-lock.d: New file.
	* gas/i386/i386.exp: Run them.
2012-03-13 16:59:57 +00:00
Nick Clifton 1bf10b0d9e * gas/config/tc-arm.h (DOUBLESLASH_LINE_COMMENTS): Define. 2012-02-21 16:55:31 +00:00
Paul Brook 6e7ce2cdd3 2011-05-31 Paul Brook <paul@codesourcery.com>
Nathan Sidwell  <nathan@codesourcery.com>

	gas/
	* config/tc-arm.c (fix_new_arm): Create an absolute symbol for
	pc-relative fixes to constants.
	* config/tc-arm.h (TC_FORCE_RELOCATATION_ABS): Define.

	ld/testsuite/
	* ld-arm/abs-call-1.d: New.
	* ld-arm/abs-call-1.s: New.
	* ld-arm/arm-elf.exp: Add it.
2011-05-31 13:40:04 +00:00
Nick Clifton 1fc5d88e4b * write.c (fixup_segment): Revert previous delta.
* config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Also force the
        generation of relocations for fixups against weak symbols.
2010-05-04 16:21:07 +00:00
Jie Zhang 5e8c8f8f89 * read.c (TC_START_LABEL): Add a new argument.
(read_a_source_file): Pass the beginning of the symbol through
	the new argument of TC_START_LABEL.
	* config/tc-arm.h (TC_START_LABEL): Add a new argument.
	* config/tc-bfin.c (bfin_start_label): Only search '(' and '['
	from the beginning of the symbol.
	* config/tc-bfin.h (TC_START_LABEL): Add the new argument.
	* config/tc-d30v.h (TC_START_LABEL): Likewise.
	* config/tc-fr30.h (TC_START_LABEL): Likewise.
	* config/tc-m32c.h (TC_START_LABEL): Likewise.
	* config/tc-m32r.h (TC_START_LABEL): Likewise.
	* config/tc-mep.h (TC_START_LABEL): Likewise.

	testsuite/
	* gas/bfin/stack2.s: Add pop multiple instruction with a label
	on the same line.
	* gas/bfin/stack2.d: Adjust accordingly.
2009-09-01 00:24:02 +00:00
Daniel Jacobowitz 940b5ce099 gas/
* config/tc-arm.c (marked_pr_dependency, mapstate): Delete global
	variables.
	(mapping_state): Use the section's mapstate.
	(mapping_state_2): Likewise.  Skip special sections.
	(s_arm_unwind_fnend): Use the section's marked_pr_dependency.
	(arm_elf_change_section): Do not set deleted globals.
	* config/tc-arm.h (struct arm_segment_info_type): Document
	marked_pr_dependency.

	gas/testsuite/
	* gas/arm/mapping2.s: Test code after .ident.
2009-08-07 19:30:31 +00:00
Daniel Jacobowitz cd000bffb2 binutils/testsuite/
* binutils-all/arm/thumb2-cond.s: Use instructions instead of
	.short.

	gas/
	* config/obj-elf.c (obj_elf_ident): Notify section change to the hook.
	* config/tc-arm.c (make_mapping_symbol): New function, from
	mapping_state.  Save mapping symbols in the frag.
	(insert_data_mapping_symbol): New.
	(mapping_state): Use make_mapping_symbol, improve state transitions.
	(mapping_state_2): New.  Provide dummy definition.
	(opcode_select): Do not call mapping_state.
	(s_bss): Call md_elf_section_change_hook instead of mapping_state.
	(output_inst): Update use of tc_frag_data.
	(new_automatic_it_block): Call mapping_state before emitting the
	IT instruction.
	(md_assemble): Move mapping_state to just before outputting the
	new instruction.
	(arm_handle_align): Update use of tc_frag_data.
	Call insert_data_mapping_symbol.
	(arm_init_frag): Update use of tc_frag_data.  Call
	mapping_state_2.
	(arm_elf_change_section): Always update the mapping symbol FSM state.
	(check_mapping_symbols): New function.
	(arm_adjust_symtab): Use check_mapping_symbols.
	* config/tc-arm.h (struct arm_frag_type): New.
	(TC_FRAG_TYPE): Change to struct arm_frag_type.
	(TC_FRAG_INIT): Pass max_chars.
	(arm_init_frag): Update prototype.

	gas/testsuite/
	* gas/arm/mapdir.d, gas/arm/mapdir.s: New files.
	* gas/arm/mapping.d: Adapted to new symbols generation.
	* gas/arm/mapping2.d: New test case.
	* gas/arm/mapping2.s: New file.
	* gas/arm/mapping3.d: New test case.
	* gas/arm/mapping3.s: New file.
	* gas/arm/mapping4.d: New test case.
	* gas/arm/mapping4.s: New file.
	* gas/arm/mapshort-eabi.d: Adapted to new symbols generation.
	* gas/elf/section2.e-armeabi: Adapted to new symbols generation.
2009-07-31 18:14:07 +00:00
Nick Clifton 140033b391 * config/tc-arm.h (MAX_MEM_ALIGNMENT_BYTES): Define.
(MAX_MEM_FOR_RS_ALIGN_CODE): Define in terms of
        MAX_MEM_ALIGNMENT_BYTES.
        * config/tc-arm.c (arm_frag_align_code): Replace hard coded
        constant with MAX_MEM_FOR_RS_ALIGN_CODE.

        * gas/arm/align64.s: New test case.
        * gas/arm/align64.d: Expected disassembly.
2009-07-14 15:47:13 +00:00
Nick Clifton 63b33ceb0b PR 10387
* config/tc-arm.h (THUMB_IS_FUNC): Handle a NULL pointer.
        (ARM_IS_FUNC): Likewise.
2009-07-14 15:38:20 +00:00
Nick Clifton e07e6e58be * config/tc-arm.c (implicit_it_mode): New enum.
(implicit_it_mode): New global.
        (it_instruction_type): New enum.
        (arm_parse_it_mode): New function.
        (arm_long_opts): New option added.
        (arm_it): New field.
        (it_state): New enum.
        (now_it): New macro.
        (check_it_blocks_finished): New function.
        (insns[]): Use the IT Thumb opcodes for ARM too.
        (arm_cleanup): Call check_it_blocks_finished.
        (now_it_compatible): New function.
        (conditional_insn): New function.
        (set_it_insn_type): New macro.
        (set_it_insn_type_last): New macro.
        (do_it): Call automatic IT machinery functions.
        (do_t_add_sub): Likewise
        (do_t_arit3): Likewise.
        (do_t_arit3c): Likewise.
        (do_t_blx): Likewise.
        (do_t_branch): Likewise.
        (do_t_bkpt): Likewise.
        (do_t_branch23): Likewise.
        (do_t_bx): Likewise.
        (do_t_bxj): Likewise.
        (do_t_cps): Likewise.
        (do_t_cpsi): Likewise.
        (do_t_cbz): Likewise.
        (do_t_it): Likewise.
        (encode_thumb2_ldmstm): Likewise.
        (do_t_ldst): Likewise.
        (do_t_mov_cmp): Likewise.
        (do_t_mvn_tst): Likewise.
        (do_t_mul): Likewise.
        (do_t_neg): Likewise.
        (do_t_setend): Likewise.
        (do_t_shift): Likewise.
        (do_t_tb): Likewise.
        (output_it_inst): New function.
        (new_automatic_it_block): New function.
        (close_automatic_it_block): New function.
        (now_it_add_mask): New function.
        (it_fsm_pre_encode): New function.
        (handle_it_state): New function.
        (it_fsm_post_encode): New function.
        (force_automatic_it_block_close): New function.
        (in_it_block): New function.
        (md_assemble): Call automatic IT block machinery functions.
        (arm_frob_label): Likewise.
        (arm_opts): New element.
        * config/tc-arm.h (it_state): New enum.
        (current_it): New struct.
        (arm_segment_info_type): New member added.
        * doc/c-arm.texi: New option -mimplicit-it documented.

        * gas/arm/arm-it-auto.d: New test.
        * gas/arm/arm-it-auto.s: New file.
        * gas/arm/arm-it-auto-2.d: New test case.
        * gas/arm/arm-it-auto-2.s: New file.
        * gas/arm/arm-it-auto-3.d: New test case.
        * gas/arm/arm-it-auto-3.s: New file.
        * gas/arm/arm-it-bad.d: New test case.
        * gas/arm/arm-it-bad.l: New file.
        * gas/arm/arm-it-bad.s: New file.
        * gas/arm/arm-it-bad-2.d: New test case.
        * gas/arm/arm-it-bad-2.l: New file.
        * gas/arm/arm-it-bad-2.s: New file.
        * gas/arm/arm-it-bad-3.d: New test case.
        * gas/arm/arm-it-bad-3.l: New file.
        * gas/arm/arm-it-bad-3.s: New file.
        * gas/arm/thumb2_it_auto.d: New test.
        * gas/arm/thumb2_it_bad.l: Error message updated.
        * gas/arm/thumb2_it_bad_auto.d: New test.
        * gas/arm/thumb2_it.d: Comment added.
        * gas/arm/thumb2_it_bad.d: Comment added.
2009-06-22 14:40:28 +00:00
Ramana Radhakrishnan 267bf99505 Fix local branches for bl and blx. 2009-05-05 11:41:32 +00:00
Ramana Radhakrishnan 4343666d14 2009-04-01 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/tc-arm.c (arm_validate_fix): Define only for OBJ_COFF.
	(find_real_start): Likewise.
	* config/tc-arm.h (TC_VALIDATE_FIX): Likewise
2009-04-01 16:49:32 +00:00
Nick Clifton f31fef9800 * gas/arm/attr-syntax.d: Do not run for non-ELF based ARM targets.
* config/tc-arm.h (CONVERT_SYMBOLIC_ATTRIBUTE): Only define for
        ELF format ARM targets.
        * config/tc-arm.c (arm_convert_symbolic_attribute): Likewise.
2009-01-19 15:46:31 +00:00
Andrew Stubbs e04befd0f5 2009-01-16 Andrew Stubbs <ams@codesourcery.com>
Daniel Jacobowitz  <dan@codesourcery.com>

	gas/
	* config/tc-arm.c (arm_copy_symbol_attributes): New function.
	* config/tc-arm.h (arm_copy_symbol_attributes): New prototype.
	(CONVERT_SYMBOLIC_ATTRIBUTE): New define.
	* read.c (s_vendor_attribute): Add support for symbolic tag names.
	Improve string parser.
	* doc/c-arm.texi (ARM Machine Directives): Document
	.eabi_attribute symbolic tag names.

	gas/testsuite/
	* gas/arm/attr-syntax.d: New file.
	* gas/arm/attr-syntax.s: New file.
2009-01-16 10:26:49 +00:00
Nick Clifton ec2655a6a7 Switch to GPLv3 2007-07-03 11:01:12 +00:00
Daniel Jacobowitz 794ba86ab2 gas/
* config/tc-arm.c (arm_copy_symbol_attributes): New.
	* config/tc-arm.h (arm_copy_symbol_attributes): Declare.
	(TC_COPY_SYMBOL_ATTRIBUTES): Define.
	* gas/symbols.c (copy_symbol_attributes): Use
	TC_COPY_SYMBOL_ATTRIBUTES.

	gas/testsuite/
	* gas/arm/thumbver.d, gas/arm/thumbver.s: New test.
2007-03-15 12:11:50 +00:00
Alan Modra 20ee54e817 * write.h (struct fix <fx_pcrel_adjust, fx_size>): Move.
(struct fix <fx_plt>): Rename to tcbit2.
	* write.c (fix_new_internal): Adjust.
	(TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt.
	* config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
	* config/tc-cris.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
	* config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
	* config/tc-i960.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
	* config/tc-sh.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
	* config/tc-sh64.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
	* config/tc-sparc.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
	* config/tc-msp430.c (msp430_force_relocation_local): Likewise.
	* config/tc-ia64.c (emit_one_bundle): Don't set fx_plt.
	* config/tc-ia64.h (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt.
	Instead, compare fx_r_type.
	* config/tc-xtensa.c (xg_add_opcode_fix, md_apply_fix): Use
	fx_tcbit in place of fx_plt.
	* config/tc-xtensa.h (TC_FORCE_RELOCATION_LOCAL): Define.
	* doc/internals.texi (TC_FORCE_RELOCATION_LOCAL): Remove reference
	to fx_plt.
2007-02-01 14:12:20 +00:00
Paul Brook e1da3f5b96 2006-11-29 Paul Brook <paul@codesourcery.com>
gas/
	* config/tc-arm.c (arm_is_eabi): New function.
	* config/tc-arm.h (arm_is_eabi): New prototype.
	(THUMB_IS_FUNC): Use ELF function type for EABI objects.
	* doc/c-arm.texi (.thumb_func): Update documentation.
2006-11-29 17:53:39 +00:00
Daniel Jacobowitz e821645dee opcodes/
* arm-dis.c (last_is_thumb): Delete.
	(enum map_type, last_type): New.
	(print_insn_data): New.
	(get_sym_code_type): Take MAP_TYPE argument.  Check the type of
	the right symbol.  Handle $d.
	(print_insn): Check for mapping symbols even without a normal
	symbol.  Adjust searching.  If $d is found see how much data
	to print.  Handle data.
gas/
	* config/tc-arm.h (md_cons_align): Define.
	(mapping_state): New prototype.
	* config/tc-arm.c (mapping_state): Make global.
gas/testsuite/
	* gas/arm/arm7t.d, gas/arm/neon-ldst-rm.d, gas/arm/thumb2_pool.d,
	gas/arm/tls.d: Update for $d support.
	* gas/arm/mapshort.d, gas/arm/mapshort.s: New test.
	* gas/elf/section2.e-armeabi: Update.
	* gas/elf/section2.e-armelf: New file.
	* gas/elf/elf.exp: Use it.
ld/testsuite/
	* ld-arm/mixed-app.d, ld-arm/tls-app.d, ld-arm/tls-lib.d: Update
	for $d support.
2006-11-22 17:45:57 +00:00
Alan Modra 8d79fd448b PR gas/3165
* config/tc-mips.h (enum dwarf2_format): Forward declare.
	(DWARF2_CIE_DATA_ALIGNMENT): Wrap negative number in parens.
	* config/tc-alpha.h (DWARF2_CIE_DATA_ALIGNMENT): Likewise.
	* config/tc-arm.h (DWARF2_CIE_DATA_ALIGNMENT): Likewise.
2006-09-11 02:32:50 +00:00
Nick Clifton 7148cc28af bfd
* Makefile.am: Add rules to build pe-arm-wince.lo and pei-arm-wince.lo objects.
* Makefile.in: Regenerate.
* pe-arm-wince.c: New file.
* pei-arm-wince.c: New file.
* pei-arm.c: Remove ARM_WINCE block.
* pe-arm.c: Remove ARM_WINCE block. Rename
bfd_arm_pe_allocate_interworking_sections,
bfd_arm_pe_get_bfd_for_interworking, and
bfd_arm_pe_process_before_allocation to
bfd_armpe_allocate_interworking_sections,
bfd_armpe_get_bfd_for_interworking, and
bfd_armpe_process_before_allocation. Move them before including bfd.h.
* bfd.c: ARM wince bfd format names were renamed. Adjust.
* coff-arm.c [ARM_WINCE]: Adjust so Windows CE doesn't end up with unexpected/conflicting relocs.
* targets.c: The arm-wince-pe target got its own new vector.  Adjust.
* config.bfd: Likewise.
* configure.in: Likewise.
* configure: Regenerate.

binutils
* configure.in: Split arm-pe and arm-wince-pe. Build dlltool with -DDLLTOOL_ARM_WINCE for Windows CE case.
* configure: Regenerate.
* dlltool.c: Add support for arm-wince.

gas
* Makefile.am (TARG_ENV_HFILES): Add te-wince-pe.h.
* Makefile.in: Regenerate.
* config/tc-arm.h [TARGET_FORMAT]: ARM wince bfd names were  renamed. Adjust.

ld
* Makefile.am: Split arm-wince into its own emulation.
* Makefile.in: Regenerate.
* configure.tgt: Set targ_emul to arm_wince_pe for ARM Windows CE targets.
* pe-dll.c : Define PE_ARCH_arm_wince.
  (pe_detail_list): Add PE_ARCH_arm_wince case.
  (make_one): Handle PE_ARCH_arm_epoc and PE_ARCH_arm_wince cases.
* emulparams/arm_wince_pe.sh: New file.
* emultempl/pe.em: Handle new TARGET_IS_arm_wince_pe define.
  Remap bfd_arm_allocate_interworking_sections, bfd_arm_get_bfd_for_interworking and
  bfd_arm_process_before_allocation for arm-pe and arm-wince-pe targets too.
  (gld_${EMULATION_NAME}_recognized_file): Handle arm-wince and arm-epoc bfd format names.
2006-08-21 08:12:46 +00:00
Nick Clifton f0927246c4 * bfd.c (bfd_get_sign_extend_vma): Add cases for pe-arm-little and pei-arm-little.
* coff-arm.c (coff_arm_rtype_to_howto) [COFF_WITH_PE]: Handle ARM_SECREL.
  (coff_arm_reloc_type_lookup): Map BFD_RELOC_32_SECREL to  ARM_SECREL.
* pe-arm.c [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
* pei-arm.c [TARGET_UNDERSCORE]: Define for ARM_WINCE like in pe-arm.c.
  [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.

* config/tc-arm.c: Move "dwarf2dbg.h" inclusion out of OBJ_ELF only block.
  (pe_directive_secrel) [TE_PE]: New function.
  (md_pseudo_table) [!OBJ_ELF]: Handle 2byte, 4byte, 8byte, file, loc, loc_mark_labels.
  [TE_PE]: Handle secrel32.
  (output_relax_insn): Remove OBJ_ELF around dwarf2_emit_insn call.
  (output_inst): Remove OBJ_ELF around dwarf2_emit_insn call.
  (arm_frob_label): Remove OBJ_ELF around dwarf2_emit_label call.
  (md_section_align): Only round section sizes here for AOUT targets.
  (tc_arm_regname_to_dw2regnum): Move out for OBJ_ELF only block.
  (tc_pe_dwarf2_emit_offset): New function.
  (md_apply_fix) [TE_PE]: Handle BFD_RELOC_32_SECREL.
  (cons_fix_new_arm): Handle O_secrel.
* config/tc-arm.h : Move DWARF2_LINE_MIN_INSN_LENGTH, DWARF2_DEFAULT_RETURN_COLUMN and DWARF2_CIE_DATA_ALIGNMENT out of OBJ_ELF only block.
  [TE_PE]: Define O_secrel, TC_DWARF2_EMIT_OFFSET, and declare tc_pe_dwarf2_emit_offset.

* ld-pe/pe.exp: Enable tests on arm-wince-pe.
* ld-pe/secrel.d: Adjust test to work on arm-wince-pe too.
2006-08-06 15:04:23 +00:00