Go to file
Matthew Malcomson 3c5af60836 [AARCH64] Use STLUR for atomic_store
Use the STLUR instruction introduced in Armv8.4-a.
This instruction has the store-release semantic like STLR but can take a
9-bit unscaled signed immediate offset.

Example test case:
```
void
foo ()
{
    int32_t *atomic_vals = calloc (4, sizeof (int32_t));
    atomic_store_explicit (atomic_vals + 1, 2, memory_order_release);
}
```

Before patch generates
```
foo:
	stp	x29, x30, [sp, -16]!
	mov	x1, 4
	mov	x0, x1
	mov	x29, sp
	bl	calloc
	mov	w1, 2
	add	x0, x0, 4
	stlr	w1, [x0]
	ldp	x29, x30, [sp], 16
	ret
```

After patch generates
```
foo:
	stp	x29, x30, [sp, -16]!
	mov	x1, 4
	mov	x0, x1
	mov	x29, sp
	bl	calloc
	mov	w1, 2
	stlur	w1, [x0, 4]
	ldp	x29, x30, [sp], 16
	ret
```

We introduce a new feature flag to indicate the presence of this instruction.
The feature flag is called AARCH64_ISA_RCPC8_4 and is included when targeting
armv8.4 architecture.

We also introduce an "arch" attribute to be checked called "rcpc8_4" after this
feature flag.

gcc/

2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>

	* config/aarch64/aarch64-protos.h
	(aarch64_offset_9bit_signed_unscaled_p): New declaration.
	* config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
	(arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
	* config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
	(AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
	(AARCH64_FL_PROFILE): Move index so flags are ordered.
	(AARCH64_ISA_RCPC8_4): New flag.
	* config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
	to aarch64_offset_9bit_signed_unscaled_p.
	* config/aarch64/atomics.md (atomic_store<mode>): Allow offset
	and use stlur.
	* config/aarch64/constraints.md (Ust): New constraint.
	* config/aarch64/predicates.md.
	(aarch64_9bit_offset_memory_operand): New predicate.
	(aarch64_rcpc_memory_operand): New predicate.

gcc/testsuite/

2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>

	* gcc.target/aarch64/atomic-store.c: New.

From-SVN: r264421
2018-09-19 10:24:59 +00:00
config Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
contrib Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
fixincludes fixincludes: vxworks: remove unnecessary parentheses in ioctl wrapper macro 2018-09-03 13:26:45 +00:00
gcc [AARCH64] Use STLUR for atomic_store 2018-09-19 10:24:59 +00:00
gnattools
gotools
include Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
INSTALL
intl libgnuintl.h (_INTL_MAY_RETURN_STRING_ARG, [...]): Backport changes from upstream gettext. 2018-09-18 22:08:49 -06:00
libada Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libatomic Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libbacktrace Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libcc1
libcpp Add range_idx param to range_label::get_text 2018-09-17 23:32:12 +00:00
libdecnumber Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libffi Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libgcc Use v2 map syntax in libgcc-unwind.map if Solaris ld supports it 2018-09-18 07:04:15 +00:00
libgfortran re PR fortran/37802 (Improve wording for matmul bound checking) 2018-09-16 19:37:44 +00:00
libgo cmd/go: correct gccgo buildid file on ARM 2018-09-14 19:42:01 +00:00
libgomp [nvptx] Remove use of CUDA unified memory in libgomp 2018-09-18 08:41:54 -07:00
libhsail-rt
libiberty Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libitm Remove nfs bogon 2018-08-03 14:53:48 -06:00
libobjc Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
liboffloadmic
libquadmath
libsanitizer Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libssp Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
libstdc++-v3 re PR libstdc++/87135 ([C++17] unordered containers violate iterator validity requirements) 2018-09-18 20:36:16 +00:00
libvtv Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
lto-plugin Replace 8 spaces with a tabular in ChangeLog files. 2018-08-27 14:04:23 +00:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog Add self to maintainers list. 2018-09-13 16:11:29 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub Update config.sub 2018-07-06 06:22:08 +00:00
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS Add self to maintainers list. 2018-09-13 16:11:29 +00:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.