[Bug d/105413] gdc extended assembler cannot constraints r8 - r15

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 24 18:55:35 GMT 2022


--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuclaw@gcc.gnu.org>:


commit r13-1255-g91418c42089cd1cbe71edcd6b2f5b26559819372
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Jun 23 18:24:07 2022 +0200

    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


            * 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
            * 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.


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


            * gdc.dg/attr_register1.d: New test.
            * gdc.dg/attr_register2.d: New test.
            * gdc.dg/attr_register3.d: New test.

More information about the Gcc-bugs mailing list