Skip to content

Commit

Permalink
2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
Browse files Browse the repository at this point in the history
    gcc/
    PR target/80082
    * config/arm/arm-protos.h (FL_LPAE): Define macro.
    (FL_FOR_ARCH7VE): Add FL_LPAE.
    (arm_arch_lpae): Declare extern.
    * config/arm/arm.c (arm_arch_lpae): Declare.
    (arm_option_override): Define arm_arch_lpae.
    * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
    arm_arch_lpae.

    gcc/testsuite/
    PR target/80082
    * gcc.target/arm/atomic_loaddi_10.c: New testcase.
    * gcc.target/arm/atomic_loaddi_11.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@246734 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
thopre01 committed Apr 6, 2017
1 parent 4333487 commit af2d9b9
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 4 deletions.
11 changes: 11 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>

PR target/80082
* config/arm/arm-protos.h (FL_LPAE): Define macro.
(FL_FOR_ARCH7VE): Add FL_LPAE.
(arm_arch_lpae): Declare extern.
* config/arm/arm.c (arm_arch_lpae): Declare.
(arm_option_override): Define arm_arch_lpae.
* config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
arm_arch_lpae.

2017-04-03 Michael Meissner <meissner@linux.vnet.ibm.com>

Back port from the trunk
Expand Down
7 changes: 5 additions & 2 deletions gcc/config/arm/arm-protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ extern bool arm_is_constant_pool_ref (rtx);
#define FL_STRONG (1 << 8) /* StrongARM */
#define FL_ARCH5E (1 << 9) /* DSP extensions to v5 */
#define FL_XSCALE (1 << 10) /* XScale */
/* spare (1 << 11) */
#define FL_LPAE (1 << 11) /* ARMv7-A LPAE. */
#define FL_ARCH6 (1 << 12) /* Architecture rel 6. Adds
media instructions. */
#define FL_VFPV2 (1 << 13) /* Vector Floating Point V2. */
Expand Down Expand Up @@ -412,7 +412,7 @@ extern bool arm_is_constant_pool_ref (rtx);
#define FL_FOR_ARCH6M (FL_FOR_ARCH6 & ~FL_NOTM)
#define FL_FOR_ARCH7 ((FL_FOR_ARCH6T2 & ~FL_NOTM) | FL_ARCH7)
#define FL_FOR_ARCH7A (FL_FOR_ARCH7 | FL_NOTM | FL_ARCH6K)
#define FL_FOR_ARCH7VE (FL_FOR_ARCH7A | FL_THUMB_DIV | FL_ARM_DIV)
#define FL_FOR_ARCH7VE (FL_FOR_ARCH7A | FL_THUMB_DIV | FL_ARM_DIV | FL_LPAE)
#define FL_FOR_ARCH7R (FL_FOR_ARCH7A | FL_THUMB_DIV)
#define FL_FOR_ARCH7M (FL_FOR_ARCH7 | FL_THUMB_DIV)
#define FL_FOR_ARCH7EM (FL_FOR_ARCH7M | FL_ARCH7EM)
Expand Down Expand Up @@ -608,6 +608,9 @@ extern int arm_arch_thumb2;
extern int arm_arch_arm_hwdiv;
extern int arm_arch_thumb_hwdiv;

/* Nonzero if this chip supports the Large Physical Address Extension. */
extern int arm_arch_lpae;

/* Nonzero if chip disallows volatile memory access in IT block. */
extern int arm_arch_no_volatile_ce;

Expand Down
4 changes: 4 additions & 0 deletions gcc/config/arm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,9 @@ int arm_arch_thumb2;
int arm_arch_arm_hwdiv;
int arm_arch_thumb_hwdiv;

/* Nonzero if this chip supports the Large Physical Address Extension. */
int arm_arch_lpae;

/* Nonzero if chip disallows volatile memory access in IT block. */
int arm_arch_no_volatile_ce;

Expand Down Expand Up @@ -3181,6 +3184,7 @@ arm_option_override (void)
arm_arch_iwmmxt2 = ARM_FSET_HAS_CPU1 (insn_flags, FL_IWMMXT2);
arm_arch_thumb_hwdiv = ARM_FSET_HAS_CPU1 (insn_flags, FL_THUMB_DIV);
arm_arch_arm_hwdiv = ARM_FSET_HAS_CPU1 (insn_flags, FL_ARM_DIV);
arm_arch_lpae = ARM_FSET_HAS_CPU1 (insn_flags, FL_LPAE);
arm_arch_no_volatile_ce = ARM_FSET_HAS_CPU1 (insn_flags, FL_NO_VOLATILE_CE);
arm_tune_cortex_a9 = (arm_tune == cortexa9) != 0;
arm_arch_crc = ARM_FSET_HAS_CPU1 (insn_flags, FL_CRC32);
Expand Down
3 changes: 1 addition & 2 deletions gcc/config/arm/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ extern void (*arm_lang_output_object_attributes_hook)(void);
#define TARGET_HAVE_LDREX ((arm_arch6 && TARGET_ARM) || arm_arch7)

/* Nonzero if this chip supports LPAE. */
#define TARGET_HAVE_LPAE \
(arm_arch7 && ARM_FSET_HAS_CPU1 (insn_flags, FL_FOR_ARCH7VE))
#define TARGET_HAVE_LPAE (arm_arch_lpae)

/* Nonzero if this chip supports ldrex{bh} and strex{bh}. */
#define TARGET_HAVE_LDREXBH ((arm_arch6k && TARGET_ARM) || arm_arch7)
Expand Down
6 changes: 6 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>

PR target/80082
* gcc.target/arm/atomic_loaddi_10.c: New testcase.
* gcc.target/arm/atomic_loaddi_11.c: Likewise.

2017-04-03 Michael Meissner <meissner@linux.vnet.ibm.com>

Back port from the trunk
Expand Down
15 changes: 15 additions & 0 deletions gcc/testsuite/gcc.target/arm/atomic_loaddi_10.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v7ve_ok } */
/* { dg-options "-O2" } */
/* { dg-add-options arm_arch_v7ve } */

#include <stdatomic.h>

atomic_llong x = 0;

atomic_llong get_x()
{
return atomic_load(&x);
}

/* { dg-final { scan-assembler "ldrd" } } */
15 changes: 15 additions & 0 deletions gcc/testsuite/gcc.target/arm/atomic_loaddi_11.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_arch_v7r_ok } */
/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" "-march=*" } { "-mcpu=cortex-r5" } } */
/* { dg-options "-O2 -mcpu=cortex-r5" } */

#include <stdatomic.h>

atomic_llong x = 0;

atomic_llong get_x()
{
return atomic_load(&x);
}

/* { dg-final { scan-assembler-not "ldrd" } } */

0 comments on commit af2d9b9

Please sign in to comment.