gcc/
authorYvan Roux <yvan.roux@linaro.org>
Thu, 15 Sep 2016 14:49:17 +0000 (16:49 +0200)
committerYvan Roux <yvan.roux@linaro.org>
Fri, 14 Oct 2016 08:40:20 +0000 (08:40 +0000)
commitd108caf329fb0c7bda126a554c0506c2c5ba25ad
treeaca0659171f76a7516cf3d97fc040b23c2161cd4
parent8e9fa4abbc687110c6c205e5e1466f15bf6809d9
gcc/
Backport from trunk r238079.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/elf.h: Use __ARM_ARCH_ISA_THUMB and __ARM_ARCH_ISA_ARM to
decide whether to prevent some libgcc routines being included for some
multilibs rather than __ARM_ARCH_6M__ and add comment to indicate the
link between this condition and the one in
libgcc/config/arm/lib1func.S.

gcc/testsuite/
Backport from trunk r238079.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* lib/target-supports.exp (check_effective_target_arm_cortex_m): Use
__ARM_ARCH_ISA_ARM to test for Cortex-M devices.

libgcc/
Backport from trunk r238079.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/bpabi-v6m.S: Clarify what architectures is the
implementation suitable for.
* config/arm/lib1funcs.S (__prefer_thumb__): Define among other cases
for all Thumb-1 only targets.
(NOT_ISA_TARGET_32BIT): Define for Thumb-1 only targets.
(THUMB_LDIV0): Test for NOT_ISA_TARGET_32BIT rather than
__ARM_ARCH_6M__.
(EQUIV): Likewise.
(ARM_FUNC_ALIAS): Likewise.
(umodsi3): Add check to __ARM_ARCH_ISA_THUMB != 1 to guard the idiv
version.
(modsi3): Likewise.
(clzsi2): Test for NOT_ISA_TARGET_32BIT rather than __ARM_ARCH_6M__.
(clzdi2): Likewise.
(ctzsi2): Likewise.
(L_interwork_call_via_rX): Test for __ARM_ARCH_ISA_ARM rather than
__ARM_ARCH_6M__ in guard for checking whether it is defined.
(final includes): Test for NOT_ISA_TARGET_32BIT rather than
__ARM_ARCH_6M__ and add comment to indicate the connection between
this condition and the one in gcc/config/arm/elf.h.
* config/arm/libunwind.S: Test for __ARM_ARCH_ISA_THUMB and
__ARM_ARCH_ISA_ARM rather than __ARM_ARCH_6M__.
* config/arm/t-softfp: Likewise.

libgcc/
Backport from trunk r238080.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/lib1funcs.S (HAVE_ARM_CLZ): Define for ARMv6* or later
and ARMv5t* rather than for a fixed list of architectures.

gcc/
Backport from trunk r238081.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/arm-arches.def (armv8-m.base): Define new architecture.
(armv8-m.main): Likewise.
(armv8-m.main+dsp): Likewise.
* config/arm/arm-protos.h (FL_FOR_ARCH8M_BASE): Define.
(FL_FOR_ARCH8M_MAIN): Likewise.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/bpabi.h: Add armv8-m.base, armv8-m.main and
armv8-m.main+dsp to BE8_LINK_SPEC.
* config/arm/arm.h (TARGET_HAVE_LDACQ): Exclude ARMv8-M.
(enum base_architecture): Add BASE_ARCH_8M_BASE and BASE_ARCH_8M_MAIN.
* config/arm/arm.c (arm_arch_name): Increase size to work with ARMv8-M
Baseline and Mainline.
(arm_option_override_internal): Also disable arm_restrict_it when
!arm_arch_notm.  Update comment for -munaligned-access to also cover
ARMv8-M Baseline.
(arm_file_start): Increase buffer size for printing architecture name.
* doc/invoke.texi: Document architectures armv8-m.base, armv8-m.main
and armv8-m.main+dsp.
(mno-unaligned-access): Clarify that this is disabled by default for
ARMv8-M Baseline architectures as well.

gcc/testsuite/
Backport from trunk r238081.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* lib/target-supports.exp: Generate add_options_for_arm_arch_FUNC and
check_effective_target_arm_arch_FUNC_multilib for ARMv8-M Baseline and
ARMv8-M Mainline architectures.

libgcc/
Backport from trunk r238081.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/lib1funcs.S (__ARM_ARCH__): Define to 8 for ARMv8-M.

