Add a generic lhd_simulate_enum_decl

Programming / Compilers / GCC - rsandifo [138bc75d-0d04-0410-961f-82ee72b054a4] - 7 January 2020 10:21 EST

Normally we only create SVE ACLE functions when arm_sve.h is included. But for LTO we need to do it at start-up, so that the functions are already defined when streaming in the LTO objects.

One hitch with doing that is that LTO doesn't yet implement the simulate_enum_decl langhook. This patch adds a simple default implementation that it can use.

2020-01-07 Richard Sandiford

gcc/
- langhooks-def.h (lhd_simulate_enum_decl): Declare. (LANG_HOOKS_SIMULATE_ENUM_DECL): Use it.
- langhooks.c: Include stor-layout.h. (lhd_simulate_enum_decl): New function.
- config/aarch64/aarch64-sve-builtins.cc (init_builtins): Call handle_arm_sve_h for the LTO frontend. (register_vector_type): Cope with null returns from pushdecl.

gcc/testsuite/
- gcc.target/aarch64/sve/pcs/asm_4.c: New test.

12628ade57c Add a generic lhd_simulate_enum_decl
gcc/ChangeLog | 10 ++++++
gcc/config/aarch64/aarch64-sve-builtins.cc | 5 ++-
gcc/langhooks-def.h | 4 ++-
gcc/langhooks.c | 39 ++++++++++++++++++++++++
gcc/testsuite/ChangeLog | 4 +++
gcc/testsuite/gcc.target/aarch64/sve/pcs/asm_4.c | 4 +++
6 files changed, 64 insertions(+), 2 deletions(-)

Upstream: gcc.gnu.org


  • Share