Go to file
Kito Cheng aa827fa170 [PR/target 100316] Allow constant address for __builtin___clear_cache.
__builtin___clear_cache was able to accept constant address for the
argument, but it seems no longer accept recently, and it even not
accept constant address which is hold in variable when optimization is
enable:

```
void foo3(){
  void *yy = (void*)0x1000;
  __builtin___clear_cache(yy, yy);
}
```

So this patch make BEGIN and END accept VOIDmode, like cselib_lookup_mem did per
Jim Wilson's suggestion.

```
static cselib_val *
cselib_lookup_mem (rtx x, int create)
{
  ...
  addr_mode = GET_MODE (XEXP (x, 0));
  if (addr_mode == VOIDmode)
    addr_mode = Pmode;
```

Changes v2 -> v3:
- Use gcc_assert rather than error, maybe_emit_call_builtin___clear_cache is
internal use only, and we already checked the type in other place.

Changes v1 -> v2:
- Check is CONST_INT intead of cehck mode, no new testcase, since
  constant value with other type like CONST_DOUBLE will catched by
  front-end.
e.g.
Code:
```c
void foo(){
  __builtin___clear_cache(1.11, 0);
}
```
Error message:
```
clearcache-double.c: In function 'foo':
clearcache-double.c:2:27: error: incompatible type for argument 1 of '__builtin___clear_cache'
    2 |   __builtin___clear_cache(1.11, 0);
      |                           ^~~~
      |                           |
      |                           double
clearcache-double.c:2:27: note: expected 'void *' but argument is of type 'double'
```

gcc/ChangeLog:

	PR target/100316
	* builtins.c (maybe_emit_call_builtin___clear_cache): Allow
	CONST_INT for BEGIN and END, and use gcc_assert rather than
	error.

gcc/testsuite/ChangeLog:

	PR target/100316
	* gcc.c-torture/compile/pr100316.c: New.

(cherry picked from commit 4e5bc4e450)
2021-10-19 00:04:57 +08:00
c++tools Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
config Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
contrib Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
fixincludes Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
gcc [PR/target 100316] Allow constant address for __builtin___clear_cache. 2021-10-19 00:04:57 +08:00
gnattools Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
gotools Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
include Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
INSTALL
intl Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libada Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libatomic Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libbacktrace Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libcc1 Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libcody Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libcpp Daily bump. 2021-08-17 00:18:10 +00:00
libdecnumber Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libffi Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libgcc Daily bump. 2021-09-01 00:18:36 +00:00
libgfortran Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libgo libgo: update to Go1.16.5 release 2021-06-10 14:42:37 -07:00
libgomp openmp: Fix up handling of OMP_PLACES=threads(1) 2021-10-18 17:40:22 +02:00
libhsail-rt Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libiberty Daily bump. 2021-10-02 00:18:01 +00:00
libitm Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libobjc Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
liboffloadmic Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libphobos Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libquadmath Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libsanitizer Daily bump. 2021-08-13 00:18:24 +00:00
libssp Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
libstdc++-v3 Daily bump. 2021-10-15 00:18:36 +00:00
libvtv Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
lto-plugin Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
maintainer-scripts Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
zlib Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Update ChangeLog and version files for release 2021-07-28 06:55:28 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess config.sub, config.guess : Import upstream 2021-01-25. 2021-02-23 17:21:10 +08:00
config.rpath
config.sub config.sub, config.guess : Import upstream 2021-01-25. 2021-02-23 17:21:10 +08: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 MAINTAINERS: Add myself for write after approval 2021-04-11 12:09:11 +01:00
Makefile.def sim: drop dep on configure-gdb 2021-03-12 19:48:13 -05:00
Makefile.in sim: drop dep on configure-gdb 2021-03-12 19:48:13 -05:00
Makefile.tpl Add -fprofile-reproducible=parallel-runs to STAGEfeedback_CFLAGS to Makefile.tpl. 2021-03-11 16:18:56 +01:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
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.