]> git.ipfire.org Git - thirdparty/gcc.git/commit
2016-07-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
authorthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Jul 2016 10:54:01 +0000 (10:54 +0000)
committerthopre01 <thopre01@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Jul 2016 10:54:01 +0000 (10:54 +0000)
commit417e5cc50224fe0899c8ed4e62026e57725ff23f
tree86e547979f660cedd32b2e1b5d3363a3017fdb8d
parent68a5143e6b87d9dc9f25b75c345d14f6c16057f9
2016-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * 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/
    * 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238288 138bc75d-0d04-0410-961f-82ee72b054a4
12 files changed:
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/config/arm/arm.h
gcc/config/arm/arm.md
gcc/config/arm/thumb1.md
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
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