Matthieu Longo <matthieu.lo...@arm.com> writes: > The code emitting the GNU properties was moved to a separate file to > improve modularity and "releave" the 31000-lines long aarch64.cc file > from a few lines. > > It introduces a new namespace "aarch64::" for AArch64 backend which > reduce the length of function names by not prepending 'aarch64_' to > each of them. > > gcc/ChangeLog: > > * config.gcc: Add aarch64-dwarf-metadata.o to extra_objs. > * config/aarch64/aarch64-dwarf-metadata.h: New file > * config/aarch64/aarch64-dwarf-metadata.cc: New file.
Sorry for only raising this now, but: I'm not sure about the name. Neither the current GNU properties code nor the upcoming build attributes code are really related to DWARF, at least AIUI. > * config/aarch64/aarch64.cc > (GNU_PROPERTY_AARCH64_FEATURE_1_AND): Removed. > (GNU_PROPERTY_AARCH64_FEATURE_1_BTI): Likewise. > (GNU_PROPERTY_AARCH64_FEATURE_1_PAC): Likewise. > (GNU_PROPERTY_AARCH64_FEATURE_1_GCS): Likewise. > (aarch64_file_end_indicate_exec_stack): Move GNU properties code to > aarch64-dwarf-metadata.cc > * config/aarch64/t-aarch64: Declare target aarch64-dwarf-metadata.o > --- > gcc/config.gcc | 2 +- > gcc/config/aarch64/aarch64-dwarf-metadata.cc | 145 +++++++++++++++++++ > gcc/config/aarch64/aarch64-dwarf-metadata.h | 47 ++++++ > gcc/config/aarch64/aarch64.cc | 82 +---------- > gcc/config/aarch64/t-aarch64 | 10 ++ > 5 files changed, 210 insertions(+), 76 deletions(-) > create mode 100644 gcc/config/aarch64/aarch64-dwarf-metadata.cc > create mode 100644 gcc/config/aarch64/aarch64-dwarf-metadata.h > > diff --git a/gcc/config.gcc b/gcc/config.gcc > index 1e386a469e0..abda94236d2 100644 > --- a/gcc/config.gcc > +++ b/gcc/config.gcc > @@ -351,7 +351,7 @@ aarch64*-*-*) > c_target_objs="aarch64-c.o" > cxx_target_objs="aarch64-c.o" > d_target_objs="aarch64-d.o" > - extra_objs="aarch64-builtins.o aarch-common.o aarch64-sve-builtins.o > aarch64-sve-builtins-shapes.o aarch64-sve-builtins-base.o > aarch64-sve-builtins-sve2.o aarch64-sve-builtins-sme.o > cortex-a57-fma-steering.o aarch64-speculation.o aarch-bti-insert.o > aarch64-cc-fusion.o aarch64-early-ra.o aarch64-ldp-fusion.o" > + extra_objs="aarch64-builtins.o aarch-common.o aarch64-dwarf-metadata.o > aarch64-sve-builtins.o aarch64-sve-builtins-shapes.o > aarch64-sve-builtins-base.o aarch64-sve-builtins-sve2.o > aarch64-sve-builtins-sme.o cortex-a57-fma-steering.o aarch64-speculation.o > aarch-bti-insert.o aarch64-cc-fusion.o aarch64-early-ra.o > aarch64-ldp-fusion.o" > target_gtfiles="\$(srcdir)/config/aarch64/aarch64-protos.h > \$(srcdir)/config/aarch64/aarch64-builtins.h > \$(srcdir)/config/aarch64/aarch64-builtins.cc > \$(srcdir)/config/aarch64/aarch64-sve-builtins.h > \$(srcdir)/config/aarch64/aarch64-sve-builtins.cc" > target_has_targetm_common=yes > ;; > diff --git a/gcc/config/aarch64/aarch64-dwarf-metadata.cc > b/gcc/config/aarch64/aarch64-dwarf-metadata.cc > new file mode 100644 > index 00000000000..f272d290fed > --- /dev/null > +++ b/gcc/config/aarch64/aarch64-dwarf-metadata.cc > @@ -0,0 +1,145 @@ > +/* DWARF metadata for AArch64 architecture. Same comment here. > + Copyright (C) 2024 Free Software Foundation, Inc. Should be 2024-2025 now (and for the header). > [...] > diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64 > index 59571948479..3cbd49007c4 100644 > --- a/gcc/config/aarch64/t-aarch64 > +++ b/gcc/config/aarch64/t-aarch64 > @@ -140,6 +140,16 @@ aarch-common.o: $(srcdir)/config/arm/aarch-common.cc > $(CONFIG_H) $(SYSTEM_H) \ > $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ > $(srcdir)/config/arm/aarch-common.cc > > +aarch64-dwarf-metadata.o: $(srcdir)/config/aarch64/aarch64-dwarf-metadata.cc > \ > + $(CONFIG_H) \ > + $(RTL_H) \ > + $(SYSTEM_H) \ > + $(TARGET_H) \ > + $(srcdir)/config/aarch64/aarch64-dwarf-metadata.h \ > + output.h This is missing $(BACKEND_H), which admittedly doesn't exist yet. Could you add a definition of BACKEND_H to Makefile.in and reference it here? Otherwise it looks good, thanks. Richard > + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_SPPFLAGS) $(INCLUDES) \ > + $(srcdir)/config/aarch64/aarch64-dwarf-metadata.cc > + > aarch64-c.o: $(srcdir)/config/aarch64/aarch64-c.cc $(CONFIG_H) $(SYSTEM_H) \ > coretypes.h $(TM_H) $(TREE_H) output.h $(C_COMMON_H) $(TARGET_H) > $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \