On 5 October 2017 at 16:56, Richard Earnshaw (lists) <richard.earns...@arm.com> wrote: > On 02/10/17 10:00, Iain Buclaw wrote: >> This patch add D language support to targets of GCC itself. >> >> Changes since previous are just removing patches for untested target >> configurations, these can be re-added later on an as-per basis. >> >> --- >> >> >> 07-v3-d-gcc-target.patch >> >> >> gcc/ChangeLog >> >> * gcc/Makefile.in (tm_d_file_list, tm_d_include_list, >> TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables. >> (tm_d.h, cs-tm_d.h, default-d.o, d/d-target-hooks-def.h, >> s-d-target-hooks-def-h): New rules. >> (s-tm-texi): Also check timestamp on d-target.def. >> (generated_files): Add TM_D_H and d-target-hooks-def.h. >> (build/genhooks.o): Also depend on D_TARGET_DEF. >> * gcc/config.gcc (tm_d_file, d_target_objs, target_has_targetdm): >> New variables. >> * config/aarch64/aarch64-d.c: New file. >> * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE): >> Define. >> * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New >> prototype. >> * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define. >> * config/aarch64/t-aarch64 (aarch64-d.o): New rule. >> * config/arm/arm-d.c: New file. >> * config/arm/arm-protos.h (arm_d_target_versions): New prototype. >> * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define. >> * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define. >> * config/arm/t-arm (arm-d.o): New rule. >> * config/default-d.c: New file. >> * config/glibc-d.c: New file. >> * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/i386/i386-d.c: New file. >> * config/i386/i386-protos.h (ix86_d_target_versions): New prototype. >> * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define. >> * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS, >> GNU_USER_TARGET_D_CRITSEC_SIZE): Define. >> * config/i386/t-i386 (i386-d.o): New rule. >> * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define. >> * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define. >> * config/mips/mips-d.c: New file. >> * config/mips/mips-protos.h (mips_d_target_versions): New prototype. >> * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define. >> * config/mips/t-mips (mips-d.o): New rule. >> * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/powerpcspe/powerpcspe-d.c: New file. >> * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions): >> New prototype. >> * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define. >> * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule. >> * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define. >> * config/rs6000/rs6000-d.c: New file. >> * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New >> prototype. >> * config/rs6000/t-rs6000 (rs6000-d.o): New rule. >> * config/s390/s390-d.c: New file. >> * config/s390/s390-protos.h (s390_d_target_versions): New prototype. >> * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define. >> * config/s390/t-s390 (s390-d.o): New rule. >> * config/sparc/sparc-d.c: New file. >> * config/sparc/sparc-protos.h (sparc_d_target_versions): New prototype. >> * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define. >> * config/sparc/t-sparc (sparc-d.o): New rule. >> * config/t-glibc (glibc-d.o): New rule. >> * gcc/configure.ac (tm_d_file): New variable. >> (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitute. >> * gcc/configure: Regenerated. >> * doc/tm.texi.in: Add @node for D language, and @hook for >> TARGET_D_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE. >> * doc/tm.texi: Regenerated. >> * gcc/genhooks.c: Include d/d-target.def. > > I've not reviewed all of this, but a couple of observations. > > 1) We don't use the ARM64 in gcc. Please change them to AArch64.
I did a grep, and these are only mentioned as ARM64 in comments. > 2) The documentation for TARGET_D_CRITSEC_SIZE should probably be > explicit that the size is in bytes (it's implied by the examples). Some > hooks/macros in GCC return a size in bits, so it's best to be explicit. > > I can't see any other obvious issues with the ARM and AArch64 code. > OK, thanks. Iain.