gcc/
Backport from trunk r238082.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/arm-protos.h: Reindent FL_FOR_* macro definitions.

gcc/
Backport from trunk r238083.
2016-07-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/arm.h (TARGET_USE_MOVT): Check MOVT/MOVW availability
with TARGET_HAVE_MOVT.
(TARGET_HAVE_MOVT): Define.
* config/arm/arm.c (const_ok_for_op): Check MOVT/MOVW
availability with TARGET_HAVE_MOVT.
* config/arm/arm.md (arm_movt): Use TARGET_HAVE_MOVT to check MOVT
availability.
(addsi splitter): Use TARGET_THUMB && TARGET_HAVE_MOVT rather than
TARGET_THUMB2.
(symbol_refs movsi splitter): Remove TARGET_32BIT check.
(arm_movtas_ze): Use TARGET_HAVE_MOVT to check MOVT availability.
* config/arm/constraints.md (define_constraint "j"): Use
TARGET_HAVE_MOVT to check MOVT availability.

gcc/
Backport from trunk r238288.
2016-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/arm.h (TARGET_HAVE_MOVT): Include ARMv8-M as having MOVT.
* config/arm/arm.c (arm_arch_name): (const_ok_for_op): Check MOVT/MOVW
availability with TARGET_HAVE_MOVT.
(thumb_legitimate_constant_p): Strip the high part of a label_ref.
(thumb1_rtx_costs): Also return 0 if setting a half word constant and
MOVW is available and replace (unsigned HOST_WIDE_INT) INTVAL by
UINTVAL.
(thumb1_size_rtx_costs): Make set of half word constant also cost 1
extra instruction if MOVW is available.  Use a cost variable
incremented by COSTS_N_INSNS (1) when the condition match rather than
returning an arithmetic expression based on COSTS_N_INSNS.  Make
constant with bottom half word zero cost 2 instruction if MOVW is
available.
* config/arm/arm.md (define_attr "arch"): Add v8mb.
(define_attr "arch_enabled"): Set to yes if arch value is v8mb and
target is ARMv8-M Baseline.
(arm_movt): New unpredicable alternative for ARMv8-M Baseline.
(arm_movtas_ze): Likewise.
* config/arm/thumb1.md (thumb1_movdi_insn): Add ARMv8-M Baseline only
alternative for constants satisfying j constraint.
(thumb1_movsi_insn): Likewise.
(movsi splitter for K alternative): Tighten condition to not trigger
if movt is available and j constraint is satisfied.
(Pe immediate splitter): Likewise.
(thumb1_movhi_insn): Add ARMv8-M Baseline only alternative for
constant fitting in an halfword to use MOVW.
* doc/sourcebuild.texi (arm_thumb1_movt_ok): Document new ARM
effective target.

gcc/testsuite/
Backport from trunk r238288.
2016-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* lib/target-supports.exp (check_effective_target_arm_thumb1_movt_ok):
Define effective target.
* gcc.target/arm/pr42574.c: Require arm_thumb1_ok and
!arm_thumb1_movt_ok to exclude ARMv8-M Baseline.
* gcc.target/arm/movhi_movw.c: New test.
* gcc.target/arm/movsi_movw.c: Likewise.
* gcc.target/arm/movdi_movw.c: Likewise.

gcc/
Backport from trunk r238289.
2016-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/arm.h (TARGET_HAVE_CBZ): Define.
(TARGET_IDIV): Set for all Thumb targets provided they have hardware
divide feature.
* config/arm/arm.md (divsi3): New unpredicable alternative for ARMv8-M
Baseline.  Make initial alternative TARGET_32BIT only.
(udivsi3): Likewise.
* config/arm/thumb1.md (thumb1_cbz): New define_insn.
* doc/sourcebuild.texi (arm_thumb1_cbz_ok): Document new effective
target.

gcc/testsuite/
Backport from trunk r238289.
2016-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* lib/target-supports.exp (check_effective_target_arm_thumb1_cbz_ok):
Add new arm_thumb1_cbz_ok effective target.
* gcc.target/arm/cbz.c: New test.

gcc/testsuite/
Backport from trunk r238331.
2016-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* gcc.target/arm/pr42574.c: Add missing target keyword for the dg-do
selector and enclose boolean expression in curly braces.

