gcc/libphobos
Iain Buclaw 91418c4208 d: Add `@register' attribute to compiler and library.
The `@register` attribute specifies that a local or `__gshared` variable
is to be given a register storage-class in the C sense of the term, and
will be placed into a register named `registerName`.

The variable needs to boiled down to a data type that fits the target
register.  It also cannot have either thread-local or `extern` storage.
It is an error to take the address of a register variable.

	PR d/105413

gcc/d/ChangeLog:

	* d-attribs.cc (d_handle_register_attribute): New function.
	(d_langhook_attribute_table): Add register attribute.
	* d-codegen.cc (d_mark_addressable): Error if taken address of
	register variable.
	(build_frame_type): Error if register variable has non-local
	references.
	* d-tree.h (d_mark_addressable): Add complain parameter.
	* decl.cc (get_symbol_decl): Mark register varibles DECL_REGISTER.
	Error when register variable declared thread-local or extern.
	* expr.cc (ExprVisitor::visit (IndexExp *)): Don't complain about
	marking register vectors as addressable in an ARRAY_REF.

libphobos/ChangeLog:

	* libdruntime/gcc/attributes.d (register): Define.

gcc/testsuite/ChangeLog:

	* gdc.dg/attr_register1.d: New test.
	* gdc.dg/attr_register2.d: New test.
	* gdc.dg/attr_register3.d: New test.
2022-06-24 20:49:58 +02:00
..
libdruntime d: Add `@register' attribute to compiler and library. 2022-06-24 20:49:58 +02:00
m4 libphobos: Update comment for DRUNTIME_OS_SOURCES 2021-09-01 14:19:35 +02:00
src d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c. 2022-06-22 17:57:56 +02:00
testsuite d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c. 2022-06-22 17:57:56 +02:00
acinclude.m4 Update copyright years. 2022-01-03 10:42:10 +01:00
aclocal.m4 libphobos: Add --enable-cet to configure 2020-05-08 15:11:41 -07:00
ChangeLog Daily bump. 2022-06-23 00:16:40 +00:00
config.h.in
configure libphobos: Enable on Solaris/SPARC or with /bin/as [PR 103528] 2022-03-11 09:37:44 +01:00
configure.ac libphobos: Enable on Solaris/SPARC or with /bin/as [PR 103528] 2022-03-11 09:37:44 +01:00
configure.tgt libphobos: Enable on Solaris/SPARC or with /bin/as [PR 103528] 2022-03-11 09:37:44 +01:00
d_rules.am Update copyright years. 2022-01-03 10:42:10 +01:00
Makefile.am Update copyright years. 2022-01-03 10:42:10 +01:00
Makefile.in d: Merge upstream dmd 52844d4b1, druntime dbd0c874, phobos 896b1d0e1. 2022-02-16 11:15:02 +01:00
README.gcc

The files in this directory where noted are part of the DRuntime
and Phobos library.

DRuntime is the low-level runtime library backing the D programming
language, hosted at https://github.com/dlang/druntime/.

Phobos is the standard library for the D Programming Language, hosted
at https://github.com/dlang/phobos/.

The following sources and directories are part of DRuntime:
  libdruntime/core/
  libdruntime/gc/
  libdruntime/gcstub/
  libdruntime/object.d
  libdruntime/rt/

The following sources and directories are part of Phobos:
  src/etc/
  src/index.d
  src/std/

To report a bug or look up known issues with the runtime or standard
library please visit the issue tracker at https://issues.dlang.org/.

All changes to either of these libraries should go through the
upstream repository first, then merged back to GCC.