gcc/libphobos/libdruntime
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
..
config libphobos: Fix misspelling of msvcUsesUCRT (PR104659) 2022-03-01 15:29:30 +01:00
core d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c. 2022-06-22 17:57:56 +02:00
gcc d: Add `@register' attribute to compiler and library. 2022-06-24 20:49:58 +02:00
rt d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c. 2022-06-22 17:57:56 +02:00
__builtins.di d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01. 2022-05-16 19:07:45 +02:00
__main.di Update copyright years. 2022-01-03 10:42:10 +01:00
LICENSE.txt d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1) 2021-11-30 16:53:28 +01:00
Makefile.am d: Merge upstream dmd 821ed393d, druntime 454471d8, phobos 1206fc94f. 2022-06-13 11:38:10 +02:00
Makefile.in d: Merge upstream dmd 821ed393d, druntime 454471d8, phobos 1206fc94f. 2022-06-13 11:38:10 +02:00
MERGE d: Merge upstream dmd 529110f66, druntime 148608b7. 2022-06-24 20:49:58 +02:00
object.d d: Merge upstream dmd 4d07f22f2, druntime f89da313, phobos d46814c86. 2022-05-27 20:19:02 +02:00