gcc/
Backport from trunk r238348.
2016-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* config/arm/arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M Mainline.
(TARGET_HAVE_LDACQD): New macro.
* config/arm/sync.md (atomic_loaddi): Use TARGET_HAVE_LDACQD rather
than TARGET_HAVE_LDACQ.
(arm_load_acquire_exclusivedi): Likewise.
(arm_store_release_exclusivedi): Likewise.

gcc/testsuite/
Backport from trunk r238348.
2016-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* gcc.target/arm/atomic-comp-swap-release-acquire.c: Rename into ...
* gcc.target/arm/atomic-comp-swap-release-acquire-1.c: This.
* gcc.target/arm/atomic-op-acq_rel.c: Rename into ...
* gcc.target/arm/atomic-op-acq_rel-1.c: This.
* gcc.target/arm/atomic-op-acquire.c: Rename into ...
* gcc.target/arm/atomic-op-acquire-1.c: This.
* gcc.target/arm/atomic-op-char.c: Rename into ...
* gcc.target/arm/atomic-op-char-1.c: This.
* gcc.target/arm/atomic-op-consume.c: Rename into ...
* gcc.target/arm/atomic-op-consume-1.c: This.
* gcc.target/arm/atomic-op-int.c: Rename into ...
* gcc.target/arm/atomic-op-int-1.c: This.
* gcc.target/arm/atomic-op-relaxed.c: Rename into ...
* gcc.target/arm/atomic-op-relaxed-1.c: This.
* gcc.target/arm/atomic-op-release.c: Rename into ...
* gcc.target/arm/atomic-op-release-1.c: This.
* gcc.target/arm/atomic-op-seq_cst.c: Rename into ...
* gcc.target/arm/atomic-op-seq_cst-1.c: This.
* gcc.target/arm/atomic-op-short.c: Rename into ...
* gcc.target/arm/atomic-op-short-1.c: This.
* gcc.target/arm/atomic-comp-swap-release-acquire-2.c: New test.
* gcc.target/arm/atomic-op-acq_rel-2.c: Likewise.
* gcc.target/arm/atomic-op-acquire-2.c: Likewise.
* gcc.target/arm/atomic-op-char-2.c: Likewise.
* gcc.target/arm/atomic-op-consume-2.c: Likewise.
* gcc.target/arm/atomic-op-int-2.c: Likewise.
* gcc.target/arm/atomic-op-relaxed-2.c: Likewise.
* gcc.target/arm/atomic-op-release-2.c: Likewise.
* gcc.target/arm/atomic-op-seq_cst-2.c: Likewise.
* gcc.target/arm/atomic-op-short-2.c: Likewise.

gcc/
Backport from trunk r239888.
2016-08-31  Eric Botcazou  <ebotcazou@adacore.com>

* config/arm/arm.c (thumb1_size_rtx_costs) <SET>: Add missing guard.

gcc/testsuite/
Backport from trunk r241086.
2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* gcc.target/arm/movhi_movw.c: Enable test for ARM mode.
* gcc.target/arm/movsi_movw.c: Likewise.
* gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler
directive to work on big endian targets.

Change-Id: I9fea67c44aa10d639644c90a4b436d4f809da9fc
43 files changed:
gcc/config/arm/arm-arches.def
gcc/config/arm/arm-protos.h
gcc/config/arm/arm-tables.opt
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/arm/arm.md
gcc/config/arm/bpabi.h
gcc/config/arm/constraints.md
gcc/config/arm/elf.h
gcc/config/arm/sync.md
gcc/config/arm/thumb1.md
gcc/doc/invoke.texi
gcc/doc/sourcebuild.texi
gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-acq_rel-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-acquire-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-acquire.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-acquire-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-char-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-char.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-char-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-consume-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-consume.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-consume-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-int-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-int.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-int-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-relaxed-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-relaxed-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-release-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-release.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-release-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-seq_cst-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/atomic-op-short-1.c [moved from gcc/testsuite/gcc.target/arm/atomic-op-short.c with 100% similarity]
gcc/testsuite/gcc.target/arm/atomic-op-short-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/cbz.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/movdi_movw.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/movhi_movw.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/movsi_movw.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/pr42574.c
gcc/testsuite/lib/target-supports.exp
libgcc/config/arm/bpabi-v6m.S
libgcc/config/arm/lib1funcs.S
libgcc/config/arm/libunwind.S
libgcc/config/arm/t-softfp