diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-08-17 11:34:00 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 11:34:00 +0000 |
commit | 36f52d2a9062b06a19986e2d65fa9f4e9bd62491 (patch) | |
tree | fdcc7abc0613aaabd34a436bf22441926c2bc6ed /gcc | |
parent | 4f039ff9f6f18d15e32ddb54e3a6124802c45b7f (diff) | |
parent | 42a105c55f50903ffe92c1e529c1c6d091bcb10d (diff) | |
download | gcc-36f52d2a9062b06a19986e2d65fa9f4e9bd62491.zip gcc-36f52d2a9062b06a19986e2d65fa9f4e9bd62491.tar.gz gcc-36f52d2a9062b06a19986e2d65fa9f4e9bd62491.tar.bz2 |
Merge #1471
1471: Remove target hooks changes r=philberty a=philberty
This reverts the unnecessary changes we have made to GCC
so that merging from upstream should be simplified. This is
also making writing the patches for GCC simpler.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
Diffstat (limited to 'gcc')
245 files changed, 579 insertions, 2883 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index d00c011..31ff955 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -570,8 +570,6 @@ tm_p_file_list=@tm_p_file_list@ tm_p_include_list=@tm_p_include_list@ tm_d_file_list=@tm_d_file_list@ tm_d_include_list=@tm_d_include_list@ -tm_rust_file_list=@tm_rust_file_list@ -tm_rust_include_list=@tm_rust_include_list@ build_xm_file_list=@build_xm_file_list@ build_xm_include_list=@build_xm_include_list@ build_xm_defines=@build_xm_defines@ @@ -865,7 +863,6 @@ CONFIG_H = config.h $(host_xm_file_list) TCONFIG_H = tconfig.h $(xm_file_list) TM_P_H = tm_p.h $(tm_p_file_list) TM_D_H = tm_d.h $(tm_d_file_list) -TM_RUST_H = tm_rust.h $(tm_rust_file_list) GTM_H = tm.h $(tm_file_list) insn-constants.h TM_H = $(GTM_H) insn-flags.h $(OPTIONS_H) @@ -928,7 +925,6 @@ TARGET_H = $(TM_H) target.h $(TARGET_DEF) insn-modes.h insn-codes.h C_TARGET_H = c-family/c-target.h $(C_TARGET_DEF) COMMON_TARGET_H = common/common-target.h $(INPUT_H) $(COMMON_TARGET_DEF) D_TARGET_H = d/d-target.h $(D_TARGET_DEF) -RUST_TARGET_H = rust/rust-target.h $(RUST_TARGET_DEF) MACHMODE_H = machmode.h mode-classes.def HOOKS_H = hooks.h HOSTHOOKS_DEF_H = hosthooks-def.h $(HOOKS_H) @@ -1228,9 +1224,6 @@ CXX_TARGET_OBJS=@cxx_target_objs@ # Target specific, D specific object file D_TARGET_OBJS=@d_target_objs@ -# Target specific, D specific object file -RUST_TARGET_OBJS=@rust_target_objs@ - # Target specific, Fortran specific object file FORTRAN_TARGET_OBJS=@fortran_target_objs@ @@ -1932,7 +1925,6 @@ tconfig.h: cs-tconfig.h ; @true tm.h: cs-tm.h ; @true tm_p.h: cs-tm_p.h ; @true tm_d.h: cs-tm_d.h ; @true -tm_rust.h: cs-tm_rust.h ; @true cs-config.h: Makefile TARGET_CPU_DEFAULT="" \ @@ -1964,11 +1956,6 @@ cs-tm_d.h: Makefile HEADERS="$(tm_d_include_list)" DEFINES="" \ $(SHELL) $(srcdir)/mkconfig.sh tm_d.h -cs-tm_rust.h: Makefile - TARGET_CPU_DEFAULT="" \ - HEADERS="$(tm_rust_include_list)" DEFINES="" \ - $(SHELL) $(srcdir)/mkconfig.sh tm_rust.h - # Don't automatically run autoconf, since configure.ac might be accidentally # newer than configure. Also, this writes into the source directory which # might be on a read-only file system. If configured for maintainer mode @@ -2305,12 +2292,6 @@ default-d.o: config/default-d.cc $(COMPILE) $< $(POSTCOMPILE) -# Files used by the Rust language front end. - -default-rust.o: config/default-rust.cc - $(COMPILE) $< - $(POSTCOMPILE) - # Language-independent files. DRIVER_DEFINES = \ @@ -2615,15 +2596,6 @@ s-d-target-hooks-def-h: build/genhooks$(build_exeext) d/d-target-hooks-def.h $(STAMP) s-d-target-hooks-def-h -rust/rust-target-hooks-def.h: s-rust-target-hooks-def-h; @true - -s-rust-target-hooks-def-h: build/genhooks$(build_exeext) - $(RUN_GEN) build/genhooks$(build_exeext) "Rust Target Hook" \ - > tmp-rust-target-hooks-def.h - $(SHELL) $(srcdir)/../move-if-change tmp-rust-target-hooks-def.h \ - rust/rust-target-hooks-def.h - $(STAMP) s-rust-target-hooks-def-h - # check if someone mistakenly only changed tm.texi. # We use a different pathname here to avoid a circular dependency. s-tm-texi: $(srcdir)/doc/../doc/tm.texi @@ -2648,7 +2620,6 @@ s-tm-texi: build/genhooks$(build_exeext) $(srcdir)/doc/tm.texi.in || test $(srcdir)/doc/tm.texi -nt $(srcdir)/c-family/c-target.def \ || test $(srcdir)/doc/tm.texi -nt $(srcdir)/common/common-target.def \ || test $(srcdir)/doc/tm.texi -nt $(srcdir)/d/d-target.def \ - || test $(srcdir)/doc/tm.texi -nt $(srcdir)/rust/rust-target.def \ ); then \ echo >&2 ; \ echo You should edit $(srcdir)/doc/tm.texi.in rather than $(srcdir)/doc/tm.texi . >&2 ; \ @@ -2797,8 +2768,8 @@ s-gtype: $(EXTRA_GTYPE_DEPS) build/gengtype$(build_exeext) \ -r gtype.state $(STAMP) s-gtype -generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_RUST_H) $(TM_H) \ - multilib.h $(simple_generated_h) specs.h \ +generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_H) multilib.h \ + $(simple_generated_h) specs.h \ tree-check.h genrtl.h insn-modes.h insn-modes-inline.h \ tm-preds.h tm-constrs.h \ $(ALL_GTFILES_H) gtype-desc.cc gtype-desc.h version.h \ @@ -2806,7 +2777,7 @@ generated_files = config.h tm.h $(TM_P_H) $(TM_D_H) $(TM_RUST_H) $(TM_H) \ common/common-target-hooks-def.h pass-instances.def \ gimple-match.cc generic-match.cc \ c-family/c-target-hooks-def.h d/d-target-hooks-def.h \ - rust/rust-target-hooks-def.h case-cfn-macros.h \ + case-cfn-macros.h \ cfn-operators.pd omp-device-properties.h # diff --git a/gcc/common.opt b/gcc/common.opt index 5118b03..fe7bcf6 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3570,10 +3570,6 @@ static-libgo Driver ; Documented for Go, but always accepted by driver. -static-librust -Driver -; Documented for Rust, but always accepted by driver. - static-libasan Driver diff --git a/gcc/config.gcc b/gcc/config.gcc index da06e41..2c4266c 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -90,9 +90,6 @@ # tm_d_file A list of headers with definitions of target hook # macros for the D compiler. # -# tm_rust_file A list of headers with definitions of target hook -# macros for the Rust compiler. -# # out_file The name of the machine description C support # file, if different from "$cpu_type/$cpu_type.c". # @@ -149,9 +146,6 @@ # d_target_objs List of extra target-dependent objects that be # linked into the D compiler only. # -# rust_target_objs List of extra target-dependent objects that be -# linked into the Rust compiler only. -# # fortran_target_objs List of extra target-dependent objects that be # linked into the fortran compiler only. # @@ -207,9 +201,6 @@ # # target_has_targetdm Set to yes or no depending on whether the target # has its own definition of targetdm. -# -# target_has_targetrustm Set to yes or no depending on whether the target -# has its own definition of targetrustm. out_file= common_out_file= @@ -226,7 +217,6 @@ extra_options= c_target_objs= cxx_target_objs= d_target_objs= -rust_target_objs= fortran_target_objs= target_has_targetcm=no target_has_targetm_common=yes @@ -339,14 +329,12 @@ aarch64*-*-*) c_target_objs="aarch64-c.o" cxx_target_objs="aarch64-c.o" d_target_objs="aarch64-d.o" - rust_target_objs="aarch64-rust.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 cortex-a57-fma-steering.o aarch64-speculation.o falkor-tag-collision-avoidance.o aarch64-bti-insert.o aarch64-cc-fusion.o" target_gtfiles="\$(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 ;; alpha*-*-*) cpu_type=alpha - rust_target_objs="alpha-rust.o" extra_options="${extra_options} g.opt" ;; amdgcn*) @@ -360,7 +348,6 @@ arc*-*-*) cpu_type=arc c_target_objs="arc-c.o" cxx_target_objs="arc-c.o" - rust_target_objs="arc-rust.o" extra_options="${extra_options} arc/arc-tables.opt g.opt" extra_headers="arc-simd.h" ;; @@ -372,7 +359,6 @@ arm*-*-*) c_target_objs="arm-c.o" cxx_target_objs="arm-c.o" d_target_objs="arm-d.o" - rust_target_objs="arm-rust.o" extra_options="${extra_options} arm/arm-tables.opt" target_gtfiles="\$(srcdir)/config/arm/arm-builtins.cc \$(srcdir)/config/arm/arm-mve-builtins.h \$(srcdir)/config/arm/arm-mve-builtins.cc" ;; @@ -389,7 +375,6 @@ bpf-*-*) ;; frv*) cpu_type=frv extra_options="${extra_options} g.opt" - rust_target_objs="frv-rust.o" ;; ft32*) cpu_type=ft32 target_has_targetm_common=no @@ -401,14 +386,12 @@ fido-*-*) cpu_type=m68k extra_headers=math-68881.h extra_options="${extra_options} m68k/m68k-tables.opt" - rust_target_objs="m68k-rust.o" ;; i[34567]86-*-* | x86_64-*-*) cpu_type=i386 c_target_objs="i386-c.o" cxx_target_objs="i386-c.o" d_target_objs="i386-d.o" - rust_target_objs="i386-rust.o" extra_objs="x86-tune-sched.o x86-tune-sched-bd.o x86-tune-sched-atom.o x86-tune-sched-core.o i386-options.o i386-builtins.o i386-expand.o i386-features.o" target_gtfiles="\$(srcdir)/config/i386/i386-builtins.cc \$(srcdir)/config/i386/i386-expand.cc \$(srcdir)/config/i386/i386-options.cc" extra_options="${extra_options} fused-madd.opt" @@ -443,13 +426,11 @@ i[34567]86-*-* | x86_64-*-*) mwaitintrin.h avx512fp16intrin.h avx512fp16vlintrin.h" ;; ia64-*-*) - rust_target_objs="ia64-rust.o" extra_headers=ia64intrin.h extra_options="${extra_options} g.opt fused-madd.opt" ;; hppa*-*-*) cpu_type=pa - rust_target_objs="pa-rust.o" ;; lm32*) extra_options="${extra_options} g.opt" @@ -461,7 +442,6 @@ m32r*-*-*) m68k-*-*) extra_headers=math-68881.h extra_options="${extra_options} m68k/m68k-tables.opt" - rust_target_objs="m68k-rust.o" ;; microblaze*-*-*) cpu_type=microblaze @@ -470,14 +450,12 @@ microblaze*-*-*) mips*-*-*) cpu_type=mips d_target_objs="mips-d.o" - rust_target_objs="mips-rust.o" extra_headers="loongson.h loongson-mmiintrin.h msa.h" extra_objs="frame-header-opt.o" extra_options="${extra_options} g.opt fused-madd.opt mips/mips-tables.opt" ;; nds32*) cpu_type=nds32 - rust_target_objs="nds32-rust.o" extra_headers="nds32_intrinsic.h nds32_isr.h nds32_init.inc" case ${target} in nds32*-*-linux*) @@ -493,18 +471,15 @@ nds32*) ;; nios2-*-*) cpu_type=nios2 - rust_target_objs="nios2-rust.o" extra_options="${extra_options} g.opt" ;; nvptx-*-*) cpu_type=nvptx c_target_objs="nvptx-c.o" cxx_target_objs="nvptx-c.o" - rust_target_objs="nvptx-rust.o" ;; or1k*-*-*) cpu_type=or1k - rust_target_objs="or1k-rust.o" ;; powerpc*-*-*) cpu_type=rs6000 @@ -536,7 +511,6 @@ riscv*) cpu_type=riscv extra_objs="riscv-builtins.o riscv-c.o riscv-sr.o riscv-shorten-memrefs.o" d_target_objs="riscv-d.o" - rust_target_objs="riscv-rust.o" ;; rs6000*-*-*) extra_options="${extra_options} g.opt fused-madd.opt rs6000/rs6000-tables.opt" @@ -550,30 +524,25 @@ sparc*-*-*) c_target_objs="sparc-c.o" cxx_target_objs="sparc-c.o" d_target_objs="sparc-d.o" - rust_target_objs="sparc-rust.o" extra_headers="visintrin.h" ;; s390*-*-*) cpu_type=s390 d_target_objs="s390-d.o" - rust_target_objs="s390-rust.o" extra_options="${extra_options} fused-madd.opt" extra_headers="s390intrin.h htmintrin.h htmxlintrin.h vecintrin.h" ;; # Note the 'l'; we need to be able to match e.g. "shle" or "shl". sh[123456789lbe]*-*-* | sh-*-*) cpu_type=sh - rust_target_objs="sh-rust.o" extra_options="${extra_options} fused-madd.opt" extra_objs="${extra_objs} sh_treg_combine.o sh-mem.o sh_optimize_sett_clrt.o" ;; v850*-*-*) cpu_type=v850 - rust_target_objs="v850-rust.o" ;; tic6x-*-*) cpu_type=c6x - rust_target_objs="c6x-rust.o" extra_headers="c6x_intrinsics.h" extra_options="${extra_options} c6x/c6x-tables.opt" ;; @@ -590,12 +559,10 @@ esac tm_file=${cpu_type}/${cpu_type}.h tm_d_file=${cpu_type}/${cpu_type}.h -tm_rust_file=${cpu_type}/${cpu_type}.h if test -f ${srcdir}/config/${cpu_type}/${cpu_type}-protos.h then tm_p_file=${cpu_type}/${cpu_type}-protos.h tm_d_file="${tm_d_file} ${cpu_type}/${cpu_type}-protos.h" - tm_rust_file="${tm_rust_file} ${cpu_type}/${cpu_type}-protos.h" fi extra_modes= @@ -1581,7 +1548,6 @@ cr16-*-elf) tm_file="elfos.h ${tm_file} newlib-stdint.h" tmake_file="${tmake_file} cr16/t-cr16 " use_collect2=no - rust_target_objs="cr16-rust.o" ;; cris-*-elf | cris-*-none) tm_file="elfos.h newlib-stdint.h ${tm_file}" @@ -1652,7 +1618,6 @@ csky-*-*) exit 1 ;; esac - rust_target_objs="csky-rust.o" ;; epiphany-*-elf | epiphany-*-rtems*) tm_file="dbxelf.h elfos.h ${tm_file}" @@ -1669,7 +1634,6 @@ epiphany-*-elf | epiphany-*-rtems*) extra_objs="${extra_objs} mode-switch-use.o resolve-sw-modes.o" tm_defines="${tm_defines} EPIPHANY_STACK_OFFSET=${with_stack_offset:-8}" extra_headers="epiphany_intrinsics.h" - rust_target_objs="epiphany-rust.o" ;; fr30-*-elf) tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" @@ -2898,7 +2862,6 @@ or1k*-*-*) pdp11-*-*) tm_file="${tm_file} newlib-stdint.h" use_gcc_stdint=wrap - rust_target_objs="pdp11-rust.o" ;; # port not yet contributed #powerpc-*-openbsd*) @@ -3184,12 +3147,10 @@ rx-*-elf*) tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}" tmake_file="${tmake_file} rx/t-rx" extra_options="${extra_options} rx/elf.opt" - rust_target_objs="rx-rust.o" ;; rx-*-linux*) tm_file="elfos.h linux.h glibc-stdint.h rx/linux.h ../../libgcc/config/rx/rx-abi.h" tmake_file="${tmake_file} rx/t-linux" - rust_target_objs="rx-rust.o" ;; s390-*-linux*) tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h" @@ -3671,10 +3632,6 @@ if [ "$target_has_targetdm" = "no" ]; then d_target_objs="$d_target_objs default-d.o" fi -if [ "$target_has_targetrustm" = "no" ]; then - rust_target_objs="$rust_target_objs default-rust.o" -fi - # Support for --with-cpu and related options (and a few unrelated options, # too). case ${with_cpu} in @@ -5421,7 +5378,6 @@ case ${target} in c_target_objs="${c_target_objs} ${cpu_type}-c.o" cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o" d_target_objs="${d_target_objs} ${cpu_type}-d.o" - rust_target_objs="${rust_target_objs} ${cpu_type}-rust.o" tmake_file="${cpu_type}/t-${cpu_type} ${tmake_file}" ;; diff --git a/gcc/config/aarch64/aarch64-freebsd.h b/gcc/config/aarch64/aarch64-freebsd.h index 58646e1..13beb37 100644 --- a/gcc/config/aarch64/aarch64-freebsd.h +++ b/gcc/config/aarch64/aarch64-freebsd.h @@ -65,14 +65,6 @@ } \ while (false) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in aarch64-freebsd.h - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - FBSD_TARGET_RUST_OS_INFO (); \ - } while (0) - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack /* Uninitialized common symbols in non-PIE executables, even with diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h index 1433a5f..5e4553d 100644 --- a/gcc/config/aarch64/aarch64-linux.h +++ b/gcc/config/aarch64/aarch64-linux.h @@ -64,13 +64,6 @@ } \ while (0) -#define GNU_USER_TARGET_D_CRITSEC_SIZE 48 - -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #define TARGET_ASM_FILE_END aarch64_file_end_indicate_exec_stack /* Uninitialized common symbols in non-PIE executables, even with diff --git a/gcc/config/aarch64/aarch64-netbsd.h b/gcc/config/aarch64/aarch64-netbsd.h index 992929e..9485f30 100644 --- a/gcc/config/aarch64/aarch64-netbsd.h +++ b/gcc/config/aarch64/aarch64-netbsd.h @@ -52,14 +52,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in aarch64-netbsd.h - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 8f50baf..2636853 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -1026,9 +1026,6 @@ std::string aarch64_get_extension_string_for_isa_flags (uint64_t, uint64_t); extern void aarch64_d_target_versions (void); extern void aarch64_d_register_target_info (void); -/* In aarch64-rust.cc */ -extern void aarch64_rust_target_cpu_info (void); - rtl_opt_pass *make_pass_fma_steering (gcc::context *); rtl_opt_pass *make_pass_track_speculation (gcc::context *); rtl_opt_pass *make_pass_tag_collision_avoidance (gcc::context *); diff --git a/gcc/config/aarch64/aarch64-vxworks.h b/gcc/config/aarch64/aarch64-vxworks.h index e246f90..4b127d8 100644 --- a/gcc/config/aarch64/aarch64-vxworks.h +++ b/gcc/config/aarch64/aarch64-vxworks.h @@ -55,14 +55,6 @@ along with GCC; see the file COPYING3. If not see VXWORKS_OS_CPP_BUILTINS (); \ } while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in aarch64-vxworks.h - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - VXWORKS_TARGET_RUST_OS_INFO (); \ - } while (0) - /* Static stack checking is supported. */ #define STACK_CHECK_STATIC_BUILTIN 1 diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h index 8ba14ca..dddf133 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h @@ -30,9 +30,6 @@ #define TARGET_D_CPU_VERSIONS aarch64_d_target_versions #define TARGET_D_REGISTER_CPU_TARGET_INFO aarch64_d_register_target_info -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO aarch64_rust_target_cpu_info - #define REGISTER_TARGET_PRAGMAS() aarch64_register_pragmas () diff --git a/gcc/config/aarch64/rtems.h b/gcc/config/aarch64/rtems.h index 4188cb0..b572161 100644 --- a/gcc/config/aarch64/rtems.h +++ b/gcc/config/aarch64/rtems.h @@ -31,16 +31,3 @@ builtin_define ("__USE_INIT_FINI__"); \ builtin_assert ("system=rtems"); \ } while (0) - -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (aarch64) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/aarch64/t-aarch64 b/gcc/config/aarch64/t-aarch64 index 0fdcaf3..75b463d 100644 --- a/gcc/config/aarch64/t-aarch64 +++ b/gcc/config/aarch64/t-aarch64 @@ -118,10 +118,6 @@ aarch64-d.o: $(srcdir)/config/aarch64/aarch64-d.cc $(COMPILE) $< $(POSTCOMPILE) -aarch64-rust.o: $(srcdir)/config/aarch64/aarch64-rust.cc - $(COMPILE) $< - $(POSTCOMPILE) - PASSES_EXTRA += $(srcdir)/config/aarch64/aarch64-passes.def cortex-a57-fma-steering.o: $(srcdir)/config/aarch64/cortex-a57-fma-steering.cc \ diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h index 8170de0..0c832bf 100644 --- a/gcc/config/alpha/alpha-protos.h +++ b/gcc/config/alpha/alpha-protos.h @@ -112,9 +112,6 @@ extern bool some_small_symbolic_operand_int (rtx); extern int tls_symbolic_operand_1 (rtx, int, int); extern rtx resolve_reload_operand (rtx); -/* Declare functions in alpha-rust.cc */ -extern void alpha_rust_target_cpu_info (void); - namespace gcc { class context; } class rtl_opt_pass; diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h index 9520c10..c01353a 100644 --- a/gcc/config/alpha/alpha.h +++ b/gcc/config/alpha/alpha.h @@ -94,9 +94,6 @@ along with GCC; see the file COPYING3. If not see while (0) #endif -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO alpha_rust_target_cpu_info - /* Run-time compilation parameters selecting different hardware subsets. */ /* Which processor to schedule for. The cpu attribute defines a list that diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h index ff78ddb..9ab501c 100644 --- a/gcc/config/alpha/linux.h +++ b/gcc/config/alpha/linux.h @@ -33,14 +33,6 @@ along with GCC; see the file COPYING3. If not see builtin_define ("_GNU_SOURCE"); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "linux"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #undef LIB_SPEC #define LIB_SPEC \ "%{pthread:-lpthread} \ diff --git a/gcc/config/alpha/netbsd.h b/gcc/config/alpha/netbsd.h index f163153..10c9690 100644 --- a/gcc/config/alpha/netbsd.h +++ b/gcc/config/alpha/netbsd.h @@ -23,10 +23,6 @@ along with GCC; see the file COPYING3. If not see NETBSD_OS_CPP_BUILTINS_ELF(); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) /* NetBSD doesn't use the LANGUAGE* built-ins. */ #undef SUBTARGET_LANGUAGE_CPP_BUILTINS diff --git a/gcc/config/alpha/openbsd.h b/gcc/config/alpha/openbsd.h index a6083e5..d7a6535 100644 --- a/gcc/config/alpha/openbsd.h +++ b/gcc/config/alpha/openbsd.h @@ -48,11 +48,6 @@ along with GCC; see the file COPYING3. If not see OPENBSD_OS_CPP_BUILTINS_LP64(); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - OPENBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Layout of source language data types. */ /* This must agree with <machine/_types.h> */ diff --git a/gcc/config/alpha/t-alpha b/gcc/config/alpha/t-alpha index bbf9914..7549010 100644 --- a/gcc/config/alpha/t-alpha +++ b/gcc/config/alpha/t-alpha @@ -17,7 +17,3 @@ # <http://www.gnu.org/licenses/>. PASSES_EXTRA += $(srcdir)/config/alpha/alpha-passes.def - -alpha-rust.o: $(srcdir)/config/alpha/alpha-rust.cc - $(COMPILE) $< - $(POSTCOMPILE) diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index 43b0bf1..0ae5aed 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -41,9 +41,6 @@ along with GCC; see the file COPYING3. If not see builtin_define ("__IEEE_FLOAT"); \ } while (0) -#define SUBTARGET_RUST_OS_INFO() \ - do {} while (0) - #undef PCC_STATIC_STRUCT_RETURN #define MAX_OFILE_ALIGNMENT 524288 /* 8 x 2^16 by DEC Ada Test CD40VRA */ diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h index 4618fa6..db542f0 100644 --- a/gcc/config/arc/arc-protos.h +++ b/gcc/config/arc/arc-protos.h @@ -108,8 +108,5 @@ extern bool arc_is_jli_call_p (rtx); extern void arc_file_end (void); extern bool arc_is_secure_call_p (rtx); -/* Declare functions in arc-rust.cc */ -extern void arc_rust_target_cpu_info (void); - rtl_opt_pass * make_pass_arc_ifcvt (gcc::context *ctxt); rtl_opt_pass * make_pass_arc_predicate_delay_insns (gcc::context *ctxt); diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h index 697b14f..539a166 100644 --- a/gcc/config/arc/arc.h +++ b/gcc/config/arc/arc.h @@ -52,9 +52,6 @@ along with GCC; see the file COPYING3. If not see /* Names to predefine in the preprocessor for this target machine. */ #define TARGET_CPU_CPP_BUILTINS() arc_cpu_cpp_builtins (pfile) -/* CPU info for Rust for this target machine. */ -#define TARGET_RUST_CPU_INFO arc_rust_target_cpu_info - /* Macros enabled by specific command line option. FIXME: to be deprecatd. */ #define CPP_SPEC "\ diff --git a/gcc/config/arc/linux.h b/gcc/config/arc/linux.h index 7e1183e..0f1ff05 100644 --- a/gcc/config/arc/linux.h +++ b/gcc/config/arc/linux.h @@ -22,30 +22,21 @@ along with GCC; see the file COPYING3. If not see #undef DWARF2_UNWIND_INFO #define DWARF2_UNWIND_INFO 1 -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - GNU_USER_TARGET_OS_CPP_BUILTINS (); \ - } \ +#define TARGET_OS_CPP_BUILTINS() \ + do \ + { \ + GNU_USER_TARGET_OS_CPP_BUILTINS (); \ + } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do \ - { \ - GNU_USER_TARGET_RUST_OS_INFO (); \ - /*TODO: does this properly register 'linux' as 'target_os'?*/ \ - } \ - while (0) - -#define GLIBC_DYNAMIC_LINKER \ +#define GLIBC_DYNAMIC_LINKER \ "/lib/ld-linux-arc%{mbig-endian:eb}%{mcpu=arc700:700}.so.2" -#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" /* Note that the default is to link against dynamic libraries, if they are available. Override with -static. */ #undef LINK_SPEC -#define LINK_SPEC \ - "%{h*} \ +#define LINK_SPEC "%{h*} \ %{static:-Bstatic} \ %{shared:-shared} \ %{symbolic:-Bsymbolic} \ @@ -58,15 +49,15 @@ along with GCC; see the file COPYING3. If not see %{mcpu=nps400:-marclinux_nps; :-marclinux}" #undef STARTFILE_SPEC -#define STARTFILE_SPEC \ +#define STARTFILE_SPEC \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC) #undef ENDFILE_SPEC -#define ENDFILE_SPEC \ +#define ENDFILE_SPEC \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) #undef LIB_SPEC -#define LIB_SPEC \ +#define LIB_SPEC \ "%{pthread:-lpthread} \ %{shared:-lc} \ %{!shared:%{profile:-lc_p}%{!profile:-lc}}" @@ -84,15 +75,14 @@ along with GCC; see the file COPYING3. If not see /* We do not have any MULTILIB_OPTIONS specified, so there are no MULTILIB_DEFAULTS. */ -#undef MULTILIB_DEFAULTS +#undef MULTILIB_DEFAULTS /* Linux toolchains use r25 as the thread pointer register. */ #undef TARGET_ARC_TP_REGNO_DEFAULT #define TARGET_ARC_TP_REGNO_DEFAULT 25 #undef SUBTARGET_CPP_SPEC -#define SUBTARGET_CPP_SPEC \ - "\ +#define SUBTARGET_CPP_SPEC "\ %{pthread:-D_REENTRANT} \ " @@ -113,8 +103,7 @@ along with GCC; see the file COPYING3. If not see #endif #undef SUBTARGET_CPP_SPEC -#define SUBTARGET_CPP_SPEC \ - "\ +#define SUBTARGET_CPP_SPEC "\ %{pthread:-D_REENTRANT} \ " @@ -125,25 +114,25 @@ along with GCC; see the file COPYING3. If not see /* Clear the instruction cache from `beg' to `end'. This makes an inline system call to SYS_cacheflush. */ #undef CLEAR_INSN_CACHE -#define CLEAR_INSN_CACHE(beg, end) \ - { \ - register unsigned long _beg __asm("r0") = (unsigned long) (beg); \ - register unsigned long _end __asm("r1") = (unsigned long) (end); \ - register unsigned long _xtr __asm("r2") = 0; \ - register unsigned long _scno __asm("r8") = 244; \ - __asm __volatile("trap_s 0 ; sys_cache_sync" \ - : "=r"(_beg) \ - : "0"(_beg), "r"(_end), "r"(_xtr), "r"(_scno)); \ - } +#define CLEAR_INSN_CACHE(beg, end) \ +{ \ + register unsigned long _beg __asm ("r0") = (unsigned long) (beg); \ + register unsigned long _end __asm ("r1") = (unsigned long) (end); \ + register unsigned long _xtr __asm ("r2") = 0; \ + register unsigned long _scno __asm ("r8") = 244; \ + __asm __volatile ("trap_s 0 ; sys_cache_sync" \ + : "=r" (_beg) \ + : "0" (_beg), "r" (_end), "r" (_xtr), "r" (_scno)); \ +} /* Emit rtl for profiling. Output assembler code to FILE to call "_mcount" for profiling a function entry. */ -#define PROFILE_HOOK(LABEL) \ - { \ - rtx fun, rt; \ - rt = get_hard_reg_initial_val (Pmode, RETURN_ADDR_REGNUM); \ - fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \ - emit_library_call (fun, LCT_NORMAL, VOIDmode, rt, Pmode); \ +#define PROFILE_HOOK(LABEL) \ + { \ + rtx fun, rt; \ + rt = get_hard_reg_initial_val (Pmode, RETURN_ADDR_REGNUM); \ + fun = gen_rtx_SYMBOL_REF (Pmode, "_mcount"); \ + emit_library_call (fun, LCT_NORMAL, VOIDmode, rt, Pmode); \ } /* Enter/Leave ops are default off for linux targets. */ diff --git a/gcc/config/arc/t-arc b/gcc/config/arc/t-arc index 04c47fd..9af2d2f 100644 --- a/gcc/config/arc/t-arc +++ b/gcc/config/arc/t-arc @@ -28,11 +28,6 @@ $(TREE_H) $(TM_H) $(TM_P_H) coretypes.h $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/arc/arc-c.cc -arc-rust.o: $(srcdir)/config/arc/arc-rust.cc $(CONFIG_H) $(SYSTEM_H) \ -$(TREE_H) $(TM_H) $(TM_P_H) coretypes.h - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ - $(srcdir)/config/arc/arc-rust.cc - #Run `arc-cpus` if you changed something in arc-cpus.def .PHONY: arc-cpus diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h index c485e54..cd55a9f 100644 --- a/gcc/config/arm/arm-protos.h +++ b/gcc/config/arm/arm-protos.h @@ -403,9 +403,6 @@ extern void arm_cpu_cpp_builtins (struct cpp_reader *); extern void arm_d_target_versions (void); extern void arm_d_register_target_info (void); -/* Defined in arm-rust.cc */ -extern void arm_rust_target_cpu_info (void); - extern bool arm_is_constant_pool_ref (rtx); /* The bits in this mask specify which instruction scheduling options should diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 26590ec..f52724d 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -51,9 +51,6 @@ extern char arm_arch_name[]; #define TARGET_D_CPU_VERSIONS arm_d_target_versions #define TARGET_D_REGISTER_CPU_TARGET_INFO arm_d_register_target_info -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO arm_rust_target_cpu_info - #include "config/arm/arm-opts.h" /* The processor for which instructions should be scheduled. */ diff --git a/gcc/config/arm/bpabi.h b/gcc/config/arm/bpabi.h index 95c7000..70984dd 100644 --- a/gcc/config/arm/bpabi.h +++ b/gcc/config/arm/bpabi.h @@ -104,16 +104,6 @@ #define TARGET_OS_CPP_BUILTINS() \ TARGET_BPABI_CPP_BUILTINS() -#define BPABI_TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: is this even an OS? What should go here?*/ \ - } while (0) - -/* Override less-specific arm/linux-elf.h definition. */ -#undef TARGET_RUST_OS_INFO -#define TARGET_RUST_OS_INFO() \ - BPABI_TARGET_RUST_OS_INFO() - /* The BPABI specifies the use of .{init,fini}_array. Therefore, we do not want GCC to put anything into the .{init,fini} sections. */ #undef INIT_SECTION_ASM_OP diff --git a/gcc/config/arm/freebsd.h b/gcc/config/arm/freebsd.h index d662ab0..2bd0dc9 100644 --- a/gcc/config/arm/freebsd.h +++ b/gcc/config/arm/freebsd.h @@ -83,15 +83,6 @@ } \ while (false) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in freebsd.h (arm) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - FBSD_TARGET_RUST_OS_INFO (); \ - BPABI_TARGET_RUST_OS_INFO (); \ - } while (0) - /* We default to a soft-float ABI so that binaries can run on all target hardware. */ #undef TARGET_DEFAULT_FLOAT_ABI diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h index a255ac0..50cc0bc 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -33,14 +33,6 @@ #define EXTRA_TARGET_D_OS_VERSIONS() \ ANDROID_TARGET_D_OS_VERSIONS(); -#define EXTRA_TARGET_RUST_OS_INFO() \ - do { \ - BPABI_TARGET_RUST_OS_INFO(); \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - ANDROID_TARGET_RUST_OS_INFO(); \ - /*TODO: ensure that this makes target_os 'linux' properly and stuff*/ \ - while (0) - /* We default to a soft-float ABI so that binaries can run on all target hardware. If you override this to use the hard-float ABI then change the setting of GLIBC_DYNAMIC_LINKER_DEFAULT as well. */ diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h index 0859945..df3da67 100644 --- a/gcc/config/arm/linux-elf.h +++ b/gcc/config/arm/linux-elf.h @@ -83,11 +83,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Call the function profiler with a given profile label. */ #undef ARM_FUNCTION_PROFILER #define ARM_FUNCTION_PROFILER(STREAM, LABELNO) \ diff --git a/gcc/config/arm/netbsd-eabi.h b/gcc/config/arm/netbsd-eabi.h index a47b2ca..c85fcd3 100644 --- a/gcc/config/arm/netbsd-eabi.h +++ b/gcc/config/arm/netbsd-eabi.h @@ -64,16 +64,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in netbsd-eabi.h (arm) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - if (TARGET_AAPCS_BASED) \ - BPABI_TARGET_RUST_OS_INFO(); \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC diff --git a/gcc/config/arm/netbsd-elf.h b/gcc/config/arm/netbsd-elf.h index e74cdcc..d239c73 100644 --- a/gcc/config/arm/netbsd-elf.h +++ b/gcc/config/arm/netbsd-elf.h @@ -51,14 +51,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in netbsd-elf.h (arm) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC diff --git a/gcc/config/arm/rtems.h b/gcc/config/arm/rtems.h index 56f978b..a569343 100644 --- a/gcc/config/arm/rtems.h +++ b/gcc/config/arm/rtems.h @@ -33,18 +33,4 @@ TARGET_BPABI_CPP_BUILTINS(); \ } while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (arm) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family - TODO*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - BPABI_TARGET_RUST_OS_INFO(); \ - } while (0) - #define ARM_DEFAULT_SHORT_ENUMS false diff --git a/gcc/config/arm/symbian.h b/gcc/config/arm/symbian.h index 81c7cc0..7df39170 100644 --- a/gcc/config/arm/symbian.h +++ b/gcc/config/arm/symbian.h @@ -78,21 +78,6 @@ } \ while (false) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in symbian.h (arm) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for symbian, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_vendor - TODO*/ \ - /*some triple examples i've seen are "arm-nokia-symbian-eabi" and possibly "arm-none-symbian-elf"*/ \ - builtin_rust_info ("target_family", ""); \ - builtin_rust_info ("target_os", "symbian"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - BPABI_TARGET_RUST_OS_INFO(); \ - } while (0) - /* On SymbianOS, these sections are not writable, so we use "a", rather than "aw", for the section attributes. */ #undef ARM_EABI_CTORS_SECTION_OP diff --git a/gcc/config/arm/t-arm b/gcc/config/arm/t-arm index d093f3c..041cc6e 100644 --- a/gcc/config/arm/t-arm +++ b/gcc/config/arm/t-arm @@ -172,10 +172,6 @@ arm-d.o: $(srcdir)/config/arm/arm-d.cc $(COMPILE) $< $(POSTCOMPILE) -arm-rust.o: $(srcdir)/config/arm/arm-rust.cc - $(COMPILE) $< - $(POSTCOMPILE) - arm-common.o: arm-cpu-cdata.h driver-arm.o: arm-native.h diff --git a/gcc/config/arm/uclinux-eabi.h b/gcc/config/arm/uclinux-eabi.h index 54bf78c..362d2b5 100644 --- a/gcc/config/arm/uclinux-eabi.h +++ b/gcc/config/arm/uclinux-eabi.h @@ -46,19 +46,6 @@ } \ while (false) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in uclinux-eabi.h (arm) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - BPABI_TARGET_RUST_OS_INFO(); \ - /*note: as far as I know, rustc does not distinguish between uclinux and regular linux kernels*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "linux"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #undef SUBTARGET_EXTRA_LINK_SPEC #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi -elf2flt" \ " --pic-veneer --target2=abs" diff --git a/gcc/config/arm/uclinux-elf.h b/gcc/config/arm/uclinux-elf.h index 3fcaf2d..921440d 100644 --- a/gcc/config/arm/uclinux-elf.h +++ b/gcc/config/arm/uclinux-elf.h @@ -48,18 +48,6 @@ } \ while (false) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in uclinux-elf.h (arm) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc does not distinguish between uclinux and regular linux kernels*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "linux"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - /* The GNU C++ standard library requires that these macros be defined. */ #undef CPLUSPLUS_CPP_SPEC #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" diff --git a/gcc/config/arm/vxworks.h b/gcc/config/arm/vxworks.h index 0d4989c..2bcd01e 100644 --- a/gcc/config/arm/vxworks.h +++ b/gcc/config/arm/vxworks.h @@ -75,20 +75,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see MAYBE_TARGET_BPABI_CPP_BUILTINS (); \ } while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in vxworks.h (arm) - c++ undefines it and redefines it." -#endif -#ifdef BPABI_TARGET_RUST_OS_INFO -# define MAYBE_BPABI_TARGET_RUST_OS_INFO BPABI_TARGET_RUST_OS_INFO -#else -# define MAYBE_BPABI_TARGET_RUST_OS_INFO() -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - VXWORKS_TARGET_RUST_OS_INFO (); \ - MAYBE_BPABI_TARGET_RUST_OS_INFO (); \ - } while (0) - #undef SUBTARGET_OVERRIDE_OPTIONS #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h index d069aa1..a442a81 100644 --- a/gcc/config/bfin/bfin.h +++ b/gcc/config/bfin/bfin.h @@ -32,221 +32,186 @@ /* Predefinition in the preprocessor for this target machine */ #ifndef TARGET_CPU_CPP_BUILTINS -#define TARGET_CPU_CPP_BUILTINS() \ - do \ - { \ - builtin_define_std ("bfin"); \ - builtin_define_std ("BFIN"); \ - builtin_define ("__ADSPBLACKFIN__"); \ - builtin_define ("__ADSPLPBLACKFIN__"); \ - \ - switch (bfin_cpu_type) \ - { \ - case BFIN_CPU_UNKNOWN: \ - break; \ - case BFIN_CPU_BF512: \ - builtin_define ("__ADSPBF512__"); \ - builtin_define ("__ADSPBF51x__"); \ - break; \ - case BFIN_CPU_BF514: \ - builtin_define ("__ADSPBF514__"); \ - builtin_define ("__ADSPBF51x__"); \ - break; \ - case BFIN_CPU_BF516: \ - builtin_define ("__ADSPBF516__"); \ - builtin_define ("__ADSPBF51x__"); \ - break; \ - case BFIN_CPU_BF518: \ - builtin_define ("__ADSPBF518__"); \ - builtin_define ("__ADSPBF51x__"); \ - break; \ - case BFIN_CPU_BF522: \ - builtin_define ("__ADSPBF522__"); \ - builtin_define ("__ADSPBF52x__"); \ - break; \ - case BFIN_CPU_BF523: \ - builtin_define ("__ADSPBF523__"); \ - builtin_define ("__ADSPBF52x__"); \ - break; \ - case BFIN_CPU_BF524: \ - builtin_define ("__ADSPBF524__"); \ - builtin_define ("__ADSPBF52x__"); \ - break; \ - case BFIN_CPU_BF525: \ - builtin_define ("__ADSPBF525__"); \ - builtin_define ("__ADSPBF52x__"); \ - break; \ - case BFIN_CPU_BF526: \ - builtin_define ("__ADSPBF526__"); \ - builtin_define ("__ADSPBF52x__"); \ - break; \ - case BFIN_CPU_BF527: \ - builtin_define ("__ADSPBF527__"); \ - builtin_define ("__ADSPBF52x__"); \ - break; \ - case BFIN_CPU_BF531: \ - builtin_define ("__ADSPBF531__"); \ - break; \ - case BFIN_CPU_BF532: \ - builtin_define ("__ADSPBF532__"); \ - break; \ - case BFIN_CPU_BF533: \ - builtin_define ("__ADSPBF533__"); \ - break; \ - case BFIN_CPU_BF534: \ - builtin_define ("__ADSPBF534__"); \ - break; \ - case BFIN_CPU_BF536: \ - builtin_define ("__ADSPBF536__"); \ - break; \ - case BFIN_CPU_BF537: \ - builtin_define ("__ADSPBF537__"); \ - break; \ - case BFIN_CPU_BF538: \ - builtin_define ("__ADSPBF538__"); \ - break; \ - case BFIN_CPU_BF539: \ - builtin_define ("__ADSPBF539__"); \ - break; \ - case BFIN_CPU_BF542M: \ - builtin_define ("__ADSPBF542M__"); \ - /* FALLTHRU */ \ - case BFIN_CPU_BF542: \ - builtin_define ("__ADSPBF542__"); \ - builtin_define ("__ADSPBF54x__"); \ - break; \ - case BFIN_CPU_BF544M: \ - builtin_define ("__ADSPBF544M__"); \ - /* FALLTHRU */ \ - case BFIN_CPU_BF544: \ - builtin_define ("__ADSPBF544__"); \ - builtin_define ("__ADSPBF54x__"); \ - break; \ - case BFIN_CPU_BF547M: \ - builtin_define ("__ADSPBF547M__"); \ - /* FALLTHRU */ \ - case BFIN_CPU_BF547: \ - builtin_define ("__ADSPBF547__"); \ - builtin_define ("__ADSPBF54x__"); \ - break; \ - case BFIN_CPU_BF548M: \ - builtin_define ("__ADSPBF548M__"); \ - /* FALLTHRU */ \ - case BFIN_CPU_BF548: \ - builtin_define ("__ADSPBF548__"); \ - builtin_define ("__ADSPBF54x__"); \ - break; \ - case BFIN_CPU_BF549M: \ - builtin_define ("__ADSPBF549M__"); \ - /* FALLTHRU */ \ - case BFIN_CPU_BF549: \ - builtin_define ("__ADSPBF549__"); \ - builtin_define ("__ADSPBF54x__"); \ - break; \ - case BFIN_CPU_BF561: \ - builtin_define ("__ADSPBF561__"); \ - break; \ - case BFIN_CPU_BF592: \ - builtin_define ("__ADSPBF592__"); \ - builtin_define ("__ADSPBF59x__"); \ - break; \ - } \ - \ - if (bfin_si_revision != -1) \ - { \ - /* space of 0xnnnn and a NUL */ \ - char *buf = XALLOCAVEC (char, 7); \ - \ - sprintf (buf, "0x%04x", bfin_si_revision); \ - builtin_define_with_value ("__SILICON_REVISION__", buf, 0); \ - } \ - \ - if (bfin_workarounds) \ - builtin_define ("__WORKAROUNDS_ENABLED"); \ - if (ENABLE_WA_SPECULATIVE_LOADS) \ - builtin_define ("__WORKAROUND_SPECULATIVE_LOADS"); \ - if (ENABLE_WA_SPECULATIVE_SYNCS) \ - builtin_define ("__WORKAROUND_SPECULATIVE_SYNCS"); \ - if (ENABLE_WA_INDIRECT_CALLS) \ - builtin_define ("__WORKAROUND_INDIRECT_CALLS"); \ - if (ENABLE_WA_RETS) \ - builtin_define ("__WORKAROUND_RETS"); \ - \ - if (TARGET_FDPIC) \ - { \ - builtin_define ("__BFIN_FDPIC__"); \ - builtin_define ("__FDPIC__"); \ - } \ - if (TARGET_ID_SHARED_LIBRARY && !TARGET_SEP_DATA) \ - builtin_define ("__ID_SHARED_LIB__"); \ - if (flag_no_builtin) \ - builtin_define ("__NO_BUILTIN"); \ - if (TARGET_MULTICORE) \ - builtin_define ("__BFIN_MULTICORE"); \ - if (TARGET_COREA) \ - builtin_define ("__BFIN_COREA"); \ - if (TARGET_COREB) \ - builtin_define ("__BFIN_COREB"); \ - if (TARGET_SDRAM) \ - builtin_define ("__BFIN_SDRAM"); \ - } \ +#define TARGET_CPU_CPP_BUILTINS() \ + do \ + { \ + builtin_define_std ("bfin"); \ + builtin_define_std ("BFIN"); \ + builtin_define ("__ADSPBLACKFIN__"); \ + builtin_define ("__ADSPLPBLACKFIN__"); \ + \ + switch (bfin_cpu_type) \ + { \ + case BFIN_CPU_UNKNOWN: \ + break; \ + case BFIN_CPU_BF512: \ + builtin_define ("__ADSPBF512__"); \ + builtin_define ("__ADSPBF51x__"); \ + break; \ + case BFIN_CPU_BF514: \ + builtin_define ("__ADSPBF514__"); \ + builtin_define ("__ADSPBF51x__"); \ + break; \ + case BFIN_CPU_BF516: \ + builtin_define ("__ADSPBF516__"); \ + builtin_define ("__ADSPBF51x__"); \ + break; \ + case BFIN_CPU_BF518: \ + builtin_define ("__ADSPBF518__"); \ + builtin_define ("__ADSPBF51x__"); \ + break; \ + case BFIN_CPU_BF522: \ + builtin_define ("__ADSPBF522__"); \ + builtin_define ("__ADSPBF52x__"); \ + break; \ + case BFIN_CPU_BF523: \ + builtin_define ("__ADSPBF523__"); \ + builtin_define ("__ADSPBF52x__"); \ + break; \ + case BFIN_CPU_BF524: \ + builtin_define ("__ADSPBF524__"); \ + builtin_define ("__ADSPBF52x__"); \ + break; \ + case BFIN_CPU_BF525: \ + builtin_define ("__ADSPBF525__"); \ + builtin_define ("__ADSPBF52x__"); \ + break; \ + case BFIN_CPU_BF526: \ + builtin_define ("__ADSPBF526__"); \ + builtin_define ("__ADSPBF52x__"); \ + break; \ + case BFIN_CPU_BF527: \ + builtin_define ("__ADSPBF527__"); \ + builtin_define ("__ADSPBF52x__"); \ + break; \ + case BFIN_CPU_BF531: \ + builtin_define ("__ADSPBF531__"); \ + break; \ + case BFIN_CPU_BF532: \ + builtin_define ("__ADSPBF532__"); \ + break; \ + case BFIN_CPU_BF533: \ + builtin_define ("__ADSPBF533__"); \ + break; \ + case BFIN_CPU_BF534: \ + builtin_define ("__ADSPBF534__"); \ + break; \ + case BFIN_CPU_BF536: \ + builtin_define ("__ADSPBF536__"); \ + break; \ + case BFIN_CPU_BF537: \ + builtin_define ("__ADSPBF537__"); \ + break; \ + case BFIN_CPU_BF538: \ + builtin_define ("__ADSPBF538__"); \ + break; \ + case BFIN_CPU_BF539: \ + builtin_define ("__ADSPBF539__"); \ + break; \ + case BFIN_CPU_BF542M: \ + builtin_define ("__ADSPBF542M__"); \ + /* FALLTHRU */ \ + case BFIN_CPU_BF542: \ + builtin_define ("__ADSPBF542__"); \ + builtin_define ("__ADSPBF54x__"); \ + break; \ + case BFIN_CPU_BF544M: \ + builtin_define ("__ADSPBF544M__"); \ + /* FALLTHRU */ \ + case BFIN_CPU_BF544: \ + builtin_define ("__ADSPBF544__"); \ + builtin_define ("__ADSPBF54x__"); \ + break; \ + case BFIN_CPU_BF547M: \ + builtin_define ("__ADSPBF547M__"); \ + /* FALLTHRU */ \ + case BFIN_CPU_BF547: \ + builtin_define ("__ADSPBF547__"); \ + builtin_define ("__ADSPBF54x__"); \ + break; \ + case BFIN_CPU_BF548M: \ + builtin_define ("__ADSPBF548M__"); \ + /* FALLTHRU */ \ + case BFIN_CPU_BF548: \ + builtin_define ("__ADSPBF548__"); \ + builtin_define ("__ADSPBF54x__"); \ + break; \ + case BFIN_CPU_BF549M: \ + builtin_define ("__ADSPBF549M__"); \ + /* FALLTHRU */ \ + case BFIN_CPU_BF549: \ + builtin_define ("__ADSPBF549__"); \ + builtin_define ("__ADSPBF54x__"); \ + break; \ + case BFIN_CPU_BF561: \ + builtin_define ("__ADSPBF561__"); \ + break; \ + case BFIN_CPU_BF592: \ + builtin_define ("__ADSPBF592__"); \ + builtin_define ("__ADSPBF59x__"); \ + break; \ + } \ + \ + if (bfin_si_revision != -1) \ + { \ + /* space of 0xnnnn and a NUL */ \ + char *buf = XALLOCAVEC (char, 7); \ + \ + sprintf (buf, "0x%04x", bfin_si_revision); \ + builtin_define_with_value ("__SILICON_REVISION__", buf, 0); \ + } \ + \ + if (bfin_workarounds) \ + builtin_define ("__WORKAROUNDS_ENABLED"); \ + if (ENABLE_WA_SPECULATIVE_LOADS) \ + builtin_define ("__WORKAROUND_SPECULATIVE_LOADS"); \ + if (ENABLE_WA_SPECULATIVE_SYNCS) \ + builtin_define ("__WORKAROUND_SPECULATIVE_SYNCS"); \ + if (ENABLE_WA_INDIRECT_CALLS) \ + builtin_define ("__WORKAROUND_INDIRECT_CALLS"); \ + if (ENABLE_WA_RETS) \ + builtin_define ("__WORKAROUND_RETS"); \ + \ + if (TARGET_FDPIC) \ + { \ + builtin_define ("__BFIN_FDPIC__"); \ + builtin_define ("__FDPIC__"); \ + } \ + if (TARGET_ID_SHARED_LIBRARY \ + && !TARGET_SEP_DATA) \ + builtin_define ("__ID_SHARED_LIB__"); \ + if (flag_no_builtin) \ + builtin_define ("__NO_BUILTIN"); \ + if (TARGET_MULTICORE) \ + builtin_define ("__BFIN_MULTICORE"); \ + if (TARGET_COREA) \ + builtin_define ("__BFIN_COREA"); \ + if (TARGET_COREB) \ + builtin_define ("__BFIN_COREB"); \ + if (TARGET_SDRAM) \ + builtin_define ("__BFIN_SDRAM"); \ + } \ while (0) #endif -/* Rust target CPU info for this machine. Could not add new compilation unit - without significant modification to target, so included as macro instead. */ -#define TARGET_RUST_CPU_INFO() \ - do \ - { \ - rust_add_target_info ("target_arch", "bfin"); \ - /* TODO maybe add other features? based on old llvm so ones missing */ \ - if (TARGET_SDRAM) \ - rust_add_target_info ("target_feature", "sdram"); \ - if (TARGET_ICPLB) \ - rust_add_target_info ("target_feature", "icplb"); \ - if (ENABLE_WA_05000074) \ - rust_add_target_info ("target_feature", "mi-shift-anomaly"); \ - if (ENABLE_WA_SPECULATIVE_SYNCS) \ - rust_add_target_info ("target_feature", "csync-anomaly"); \ - if (ENABLE_WA_SPECULATIVE_LOADS) \ - rust_add_target_info ("target_feature", "specld-anomaly"); \ - if (ENABLE_WA_05000257) \ - rust_add_target_info ("target_feature", "hwloop-anomaly"); \ - if (ENABLE_WA_05000283) \ - rust_add_target_info ("target_feature", "mmr-stall-anomaly"); \ - if (ENABLE_WA_LOAD_LCREGS) \ - rust_add_target_info ("target_feature", "lcregs-anomaly"); \ - if (ENABLE_WA_05000315) \ - rust_add_target_info ("target_feature", "killed-mmr-anomaly"); \ - if (ENABLE_WA_RETS) \ - rust_add_target_info ("target_feature", "rets-anomaly"); \ - if (ENABLE_WA_INDIRECT_CALLS) \ - rust_add_target_info ("target_feature", "ind-call-anomaly"); \ - } \ - while (0) - -#define DRIVER_SELF_SPECS \ - SUBTARGET_DRIVER_SELF_SPECS "\ +#define DRIVER_SELF_SPECS SUBTARGET_DRIVER_SELF_SPECS "\ %{mleaf-id-shared-library:%{!mid-shared-library:-mid-shared-library}} \ %{mfdpic:%{!fpic:%{!fpie:%{!fPIC:%{!fPIE:\ %{!fno-pic:%{!fno-pie:%{!fno-PIC:%{!fno-PIE:-fpie}}}}}}}}} \ " #ifndef SUBTARGET_DRIVER_SELF_SPECS -#define SUBTARGET_DRIVER_SELF_SPECS +# define SUBTARGET_DRIVER_SELF_SPECS #endif -#define LINK_GCC_C_SEQUENCE_SPEC \ - "\ +#define LINK_GCC_C_SEQUENCE_SPEC "\ %{mfast-fp:-lbffastfp} %G %{!nolibc:%L} %{mfast-fp:-lbffastfp} %G \ " -#undef ASM_SPEC -#define ASM_SPEC \ - "\ +#undef ASM_SPEC +#define ASM_SPEC "\ %{mno-fdpic:-mnopic} %{mfdpic}" -#define LINK_SPEC \ - "\ +#define LINK_SPEC "\ %{h*} %{v:-V} \ %{mfdpic:-melf32bfinfd -z text} \ %{static:-dn -Bstatic} \ @@ -255,7 +220,7 @@ -init __init -fini __fini " /* Generate DSP instructions, like DSP halfword loads */ -#define TARGET_DSP (1) +#define TARGET_DSP (1) #define TARGET_DEFAULT 0 @@ -264,8 +229,8 @@ extern const char *bfin_library_id_string; -#define FUNCTION_MODE SImode -#define Pmode SImode +#define FUNCTION_MODE SImode +#define Pmode SImode /* store-condition-codes instructions store 0 for false This is the value stored for true. */ @@ -308,7 +273,7 @@ extern const char *bfin_library_id_string; #define FDPIC_FPTR_REGNO REG_P1 #define FDPIC_REGNO REG_P3 -#define OUR_FDPIC_REG get_hard_reg_initial_val (SImode, FDPIC_REGNO) +#define OUR_FDPIC_REG get_hard_reg_initial_val (SImode, FDPIC_REGNO) /* A static chain register for nested functions. We need to use a call-clobbered register for this. */ @@ -330,10 +295,10 @@ extern const char *bfin_library_id_string; /* Define this if the above stack space is to be considered part of the * space allocated by the caller. */ #define OUTGOING_REG_PARM_STACK_SPACE(FNTYPE) 1 - + /* Define this if the maximum size of all the outgoing args is to be accumulated and pushed during the prologue. The amount can be - found in the variable crtl->outgoing_args_size. */ + found in the variable crtl->outgoing_args_size. */ #define ACCUMULATE_OUTGOING_ARGS 1 /*#define DATA_ALIGNMENT(TYPE, BASIC-ALIGN) for arrays.. */ @@ -351,7 +316,7 @@ extern const char *bfin_library_id_string; #define LOCAL_ALIGNMENT(TYPE, ALIGN) bfin_local_alignment ((TYPE), (ALIGN)) #define TRAMPOLINE_SIZE (TARGET_FDPIC ? 30 : 18) - + /* Definitions for register eliminations. This is an array of structures. Each structure initializes one pair @@ -365,21 +330,17 @@ extern const char *bfin_library_id_string; circumstances. The hard frame pointer is not used before reload and so it is not eligible for elimination. */ -#define ELIMINABLE_REGS \ - { \ - {ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ - {ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ - { \ - FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM \ - } \ - } +#define ELIMINABLE_REGS \ +{{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ + { ARG_POINTER_REGNUM, FRAME_POINTER_REGNUM}, \ + { FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}} \ /* Define the offset between two registers, one to be eliminated, and the other its replacement, at the start of a routine. */ -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ +#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ ((OFFSET) = bfin_initial_elimination_offset ((FROM), (TO))) - + /* This processor has 8 data register for doing arithmetic 8 pointer register for doing addressing, including @@ -402,54 +363,50 @@ extern const char *bfin_library_id_string; #define IREG_P(X) (REG_P (X) && I_REGNO_P (REGNO (X))) #define DPREG_P(X) (REG_P (X) && DP_REGNO_P (REGNO (X))) -#define REGISTER_NAMES \ - { \ - "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "P0", "P1", "P2", "P3", \ - "P4", "P5", "SP", "FP", "I0", "I1", "I2", "I3", "B0", "B1", "B2", "B3", \ - "L0", "L1", "L2", "L3", "M0", "M1", "M2", "M3", "A0", "A1", "CC", \ - "RETS", "RETI", "RETX", "RETN", "RETE", "ASTAT", "SEQSTAT", "USP", \ - "ARGP", "LT0", "LT1", "LC0", "LC1", "LB0", "LB1" \ - } - -#define SHORT_REGISTER_NAMES \ - { \ - "R0.L", "R1.L", "R2.L", "R3.L", "R4.L", "R5.L", "R6.L", "R7.L", "P0.L", \ - "P1.L", "P2.L", "P3.L", "P4.L", "P5.L", "SP.L", "FP.L", "I0.L", "I1.L", \ - "I2.L", "I3.L", "B0.L", "B1.L", "B2.L", "B3.L", "L0.L", "L1.L", "L2.L", \ - "L3.L", "M0.L", "M1.L", "M2.L", "M3.L", \ - } - -#define HIGH_REGISTER_NAMES \ - { \ - "R0.H", "R1.H", "R2.H", "R3.H", "R4.H", "R5.H", "R6.H", "R7.H", "P0.H", \ - "P1.H", "P2.H", "P3.H", "P4.H", "P5.H", "SP.H", "FP.H", "I0.H", "I1.H", \ - "I2.H", "I3.H", "B0.H", "B1.H", "B2.H", "B3.H", "L0.H", "L1.H", "L2.H", \ - "L3.H", "M0.H", "M1.H", "M2.H", "M3.H", \ - } - -#define DREGS_PAIR_NAMES \ - { \ - "R1:0.p", 0, "R3:2.p", 0, "R5:4.p", 0, "R7:6.p", 0, \ - } - -#define BYTE_REGISTER_NAMES \ - { \ - "R0.B", "R1.B", "R2.B", "R3.B", "R4.B", "R5.B", "R6.B", "R7.B", \ - } +#define REGISTER_NAMES { \ + "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", \ + "P0", "P1", "P2", "P3", "P4", "P5", "SP", "FP", \ + "I0", "I1", "I2", "I3", "B0", "B1", "B2", "B3", \ + "L0", "L1", "L2", "L3", "M0", "M1", "M2", "M3", \ + "A0", "A1", \ + "CC", \ + "RETS", "RETI", "RETX", "RETN", "RETE", "ASTAT", "SEQSTAT", "USP", \ + "ARGP", \ + "LT0", "LT1", "LC0", "LC1", "LB0", "LB1" \ +} + +#define SHORT_REGISTER_NAMES { \ + "R0.L", "R1.L", "R2.L", "R3.L", "R4.L", "R5.L", "R6.L", "R7.L", \ + "P0.L", "P1.L", "P2.L", "P3.L", "P4.L", "P5.L", "SP.L", "FP.L", \ + "I0.L", "I1.L", "I2.L", "I3.L", "B0.L", "B1.L", "B2.L", "B3.L", \ + "L0.L", "L1.L", "L2.L", "L3.L", "M0.L", "M1.L", "M2.L", "M3.L", } + +#define HIGH_REGISTER_NAMES { \ + "R0.H", "R1.H", "R2.H", "R3.H", "R4.H", "R5.H", "R6.H", "R7.H", \ + "P0.H", "P1.H", "P2.H", "P3.H", "P4.H", "P5.H", "SP.H", "FP.H", \ + "I0.H", "I1.H", "I2.H", "I3.H", "B0.H", "B1.H", "B2.H", "B3.H", \ + "L0.H", "L1.H", "L2.H", "L3.H", "M0.H", "M1.H", "M2.H", "M3.H", } + +#define DREGS_PAIR_NAMES { \ + "R1:0.p", 0, "R3:2.p", 0, "R5:4.p", 0, "R7:6.p", 0, } + +#define BYTE_REGISTER_NAMES { \ + "R0.B", "R1.B", "R2.B", "R3.B", "R4.B", "R5.B", "R6.B", "R7.B", } + /* 1 for registers that have pervasive standard uses and are not available for the register allocator. */ -#define FIXED_REGISTERS \ - /*r0 r1 r2 r3 r4 r5 r6 r7 p0 p1 p2 p3 p4 p5 p6 p7 */ \ - { \ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, \ - 0, /*i0 i1 i2 i3 b0 b1 b2 b3 l0 l1 l2 l3 m0 m1 m2 m3 */ \ - 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, \ - 0, /*a0 a1 cc rets/i/x/n/e astat seqstat usp argp lt0/1 lc0/1 */ \ - 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*lb0/1 */ \ - 1, 1 \ - } +#define FIXED_REGISTERS \ +/*r0 r1 r2 r3 r4 r5 r6 r7 p0 p1 p2 p3 p4 p5 p6 p7 */ \ +{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, \ +/*i0 i1 i2 i3 b0 b1 b2 b3 l0 l1 l2 l3 m0 m1 m2 m3 */ \ + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, \ +/*a0 a1 cc rets/i/x/n/e astat seqstat usp argp lt0/1 lc0/1 */ \ + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ +/*lb0/1 */ \ + 1, 1 \ +} /* 1 for registers not available across function calls. These must include the FIXED_REGISTERS and also any @@ -458,16 +415,16 @@ extern const char *bfin_library_id_string; and the register where structure-value addresses are passed. Aside from that, you can include as many other registers as you like. */ -#define CALL_USED_REGISTERS \ - /*r0 r1 r2 r3 r4 r5 r6 r7 p0 p1 p2 p3 p4 p5 p6 p7 */ \ - { \ - 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, \ - 0, /*i0 i1 i2 i3 b0 b1 b2 b3 l0 l1 l2 l3 m0 m1 m2 m3 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ - 1, /*a0 a1 cc rets/i/x/n/e astat seqstat usp argp lt0/1 lc0/1 */ \ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /*lb0/1 */ \ - 1, 1 \ - } +#define CALL_USED_REGISTERS \ +/*r0 r1 r2 r3 r4 r5 r6 r7 p0 p1 p2 p3 p4 p5 p6 p7 */ \ +{ 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, \ +/*i0 i1 i2 i3 b0 b1 b2 b3 l0 l1 l2 l3 m0 m1 m2 m3 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ +/*a0 a1 cc rets/i/x/n/e astat seqstat usp argp lt0/1 lc0/1 */ \ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \ +/*lb0/1 */ \ + 1, 1 \ +} /* Order in which to allocate registers. Each register must be listed once, even those in FIXED_REGISTERS. List frame pointer @@ -475,15 +432,17 @@ extern const char *bfin_library_id_string; registers listed in CALL_USED_REGISTERS, keeping the others available for storage of persistent values. */ -#define REG_ALLOC_ORDER \ - { \ - REG_R0, REG_R1, REG_R2, REG_R3, REG_R7, REG_R6, REG_R5, REG_R4, REG_P2, \ - REG_P1, REG_P0, REG_P5, REG_P4, REG_P3, REG_P6, REG_P7, REG_A0, REG_A1, \ - REG_I0, REG_I1, REG_I2, REG_I3, REG_B0, REG_B1, REG_B2, REG_B3, REG_L0, \ - REG_L1, REG_L2, REG_L3, REG_M0, REG_M1, REG_M2, REG_M3, REG_RETS, \ - REG_RETI, REG_RETX, REG_RETN, REG_RETE, REG_ASTAT, REG_SEQSTAT, REG_USP, \ - REG_CC, REG_ARGP, REG_LT0, REG_LT1, REG_LC0, REG_LC1, REG_LB0, REG_LB1 \ - } +#define REG_ALLOC_ORDER \ +{ REG_R0, REG_R1, REG_R2, REG_R3, REG_R7, REG_R6, REG_R5, REG_R4, \ + REG_P2, REG_P1, REG_P0, REG_P5, REG_P4, REG_P3, REG_P6, REG_P7, \ + REG_A0, REG_A1, \ + REG_I0, REG_I1, REG_I2, REG_I3, REG_B0, REG_B1, REG_B2, REG_B3, \ + REG_L0, REG_L1, REG_L2, REG_L3, REG_M0, REG_M1, REG_M2, REG_M3, \ + REG_RETS, REG_RETI, REG_RETX, REG_RETN, REG_RETE, \ + REG_ASTAT, REG_SEQSTAT, REG_USP, \ + REG_CC, REG_ARGP, \ + REG_LT0, REG_LT1, REG_LC0, REG_LC1, REG_LB0, REG_LB1 \ +} /* Define the classes of registers for register constraints in the machine description. Also define ranges of constants. @@ -505,6 +464,7 @@ extern const char *bfin_library_id_string; For any two classes, it is very desirable that there be another class that represents their union. */ + enum reg_class { NO_REGS, @@ -512,8 +472,7 @@ enum reg_class BREGS, LREGS, MREGS, - CIRCREGS, /* Circular buffering registers, Ix, Bx, Lx together form. See - Automatic Circular Buffering. */ + CIRCREGS, /* Circular buffering registers, Ix, Bx, Lx together form. See Automatic Circular Buffering. */ DAGREGS, EVEN_AREGS, ODD_AREGS, @@ -543,25 +502,52 @@ enum reg_class LB_REGS, PROLOGUE_REGS, NON_A_CC_REGS, - ALL_REGS, - LIM_REG_CLASSES + ALL_REGS, LIM_REG_CLASSES }; -#define N_REG_CLASSES ((int) LIM_REG_CLASSES) +#define N_REG_CLASSES ((int)LIM_REG_CLASSES) #define GENERAL_REGS DPREGS /* Give names of register classes as strings for dump file. */ -#define REG_CLASS_NAMES \ - { \ - "NO_REGS", "IREGS", "BREGS", "LREGS", "MREGS", "CIRCREGS", "DAGREGS", \ - "EVEN_AREGS", "ODD_AREGS", "AREGS", "CCREGS", "EVEN_DREGS", "ODD_DREGS", \ - "D0REGS", "D1REGS", "D2REGS", "D3REGS", "D4REGS", "D5REGS", "D6REGS", \ - "D7REGS", "DREGS", "P0REGS", "FDPIC_REGS", "FDPIC_FPTR_REGS", \ - "PREGS_CLOBBERED", "PREGS", "IPREGS", "DPREGS", "MOST_REGS", "LT_REGS", \ - "LC_REGS", "LB_REGS", "PROLOGUE_REGS", "NON_A_CC_REGS", "ALL_REGS" \ - } +#define REG_CLASS_NAMES \ +{ "NO_REGS", \ + "IREGS", \ + "BREGS", \ + "LREGS", \ + "MREGS", \ + "CIRCREGS", \ + "DAGREGS", \ + "EVEN_AREGS", \ + "ODD_AREGS", \ + "AREGS", \ + "CCREGS", \ + "EVEN_DREGS", \ + "ODD_DREGS", \ + "D0REGS", \ + "D1REGS", \ + "D2REGS", \ + "D3REGS", \ + "D4REGS", \ + "D5REGS", \ + "D6REGS", \ + "D7REGS", \ + "DREGS", \ + "P0REGS", \ + "FDPIC_REGS", \ + "FDPIC_FPTR_REGS", \ + "PREGS_CLOBBERED", \ + "PREGS", \ + "IPREGS", \ + "DPREGS", \ + "MOST_REGS", \ + "LT_REGS", \ + "LC_REGS", \ + "LB_REGS", \ + "PROLOGUE_REGS", \ + "NON_A_CC_REGS", \ + "ALL_REGS" } /* An initializer containing the contents of the register classes, as integers which are bit masks. The Nth integer specifies the contents of class N. @@ -577,145 +563,102 @@ enum reg_class /* NOTE: DSP registers, IREGS - AREGS, are not GENERAL_REGS. We use MOST_REGS as the union of DPREGS and DAGREGS. */ -#define REG_CLASS_CONTENTS \ - /* 31 - 0 63-32 */ \ - { \ - {0x00000000, 0}, /* NO_REGS */ \ - {0x000f0000, 0}, /* IREGS */ \ - {0x00f00000, 0}, /* BREGS */ \ - {0x0f000000, 0}, /* LREGS */ \ - {0xf0000000, 0}, /* MREGS */ \ - {0x0fff0000, 0}, /* CIRCREGS */ \ - {0xffff0000, 0}, /* DAGREGS */ \ - {0x00000000, 0x1}, /* EVEN_AREGS */ \ - {0x00000000, 0x2}, /* ODD_AREGS */ \ - {0x00000000, 0x3}, /* AREGS */ \ - {0x00000000, 0x4}, /* CCREGS */ \ - {0x00000055, 0}, /* EVEN_DREGS */ \ - {0x000000aa, 0}, /* ODD_DREGS */ \ - {0x00000001, 0}, /* D0REGS */ \ - {0x00000002, 0}, /* D1REGS */ \ - {0x00000004, 0}, /* D2REGS */ \ - {0x00000008, 0}, /* D3REGS */ \ - {0x00000010, 0}, /* D4REGS */ \ - {0x00000020, 0}, /* D5REGS */ \ - {0x00000040, 0}, /* D6REGS */ \ - {0x00000080, 0}, /* D7REGS */ \ - {0x000000ff, 0}, /* DREGS */ \ - {0x00000100, 0x000}, /* P0REGS */ \ - {0x00000800, 0x000}, /* FDPIC_REGS */ \ - {0x00000200, 0x000}, /* FDPIC_FPTR_REGS */ \ - {0x00004700, 0x800}, /* PREGS_CLOBBERED */ \ - {0x0000ff00, 0x800}, /* PREGS */ \ - {0x000fff00, 0x800}, /* IPREGS */ \ - {0x0000ffff, 0x800}, /* DPREGS */ \ - {0xffffffff, 0x800}, /* MOST_REGS */ \ - {0x00000000, 0x3000}, /* LT_REGS */ \ - {0x00000000, 0xc000}, /* LC_REGS */ \ - {0x00000000, 0x30000}, /* LB_REGS */ \ - {0x00000000, 0x3f7f8}, /* PROLOGUE_REGS */ \ - {0xffffffff, 0x3fff8}, /* NON_A_CC_REGS */ \ - { \ - 0xffffffff, 0x3ffff \ - } \ - } /* ALL_REGS */ - -#define IREG_POSSIBLE_P(OUTER) \ - ((OUTER) == POST_INC || (OUTER) == PRE_INC || (OUTER) == POST_DEC \ - || (OUTER) == PRE_DEC || (OUTER) == MEM || (OUTER) == ADDRESS) - -#define MODE_CODE_BASE_REG_CLASS(MODE, AS, OUTER, INDEX) \ +#define REG_CLASS_CONTENTS \ + /* 31 - 0 63-32 */ \ +{ { 0x00000000, 0 }, /* NO_REGS */ \ + { 0x000f0000, 0 }, /* IREGS */ \ + { 0x00f00000, 0 }, /* BREGS */ \ + { 0x0f000000, 0 }, /* LREGS */ \ + { 0xf0000000, 0 }, /* MREGS */ \ + { 0x0fff0000, 0 }, /* CIRCREGS */ \ + { 0xffff0000, 0 }, /* DAGREGS */ \ + { 0x00000000, 0x1 }, /* EVEN_AREGS */ \ + { 0x00000000, 0x2 }, /* ODD_AREGS */ \ + { 0x00000000, 0x3 }, /* AREGS */ \ + { 0x00000000, 0x4 }, /* CCREGS */ \ + { 0x00000055, 0 }, /* EVEN_DREGS */ \ + { 0x000000aa, 0 }, /* ODD_DREGS */ \ + { 0x00000001, 0 }, /* D0REGS */ \ + { 0x00000002, 0 }, /* D1REGS */ \ + { 0x00000004, 0 }, /* D2REGS */ \ + { 0x00000008, 0 }, /* D3REGS */ \ + { 0x00000010, 0 }, /* D4REGS */ \ + { 0x00000020, 0 }, /* D5REGS */ \ + { 0x00000040, 0 }, /* D6REGS */ \ + { 0x00000080, 0 }, /* D7REGS */ \ + { 0x000000ff, 0 }, /* DREGS */ \ + { 0x00000100, 0x000 }, /* P0REGS */ \ + { 0x00000800, 0x000 }, /* FDPIC_REGS */ \ + { 0x00000200, 0x000 }, /* FDPIC_FPTR_REGS */ \ + { 0x00004700, 0x800 }, /* PREGS_CLOBBERED */ \ + { 0x0000ff00, 0x800 }, /* PREGS */ \ + { 0x000fff00, 0x800 }, /* IPREGS */ \ + { 0x0000ffff, 0x800 }, /* DPREGS */ \ + { 0xffffffff, 0x800 }, /* MOST_REGS */\ + { 0x00000000, 0x3000 }, /* LT_REGS */\ + { 0x00000000, 0xc000 }, /* LC_REGS */\ + { 0x00000000, 0x30000 }, /* LB_REGS */\ + { 0x00000000, 0x3f7f8 }, /* PROLOGUE_REGS */\ + { 0xffffffff, 0x3fff8 }, /* NON_A_CC_REGS */\ + { 0xffffffff, 0x3ffff }} /* ALL_REGS */ + +#define IREG_POSSIBLE_P(OUTER) \ + ((OUTER) == POST_INC || (OUTER) == PRE_INC \ + || (OUTER) == POST_DEC || (OUTER) == PRE_DEC \ + || (OUTER) == MEM || (OUTER) == ADDRESS) + +#define MODE_CODE_BASE_REG_CLASS(MODE, AS, OUTER, INDEX) \ ((MODE) == HImode && IREG_POSSIBLE_P (OUTER) ? IPREGS : PREGS) -#define INDEX_REG_CLASS PREGS +#define INDEX_REG_CLASS PREGS -#define REGNO_OK_FOR_BASE_STRICT_P(X, MODE, OUTER, INDEX) \ - (P_REGNO_P (X) || (X) == REG_ARGP \ - || (IREG_POSSIBLE_P (OUTER) && (MODE) == HImode && I_REGNO_P (X))) +#define REGNO_OK_FOR_BASE_STRICT_P(X, MODE, OUTER, INDEX) \ + (P_REGNO_P (X) || (X) == REG_ARGP \ + || (IREG_POSSIBLE_P (OUTER) && (MODE) == HImode \ + && I_REGNO_P (X))) -#define REGNO_OK_FOR_BASE_NONSTRICT_P(X, MODE, OUTER, INDEX) \ - ((X) >= FIRST_PSEUDO_REGISTER \ +#define REGNO_OK_FOR_BASE_NONSTRICT_P(X, MODE, OUTER, INDEX) \ + ((X) >= FIRST_PSEUDO_REGISTER \ || REGNO_OK_FOR_BASE_STRICT_P (X, MODE, OUTER, INDEX)) #ifdef REG_OK_STRICT -#define REGNO_MODE_CODE_OK_FOR_BASE_P(X, MODE, AS, OUTER, INDEX) \ +#define REGNO_MODE_CODE_OK_FOR_BASE_P(X, MODE, AS, OUTER, INDEX) \ REGNO_OK_FOR_BASE_STRICT_P (X, MODE, OUTER, INDEX) #else -#define REGNO_MODE_CODE_OK_FOR_BASE_P(X, MODE, AS, OUTER, INDEX) \ +#define REGNO_MODE_CODE_OK_FOR_BASE_P(X, MODE, AS, OUTER, INDEX) \ REGNO_OK_FOR_BASE_NONSTRICT_P (X, MODE, OUTER, INDEX) #endif -#define REGNO_OK_FOR_INDEX_P(X) 0 +#define REGNO_OK_FOR_INDEX_P(X) 0 /* The same information, inverted: Return the class number of the smallest class containing reg number REGNO. This could be a conditional expression or could index an array. */ -#define REGNO_REG_CLASS(REGNO) \ - ((REGNO) == REG_R0 \ - ? D0REGS \ - : (REGNO) == REG_R1 \ - ? D1REGS \ - : (REGNO) == REG_R2 \ - ? D2REGS \ - : (REGNO) == REG_R3 \ - ? D3REGS \ - : (REGNO) == REG_R4 \ - ? D4REGS \ - : (REGNO) == REG_R5 \ - ? D5REGS \ - : (REGNO) == REG_R6 \ - ? D6REGS \ - : (REGNO) == REG_R7 \ - ? D7REGS \ - : (REGNO) == REG_P0 \ - ? P0REGS \ - : (REGNO) < REG_I0 \ - ? PREGS \ - : (REGNO) == REG_ARGP \ - ? PREGS \ - : (REGNO) >= REG_I0 \ - && (REGNO) <= REG_I3 \ - ? IREGS \ - : (REGNO) >= REG_L0 \ - && (REGNO) <= REG_L3 \ - ? LREGS \ - : (REGNO) >= REG_B0 \ - && (REGNO) \ - <= REG_B3 \ - ? BREGS \ - : (REGNO) >= REG_M0 \ - && (REGNO) \ - <= REG_M3 \ - ? MREGS \ - : (REGNO) \ - == REG_A0 \ - || (REGNO) \ - == REG_A1 \ - ? AREGS \ - : (REGNO) \ - == REG_LT0 \ - || (REGNO) \ - == REG_LT1 \ - ? LT_REGS \ - : (REGNO) \ - == REG_LC0 \ - || (REGNO) \ - == REG_LC1 \ - ? LC_REGS \ - : (REGNO) \ - == REG_LB0 \ - || (REGNO) \ - == REG_LB1 \ - ? LB_REGS \ - : (REGNO) \ - == REG_CC \ - ? CCREGS \ - : (REGNO) \ - >= REG_RETS \ - ? PROLOGUE_REGS \ - : NO_REGS) +#define REGNO_REG_CLASS(REGNO) \ +((REGNO) == REG_R0 ? D0REGS \ + : (REGNO) == REG_R1 ? D1REGS \ + : (REGNO) == REG_R2 ? D2REGS \ + : (REGNO) == REG_R3 ? D3REGS \ + : (REGNO) == REG_R4 ? D4REGS \ + : (REGNO) == REG_R5 ? D5REGS \ + : (REGNO) == REG_R6 ? D6REGS \ + : (REGNO) == REG_R7 ? D7REGS \ + : (REGNO) == REG_P0 ? P0REGS \ + : (REGNO) < REG_I0 ? PREGS \ + : (REGNO) == REG_ARGP ? PREGS \ + : (REGNO) >= REG_I0 && (REGNO) <= REG_I3 ? IREGS \ + : (REGNO) >= REG_L0 && (REGNO) <= REG_L3 ? LREGS \ + : (REGNO) >= REG_B0 && (REGNO) <= REG_B3 ? BREGS \ + : (REGNO) >= REG_M0 && (REGNO) <= REG_M3 ? MREGS \ + : (REGNO) == REG_A0 || (REGNO) == REG_A1 ? AREGS \ + : (REGNO) == REG_LT0 || (REGNO) == REG_LT1 ? LT_REGS \ + : (REGNO) == REG_LC0 || (REGNO) == REG_LC1 ? LC_REGS \ + : (REGNO) == REG_LB0 || (REGNO) == REG_LB1 ? LB_REGS \ + : (REGNO) == REG_CC ? CCREGS \ + : (REGNO) >= REG_RETS ? PROLOGUE_REGS \ + : NO_REGS) /* When this hook returns true for MODE, the compiler allows registers explicitly used in the rtl to be used as spill registers @@ -725,10 +668,9 @@ enum reg_class /* Return the maximum number of consecutive registers needed to represent mode MODE in a register of class CLASS. */ -#define CLASS_MAX_NREGS(CLASS, MODE) \ - ((MODE) == V2PDImode && (CLASS) == AREGS \ - ? 2 \ - : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) +#define CLASS_MAX_NREGS(CLASS, MODE) \ + ((MODE) == V2PDImode && (CLASS) == AREGS ? 2 \ + : ((GET_MODE_SIZE (MODE) + UNITS_PER_WORD - 1) / UNITS_PER_WORD)) /* A C expression that is nonzero if hard register TO can be considered for use as a rename register for FROM register */ @@ -739,52 +681,41 @@ enum reg_class class to use when it is necessary to copy value X into a register in class CLASS. The value is a register class; perhaps CLASS, or perhaps another, smaller class. */ -#define PREFERRED_RELOAD_CLASS(X, CLASS) \ - (GET_CODE (X) == POST_INC || GET_CODE (X) == POST_DEC \ - || GET_CODE (X) == PRE_DEC \ - ? PREGS \ - : (CLASS)) +#define PREFERRED_RELOAD_CLASS(X, CLASS) \ + (GET_CODE (X) == POST_INC \ + || GET_CODE (X) == POST_DEC \ + || GET_CODE (X) == PRE_DEC ? PREGS : (CLASS)) /* Function Calling Conventions. */ /* The type of the current function; normal functions are of type SUBROUTINE. */ -typedef enum -{ - SUBROUTINE, - INTERRUPT_HANDLER, - EXCPT_HANDLER, - NMI_HANDLER +typedef enum { + SUBROUTINE, INTERRUPT_HANDLER, EXCPT_HANDLER, NMI_HANDLER } e_funkind; -#define FUNCTION_RETURN_REGISTERS \ - { \ - REG_RETS, REG_RETI, REG_RETX, REG_RETN \ - } +#define FUNCTION_RETURN_REGISTERS { REG_RETS, REG_RETI, REG_RETX, REG_RETN } -#define FUNCTION_ARG_REGISTERS \ - { \ - REG_R0, REG_R1, REG_R2, -1 \ - } +#define FUNCTION_ARG_REGISTERS { REG_R0, REG_R1, REG_R2, -1 } /* Flags for the call/call_value rtl operations set up by function_arg */ -#define CALL_NORMAL 0x00000000 /* no special processing */ -#define CALL_LONG 0x00000001 /* always call indirect */ -#define CALL_SHORT 0x00000002 /* always call by symbol */ - -typedef struct -{ - int words; /* # words passed so far */ - int nregs; /* # registers available for passing */ - int *arg_regs; /* array of register -1 terminated */ - int call_cookie; /* Do special things for this call */ +#define CALL_NORMAL 0x00000000 /* no special processing */ +#define CALL_LONG 0x00000001 /* always call indirect */ +#define CALL_SHORT 0x00000002 /* always call by symbol */ + +typedef struct { + int words; /* # words passed so far */ + int nregs; /* # registers available for passing */ + int *arg_regs; /* array of register -1 terminated */ + int call_cookie; /* Do special things for this call */ } CUMULATIVE_ARGS; #define FUNCTION_ARG_REGNO_P(REGNO) function_arg_regno_p (REGNO) + /* Initialize a variable CUM of type CUMULATIVE_ARGS for a call to a function whose data type is FNTYPE. For a library call, FNTYPE is 0. */ -#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ +#define INIT_CUMULATIVE_ARGS(CUM,FNTYPE,LIBNAME,INDIRECT, N_NAMED_ARGS) \ (init_cumulative_args (&CUM, FNTYPE, LIBNAME)) /* Define how to find the value returned by a function. @@ -795,13 +726,14 @@ typedef struct #define VALUE_REGNO(MODE) (REG_R0) -#define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), VALUE_REGNO (TYPE_MODE (VALTYPE))) +#define FUNCTION_VALUE(VALTYPE, FUNC) \ + gen_rtx_REG (TYPE_MODE (VALTYPE), \ + VALUE_REGNO(TYPE_MODE(VALTYPE))) /* Define how to find the value returned by a library function assuming the value has mode MODE. */ -#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, VALUE_REGNO (MODE)) +#define LIBCALL_VALUE(MODE) gen_rtx_REG (MODE, VALUE_REGNO(MODE)) #define FUNCTION_VALUE_REGNO_P(N) ((N) == REG_R0) @@ -818,11 +750,11 @@ typedef struct #define INCOMING_FRAME_SP_OFFSET 0 /* Describe how we implement __builtin_eh_return. */ -#define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) : INVALID_REGNUM) -#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, REG_P2) -#define EH_RETURN_HANDLER_RTX \ - gen_frame_mem (Pmode, \ - plus_constant (Pmode, frame_pointer_rtx, UNITS_PER_WORD)) +#define EH_RETURN_DATA_REGNO(N) ((N) < 2 ? (N) : INVALID_REGNUM) +#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, REG_P2) +#define EH_RETURN_HANDLER_RTX \ + gen_frame_mem (Pmode, plus_constant (Pmode, frame_pointer_rtx, \ + UNITS_PER_WORD)) /* Addressing Modes */ @@ -832,12 +764,12 @@ typedef struct would ever accept. */ #define MAX_REGS_PER_ADDRESS 1 -#define LEGITIMATE_MODE_FOR_AUTOINC_P(MODE) \ - (GET_MODE_SIZE (MODE) <= 4 || (MODE) == PDImode) +#define LEGITIMATE_MODE_FOR_AUTOINC_P(MODE) \ + (GET_MODE_SIZE (MODE) <= 4 || (MODE) == PDImode) #define HAVE_POST_INCREMENT 1 #define HAVE_POST_DECREMENT 1 -#define HAVE_PRE_DECREMENT 1 +#define HAVE_PRE_DECREMENT 1 /* `LEGITIMATE_PIC_OPERAND_P (X)' A C expression that is nonzero if X is a legitimate immediate @@ -847,11 +779,12 @@ typedef struct not check it either. You need not define this macro if all constants (including `SYMBOL_REF') can be immediate operands when generating position independent code. */ -#define LEGITIMATE_PIC_OPERAND_P(X) !SYMBOLIC_CONST (X) +#define LEGITIMATE_PIC_OPERAND_P(X) ! SYMBOLIC_CONST (X) -#define SYMBOLIC_CONST(X) \ - (GET_CODE (X) == SYMBOL_REF || GET_CODE (X) == LABEL_REF \ - || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X))) +#define SYMBOLIC_CONST(X) \ +(GET_CODE (X) == SYMBOL_REF \ + || GET_CODE (X) == LABEL_REF \ + || (GET_CODE (X) == CONST && symbolic_reference_mentioned_p (X))) /* Max number of bytes we can move from memory to memory in one reasonably fast instruction. */ @@ -876,12 +809,12 @@ typedef struct preferable since it may eliminate subsequent memory access if subsequent accesses occur to other fields in the same word of the structure, but to different bytes. */ -#define SLOW_BYTE_ACCESS 0 +#define SLOW_BYTE_ACCESS 0 #define SLOW_SHORT_ACCESS 0 /* Define this if most significant bit is lowest numbered in instructions that operate on numbered bit-fields. */ -#define BITS_BIG_ENDIAN 0 +#define BITS_BIG_ENDIAN 0 /* Define this if most significant byte of a word is the lowest numbered. We can't access bytes but if we could we would in the Big Endian order. */ @@ -930,10 +863,12 @@ typedef struct * really cause some alignment problem */ -#define UNITS_PER_FLOAT ((FLOAT_TYPE_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT) +#define UNITS_PER_FLOAT ((FLOAT_TYPE_SIZE + BITS_PER_UNIT - 1) / \ + BITS_PER_UNIT) + +#define UNITS_PER_DOUBLE ((DOUBLE_TYPE_SIZE + BITS_PER_UNIT - 1) / \ + BITS_PER_UNIT) -#define UNITS_PER_DOUBLE \ - ((DOUBLE_TYPE_SIZE + BITS_PER_UNIT - 1) / BITS_PER_UNIT) /* what is the 'type' of size_t */ #define SIZE_TYPE "long unsigned int" @@ -941,11 +876,11 @@ typedef struct /* Define this as 1 if `char' should by default be signed; else as 0. */ #define DEFAULT_SIGNED_CHAR 1 #define FLOAT_TYPE_SIZE BITS_PER_WORD -#define SHORT_TYPE_SIZE 16 -#define CHAR_TYPE_SIZE 8 -#define INT_TYPE_SIZE 32 -#define LONG_TYPE_SIZE 32 -#define LONG_LONG_TYPE_SIZE 64 +#define SHORT_TYPE_SIZE 16 +#define CHAR_TYPE_SIZE 8 +#define INT_TYPE_SIZE 32 +#define LONG_TYPE_SIZE 32 +#define LONG_LONG_TYPE_SIZE 64 /* Note: Fix this to depend on target switch. -- lev */ @@ -956,8 +891,8 @@ typedef struct * #define DOUBLES_ARE_FLOATS 1 */ -#define DOUBLE_TYPE_SIZE 64 -#define LONG_DOUBLE_TYPE_SIZE 64 +#define DOUBLE_TYPE_SIZE 64 +#define LONG_DOUBLE_TYPE_SIZE 64 /* `PROMOTE_MODE (M, UNSIGNEDP, TYPE)' A macro to update M and UNSIGNEDP when an object whose type is @@ -982,18 +917,18 @@ typedef struct Do not define this macro if it would never modify M.*/ -#define BFIN_PROMOTE_MODE_P(MODE) \ - (!TARGET_DSP && GET_MODE_CLASS (MODE) == MODE_INT \ - && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) - -#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ - if (BFIN_PROMOTE_MODE_P (MODE)) \ - { \ - if (MODE == QImode) \ - UNSIGNEDP = 1; \ - else if (MODE == HImode) \ - UNSIGNEDP = 0; \ - (MODE) = SImode; \ +#define BFIN_PROMOTE_MODE_P(MODE) \ + (!TARGET_DSP && GET_MODE_CLASS (MODE) == MODE_INT \ + && GET_MODE_SIZE (MODE) < UNITS_PER_WORD) + +#define PROMOTE_MODE(MODE, UNSIGNEDP, TYPE) \ + if (BFIN_PROMOTE_MODE_P(MODE)) \ + { \ + if (MODE == QImode) \ + UNSIGNEDP = 1; \ + else if (MODE == HImode) \ + UNSIGNEDP = 0; \ + (MODE) = SImode; \ } /* Describing Relative Costs of Operations */ @@ -1008,7 +943,7 @@ typedef struct #define JUMP_TABLES_IN_TEXT_SECTION flag_pic /* Define if operations between registers always perform the operation - on the full register even if a narrower mode is specified. + on the full register even if a narrower mode is specified. #define WORD_REGISTER_OPERATIONS 1 */ @@ -1016,183 +951,153 @@ typedef struct together in a single multiply insn. That is the case if they are both the same flag not involving M, or if one is a combination of the other with M. */ -#define MACFLAGS_MATCH_P(A, B) \ - ((A) == (B) || ((A) == MACFLAG_NONE && (B) == MACFLAG_M) \ - || ((A) == MACFLAG_M && (B) == MACFLAG_NONE) \ - || ((A) == MACFLAG_IS && (B) == MACFLAG_IS_M) \ - || ((A) == MACFLAG_IS_M && (B) == MACFLAG_IS)) +#define MACFLAGS_MATCH_P(A, B) \ + ((A) == (B) \ + || ((A) == MACFLAG_NONE && (B) == MACFLAG_M) \ + || ((A) == MACFLAG_M && (B) == MACFLAG_NONE) \ + || ((A) == MACFLAG_IS && (B) == MACFLAG_IS_M) \ + || ((A) == MACFLAG_IS_M && (B) == MACFLAG_IS)) /* Switch into a generic section. */ -#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section +#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section -#define PRINT_OPERAND(FILE, RTX, CODE) print_operand (FILE, RTX, CODE) +#define PRINT_OPERAND(FILE, RTX, CODE) print_operand (FILE, RTX, CODE) #define PRINT_OPERAND_ADDRESS(FILE, RTX) print_address_operand (FILE, RTX) -typedef enum sections -{ - CODE_DIR, - DATA_DIR, - LAST_SECT_NM +typedef enum sections { + CODE_DIR, + DATA_DIR, + LAST_SECT_NM } SECT_ENUM_T; -typedef enum directives -{ - LONG_CONST_DIR, - SHORT_CONST_DIR, - BYTE_CONST_DIR, - SPACE_DIR, - INIT_DIR, - LAST_DIR_NM +typedef enum directives { + LONG_CONST_DIR, + SHORT_CONST_DIR, + BYTE_CONST_DIR, + SPACE_DIR, + INIT_DIR, + LAST_DIR_NM } DIR_ENUM_T; -#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) \ - ((C) == ';' || ((C) == '|' && (STR)[1] == '|')) +#define IS_ASM_LOGICAL_LINE_SEPARATOR(C, STR) \ + ((C) == ';' \ + || ((C) == '|' && (STR)[1] == '|')) #define TEXT_SECTION_ASM_OP ".text;" #define DATA_SECTION_ASM_OP ".data;" -#define ASM_APP_ON "" +#define ASM_APP_ON "" #define ASM_APP_OFF "" -#define ASM_GLOBALIZE_LABEL1(FILE, NAME) \ - do \ - { \ - fputs (".global ", FILE); \ - assemble_name (FILE, NAME); \ - fputc (';', FILE); \ - fputc ('\n', FILE); \ - } \ - while (0) - -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ - do \ - { \ - fputs (".type ", FILE); \ - assemble_name (FILE, NAME); \ - fputs (", STT_FUNC", FILE); \ - fputc (';', FILE); \ - fputc ('\n', FILE); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ - } \ - while (0) - -#define ASM_OUTPUT_LABEL(FILE, NAME) \ - do \ - { \ - assemble_name (FILE, NAME); \ - fputs (":\n", FILE); \ - } \ - while (0) - -#define ASM_OUTPUT_LABELREF(FILE, NAME) \ - do \ - { \ - fprintf (FILE, "_%s", NAME); \ - } \ - while (0) - -#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ - do \ - { \ - char __buf[256]; \ - fprintf (FILE, "\t.dd\t"); \ - ASM_GENERATE_INTERNAL_LABEL (__buf, "L", VALUE); \ - assemble_name (FILE, __buf); \ - fputc (';', FILE); \ - fputc ('\n', FILE); \ - } \ - while (0) - -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - MY_ASM_OUTPUT_ADDR_DIFF_ELT (FILE, VALUE, REL) - -#define MY_ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ - do \ - { \ - char __buf[256]; \ - fprintf (FILE, "\t.dd\t"); \ - ASM_GENERATE_INTERNAL_LABEL (__buf, "L", VALUE); \ - assemble_name (FILE, __buf); \ - fputs (" - ", FILE); \ - ASM_GENERATE_INTERNAL_LABEL (__buf, "L", REL); \ - assemble_name (FILE, __buf); \ - fputc (';', FILE); \ - fputc ('\n', FILE); \ - } \ - while (0) - -#define ASM_OUTPUT_ALIGN(FILE, LOG) \ - do \ - { \ - if ((LOG) != 0) \ - fprintf (FILE, "\t.align %d\n", 1 << (LOG)); \ - } \ - while (0) - -#define ASM_OUTPUT_SKIP(FILE, SIZE) \ - do \ - { \ - asm_output_skip (FILE, SIZE); \ - } \ - while (0) - -#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ - do \ - { \ - switch_to_section (data_section); \ - if ((SIZE) >= (unsigned int) 4) \ - ASM_OUTPUT_ALIGN (FILE, 2); \ - ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ - fprintf (FILE, "%s %ld;\n", ASM_SPACE, \ - (ROUNDED) > (unsigned int) 1 ? (ROUNDED) : 1); \ - } \ - while (0) - -#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ - do \ - { \ - ASM_GLOBALIZE_LABEL1 (FILE, NAME); \ - ASM_OUTPUT_LOCAL (FILE, NAME, SIZE, ROUNDED); \ - } \ - while (0) +#define ASM_GLOBALIZE_LABEL1(FILE, NAME) \ + do { fputs (".global ", FILE); \ + assemble_name (FILE, NAME); \ + fputc (';',FILE); \ + fputc ('\n',FILE); \ + } while (0) + +#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ + do { \ + fputs (".type ", FILE); \ + assemble_name (FILE, NAME); \ + fputs (", STT_FUNC", FILE); \ + fputc (';',FILE); \ + fputc ('\n',FILE); \ + ASM_OUTPUT_LABEL(FILE, NAME); \ + } while (0) + +#define ASM_OUTPUT_LABEL(FILE, NAME) \ + do { assemble_name (FILE, NAME); \ + fputs (":\n",FILE); \ + } while (0) + +#define ASM_OUTPUT_LABELREF(FILE,NAME) \ + do { fprintf (FILE, "_%s", NAME); \ + } while (0) + +#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ +do { char __buf[256]; \ + fprintf (FILE, "\t.dd\t"); \ + ASM_GENERATE_INTERNAL_LABEL (__buf, "L", VALUE); \ + assemble_name (FILE, __buf); \ + fputc (';', FILE); \ + fputc ('\n', FILE); \ + } while (0) + +#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ + MY_ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) + +#define MY_ASM_OUTPUT_ADDR_DIFF_ELT(FILE, VALUE, REL) \ + do { \ + char __buf[256]; \ + fprintf (FILE, "\t.dd\t"); \ + ASM_GENERATE_INTERNAL_LABEL (__buf, "L", VALUE); \ + assemble_name (FILE, __buf); \ + fputs (" - ", FILE); \ + ASM_GENERATE_INTERNAL_LABEL (__buf, "L", REL); \ + assemble_name (FILE, __buf); \ + fputc (';', FILE); \ + fputc ('\n', FILE); \ + } while (0) + +#define ASM_OUTPUT_ALIGN(FILE,LOG) \ + do { \ + if ((LOG) != 0) \ + fprintf (FILE, "\t.align %d\n", 1 << (LOG)); \ + } while (0) + +#define ASM_OUTPUT_SKIP(FILE,SIZE) \ + do { \ + asm_output_skip (FILE, SIZE); \ + } while (0) + +#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \ +do { \ + switch_to_section (data_section); \ + if ((SIZE) >= (unsigned int) 4 ) ASM_OUTPUT_ALIGN(FILE,2); \ + ASM_OUTPUT_SIZE_DIRECTIVE (FILE, NAME, SIZE); \ + ASM_OUTPUT_LABEL (FILE, NAME); \ + fprintf (FILE, "%s %ld;\n", ASM_SPACE, \ + (ROUNDED) > (unsigned int) 1 ? (ROUNDED) : 1); \ +} while (0) + +#define ASM_OUTPUT_COMMON(FILE, NAME, SIZE, ROUNDED) \ + do { \ + ASM_GLOBALIZE_LABEL1(FILE,NAME); \ + ASM_OUTPUT_LOCAL (FILE, NAME, SIZE, ROUNDED); } while(0) #define ASM_COMMENT_START "//" #define PROFILE_BEFORE_PROLOGUE -#define FUNCTION_PROFILER(FILE, LABELNO) \ - do \ - { \ - fprintf (FILE, "\t[--SP] = RETS;\n"); \ - if (TARGET_LONG_CALLS) \ - { \ - fprintf (FILE, "\tP2.h = __mcount;\n"); \ - fprintf (FILE, "\tP2.l = __mcount;\n"); \ - fprintf (FILE, "\tCALL (P2);\n"); \ - } \ - else \ - fprintf (FILE, "\tCALL __mcount;\n"); \ - fprintf (FILE, "\tRETS = [SP++];\n"); \ - } \ - while (0) +#define FUNCTION_PROFILER(FILE, LABELNO) \ + do { \ + fprintf (FILE, "\t[--SP] = RETS;\n"); \ + if (TARGET_LONG_CALLS) \ + { \ + fprintf (FILE, "\tP2.h = __mcount;\n"); \ + fprintf (FILE, "\tP2.l = __mcount;\n"); \ + fprintf (FILE, "\tCALL (P2);\n"); \ + } \ + else \ + fprintf (FILE, "\tCALL __mcount;\n"); \ + fprintf (FILE, "\tRETS = [SP++];\n"); \ + } while(0) #undef NO_PROFILE_COUNTERS #define NO_PROFILE_COUNTERS 1 -#define ASM_OUTPUT_REG_PUSH(FILE, REGNO) \ - fprintf (FILE, "\t[--SP] = %s;\n", reg_names[REGNO]) -#define ASM_OUTPUT_REG_POP(FILE, REGNO) \ - fprintf (FILE, "\t%s = [SP++];\n", reg_names[REGNO]) +#define ASM_OUTPUT_REG_PUSH(FILE, REGNO) fprintf (FILE, "\t[--SP] = %s;\n", reg_names[REGNO]) +#define ASM_OUTPUT_REG_POP(FILE, REGNO) fprintf (FILE, "\t%s = [SP++];\n", reg_names[REGNO]) extern rtx bfin_cc_rtx, bfin_rets_rtx; /* This works for GAS and some other assemblers. */ -#define SET_ASM_OP ".set " +#define SET_ASM_OP ".set " /* DBX register number for a given compiler register number */ -#define DBX_REGISTER_NUMBER(REGNO) (REGNO) +#define DBX_REGISTER_NUMBER(REGNO) (REGNO) -#define SIZE_ASM_OP "\t.size\t" +#define SIZE_ASM_OP "\t.size\t" extern int splitting_for_sched, splitting_loops; diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h index bab486a..86c5469 100644 --- a/gcc/config/bfin/linux.h +++ b/gcc/config/bfin/linux.h @@ -28,11 +28,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in linux.h (bfin) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #undef STARTFILE_SPEC #define STARTFILE_SPEC \ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crtreloc.o%s \ diff --git a/gcc/config/bfin/rtems.h b/gcc/config/bfin/rtems.h index dbb96fb..1061fe6 100644 --- a/gcc/config/bfin/rtems.h +++ b/gcc/config/bfin/rtems.h @@ -31,13 +31,3 @@ builtin_assert ("system=rtems"); \ } \ while (0) - -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/bfin/uclinux.h b/gcc/config/bfin/uclinux.h index eaae27a..4e3efe9 100644 --- a/gcc/config/bfin/uclinux.h +++ b/gcc/config/bfin/uclinux.h @@ -27,8 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #undef LINK_GCC_C_SEQUENCE_SPEC #define LINK_GCC_C_SEQUENCE_SPEC "\ %{mfast-fp:-lbffastfp} %G %{!nolibc:%L} %{mfast-fp:-lbffastfp} %G \ diff --git a/gcc/config/c6x/c6x-protos.h b/gcc/config/c6x/c6x-protos.h index 480661a..9cbe281 100644 --- a/gcc/config/c6x/c6x-protos.h +++ b/gcc/config/c6x/c6x-protos.h @@ -21,9 +21,6 @@ #ifndef GCC_C6X_PROTOS_H #define GCC_C6X_PROTOS_H -/* Defined in c6x-rust.cc */ -extern void c6x_rust_target_cpu_info (void); - /* Functions defined in c6x.cc. */ #ifdef RTX_CODE diff --git a/gcc/config/c6x/c6x.h b/gcc/config/c6x/c6x.h index b96e45a..766ce1e 100644 --- a/gcc/config/c6x/c6x.h +++ b/gcc/config/c6x/c6x.h @@ -114,8 +114,6 @@ extern c6x_cpu_t c6x_arch; } \ } while (0) -#define TARGET_RUST_CPU_INFO c6x_rust_target_cpu_info - #define OPTION_DEFAULT_SPECS \ {"arch", "%{!march=*:-march=%(VALUE)}" } diff --git a/gcc/config/c6x/t-c6x b/gcc/config/c6x/t-c6x index 7ed31d3..0f29c05 100644 --- a/gcc/config/c6x/t-c6x +++ b/gcc/config/c6x/t-c6x @@ -42,7 +42,3 @@ $(srcdir)/config/c6x/c6x-tables.opt: $(srcdir)/config/c6x/genopt.sh \ $(srcdir)/config/c6x/c6x-isas.def $(SHELL) $(srcdir)/config/c6x/genopt.sh $(srcdir)/config/c6x > \ $(srcdir)/config/c6x/c6x-tables.opt - -c6x-rust.o: $(srcdir)/config/c6x/c6x-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/c6x/uclinux-elf.h b/gcc/config/c6x/uclinux-elf.h index 6a08712..df2ad93 100644 --- a/gcc/config/c6x/uclinux-elf.h +++ b/gcc/config/c6x/uclinux-elf.h @@ -32,18 +32,6 @@ } \ while (false) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in uclinux-elf.h (c6x) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc does not distinguish between uclinux and regular linux kernels*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "linux"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #undef STARTFILE_SPEC #define STARTFILE_SPEC \ "%{!shared:crt1%O%s} crti%O%s %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}" diff --git a/gcc/config/cr16/cr16-protos.h b/gcc/config/cr16/cr16-protos.h index b3575ed..300bb31 100644 --- a/gcc/config/cr16/cr16-protos.h +++ b/gcc/config/cr16/cr16-protos.h @@ -45,9 +45,6 @@ enum data_model_type ILLEGAL_DM /* Illegal data model. */ }; -/* Defined in cr16-rust.cc */ -extern void cr16_rust_target_cpu_info (void); - #ifdef RTX_CODE /* Addressing Modes. */ diff --git a/gcc/config/cr16/cr16.h b/gcc/config/cr16/cr16.h index 591cbf4..100bb4f 100644 --- a/gcc/config/cr16/cr16.h +++ b/gcc/config/cr16/cr16.h @@ -67,8 +67,6 @@ do \ while (0) #endif -#define TARGET_RUST_CPU_INFO cr16_rust_target_cpu_info - /* Force the generation of dwarf .debug_frame sections even if not compiling -g. This guarantees that we can unwind the stack. */ #define DWARF2_FRAME_INFO 1 diff --git a/gcc/config/cr16/t-cr16 b/gcc/config/cr16/t-cr16 index dfc714b..928730f 100644 --- a/gcc/config/cr16/t-cr16 +++ b/gcc/config/cr16/t-cr16 @@ -23,6 +23,3 @@ MULTILIB_DIRNAMES = far-pic int32 MULTILIB_MATCHES = MULTILIB_EXTRA_OPTS = mcr16cplus mdata-model=far -cr16-rust.o: $(srcdir)/config/cr16/cr16-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/csky/csky-linux-elf.h b/gcc/config/csky/csky-linux-elf.h index d2b34ca..bea3757 100644 --- a/gcc/config/csky/csky-linux-elf.h +++ b/gcc/config/csky/csky-linux-elf.h @@ -95,11 +95,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - /* In crtstuff.c to control section in where code resides. We have to write it as asm code. */ #ifdef __PIC__ diff --git a/gcc/config/csky/csky-protos.h b/gcc/config/csky/csky-protos.h index 47cba32..8f61735 100644 --- a/gcc/config/csky/csky-protos.h +++ b/gcc/config/csky/csky-protos.h @@ -27,8 +27,6 @@ extern bool csky_legitimate_pic_operand_p (rtx); extern void csky_cpu_cpp_builtins (cpp_reader *); -extern void csky_rust_target_cpu_info (void); - extern bool csky_inlinable_constant (HOST_WIDE_INT value); extern bool csky_shifted_imm8_constant (unsigned HOST_WIDE_INT, unsigned int *, unsigned int *); diff --git a/gcc/config/csky/csky.h b/gcc/config/csky/csky.h index b9f3a5b..22b1151 100644 --- a/gcc/config/csky/csky.h +++ b/gcc/config/csky/csky.h @@ -813,8 +813,6 @@ extern enum reg_class regno_reg_class[FIRST_PSEUDO_REGISTER]; #define TARGET_CPU_CPP_BUILTINS() \ csky_cpu_cpp_builtins (pfile) -#define TARGET_RUST_CPU_INFO csky_rust_target_cpu_info - /****************************************************************** * Per-function Data * ******************************************************************/ diff --git a/gcc/config/csky/t-csky b/gcc/config/csky/t-csky index 902ec70..d076d48 100644 --- a/gcc/config/csky/t-csky +++ b/gcc/config/csky/t-csky @@ -27,7 +27,3 @@ $(srcdir)/config/csky/csky_tables.opt: $(srcdir)/config/csky/csky_genopt.sh \ $(srcdir)/config/csky/csky_cores.def $(SHELL) $(srcdir)/config/csky/csky_genopt.sh $(srcdir)/config/csky > \ $(srcdir)/config/csky/csky_tables.opt - -csky-rust.o: $(srcdir)/config/csky/csky-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/dragonfly.h b/gcc/config/dragonfly.h index 15209f9..0235e62 100644 --- a/gcc/config/dragonfly.h +++ b/gcc/config/dragonfly.h @@ -35,18 +35,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in dragonflybsd.h - c++ undefines it and redefines it." -/* TODO: ensure that this works correctly and the undef and redef reason is known */ -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "dragonfly"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC \ "%(cpp_cpu) %(cpp_arch) %{posix:-D_POSIX_SOURCE}" diff --git a/gcc/config/epiphany/epiphany-protos.h b/gcc/config/epiphany/epiphany-protos.h index c1c9b3d..61b6323 100644 --- a/gcc/config/epiphany/epiphany-protos.h +++ b/gcc/config/epiphany/epiphany-protos.h @@ -26,9 +26,6 @@ extern struct rtx_def *gen_compare_reg (machine_mode, enum rtx_code, machine_mode, rtx, rtx); #endif -/* Defined in epiphany-rust.cc */ -extern void epiphany_rust_target_cpu_info (void); - /* Declarations for various fns used in the .md file. */ extern void epiphany_final_prescan_insn (rtx_insn *, rtx *, int); extern bool epiphany_is_long_call_p (rtx); diff --git a/gcc/config/epiphany/epiphany.h b/gcc/config/epiphany/epiphany.h index 4247884..8c723845a 100644 --- a/gcc/config/epiphany/epiphany.h +++ b/gcc/config/epiphany/epiphany.h @@ -41,8 +41,6 @@ along with GCC; see the file COPYING3. If not see builtin_assert ("machine=epiphany"); \ } while (0) -#define TARGET_RUST_CPU_INFO epiphany_rust_target_cpu_info - /* Pick up the libgloss library. One day we may do this by linker script, but for now its static. libgloss might use errno/__errno, which might not have been needed when we diff --git a/gcc/config/epiphany/rtems.h b/gcc/config/epiphany/rtems.h index 7c87aba..f7f961c 100644 --- a/gcc/config/epiphany/rtems.h +++ b/gcc/config/epiphany/rtems.h @@ -26,16 +26,3 @@ builtin_define ("__USE_INIT_FINI__"); \ builtin_assert ("system=rtems"); \ } while (0) - -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (epiphany) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family - TODO*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/epiphany/t-epiphany b/gcc/config/epiphany/t-epiphany index 1a9b5eb..27a8052 100644 --- a/gcc/config/epiphany/t-epiphany +++ b/gcc/config/epiphany/t-epiphany @@ -30,10 +30,6 @@ resolve-sw-modes.o : $(srcdir)/config/epiphany/resolve-sw-modes.cc \ insn-attr-common.h $(TREE_PASS_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< -epiphany-rust.o: $(srcdir)/config/epiphany/epiphany-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - SPECS = specs.install specs: specs.install diff --git a/gcc/config/fr30/fr30.h b/gcc/config/fr30/fr30.h index 9e1d441..3d0c3a9 100644 --- a/gcc/config/fr30/fr30.h +++ b/gcc/config/fr30/fr30.h @@ -38,14 +38,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "fr30"); \ - if (TARGET_SMALL_MODEL) \ - rust_add_target_info("target_feature", "small-model"); \ - /*TODO: figure out how to do lsim option here if useful */ \ - } while (0) - #undef STARTFILE_SPEC #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s" diff --git a/gcc/config/freebsd-spec.h b/gcc/config/freebsd-spec.h index d0c6ece..5944878 100644 --- a/gcc/config/freebsd-spec.h +++ b/gcc/config/freebsd-spec.h @@ -49,15 +49,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Define the default FreeBSD-specific per-CPU hook code. */ #define FBSD_TARGET_CPU_CPP_BUILTINS() do {} while (0) -#define FBSD_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "freebsd"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - /*TODO: is default per-CPU hook code required here?*/ \ - } while (0) - /* Provide a CPP_SPEC appropriate for FreeBSD. We just deal with the GCC option `-posix', and PIC issues. */ diff --git a/gcc/config/freebsd.h b/gcc/config/freebsd.h index 7b3f448..28ebcad 100644 --- a/gcc/config/freebsd.h +++ b/gcc/config/freebsd.h @@ -32,11 +32,6 @@ along with GCC; see the file COPYING3. If not see #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() FBSD_TARGET_OS_CPP_BUILTINS() -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in freebsd.h - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() FBSD_TARGET_RUST_OS_INFO() - #undef CPP_SPEC #define CPP_SPEC FBSD_CPP_SPEC diff --git a/gcc/config/frv/frv-protos.h b/gcc/config/frv/frv-protos.h index cdab9f8..bc07111 100644 --- a/gcc/config/frv/frv-protos.h +++ b/gcc/config/frv/frv-protos.h @@ -26,9 +26,6 @@ extern void frv_debug_stack (frv_stack_t *); extern int frv_initial_elimination_offset (int, int); extern void frv_ifcvt_machdep_init (void *); -/* Defined in frv-rust.cc */ -extern void frv_rust_target_cpu_info (void); - #ifdef RTX_CODE extern int frv_legitimate_address_p_1 (machine_mode, rtx, int, int, int); diff --git a/gcc/config/frv/frv.h b/gcc/config/frv/frv.h index b991a1e..8cd67f7 100644 --- a/gcc/config/frv/frv.h +++ b/gcc/config/frv/frv.h @@ -188,7 +188,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO frv_rust_target_cpu_info #define TARGET_HAS_FPRS (TARGET_HARD_FLOAT || TARGET_MEDIA) diff --git a/gcc/config/frv/linux.h b/gcc/config/frv/linux.h index 22d87822..98652b5 100644 --- a/gcc/config/frv/linux.h +++ b/gcc/config/frv/linux.h @@ -57,14 +57,6 @@ builtin_assert ("system=linux"); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "linux"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #define HAS_INIT_SECTION 1 #define INIT_SECTION_ASM_OP "\t.section .init,\"ax\"" #define FINI_SECTION_ASM_OP "\t.section .fini,\"ax\"" diff --git a/gcc/config/frv/t-frv b/gcc/config/frv/t-frv index d0c9422..cacdb25 100644 --- a/gcc/config/frv/t-frv +++ b/gcc/config/frv/t-frv @@ -34,7 +34,3 @@ MULTILIB_MATCHES = mcpu?simple=mcpu?fr300 \ MULTILIB_EXCEPTIONS = mcpu=frv/mno-pack* mcpu=simple/mno-pack* EXTRA_HEADERS = $(srcdir)/config/frv/frv-asm.h - -frv-rust.o: $(srcdir)/config/frv/frv-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/ft32/ft32.h b/gcc/config/ft32/ft32.h index 7763721..ab170b1 100644 --- a/gcc/config/ft32/ft32.h +++ b/gcc/config/ft32/ft32.h @@ -463,23 +463,6 @@ do { \ builtin_define ("__FT32__"); \ } -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "ft32"); \ - if (TARGET_SIM) \ - rust_add_target_info("target_feature", "sim"); \ - if (ft32_lra_flag) \ - rust_add_target_info("target_feature", "lra"); \ - if (TARGET_NODIV) \ - rust_add_target_info("target_feature", "nodiv"); \ - if (TARGET_FT32B) \ - rust_add_target_info("target_feature", "ft32b"); \ - if (TARGET_COMPRESS) \ - rust_add_target_info("target_feature", "compress"); \ - if (TARGET_NOPM) \ - rust_add_target_info("target_feature", "nopm"); \ - } while (0) - #define HAS_LONG_UNCOND_BRANCH true #define NO_FUNCTION_CSE 1 diff --git a/gcc/config/fuchsia.h b/gcc/config/fuchsia.h index b576f7c..e013265 100644 --- a/gcc/config/fuchsia.h +++ b/gcc/config/fuchsia.h @@ -66,19 +66,3 @@ along with GCC; see the file COPYING3. If not see } \ while (false) -#ifndef EXTRA_TARGET_RUST_OS_INFO -#define EXTRA_TARGET_RUST_OS_INFO() -#endif - -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in fuchsia.h - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - /*NOTE: target_family is subject to change if rustc decides to change it to non-unix*/ \ - builtin_rust_info ("target_os", "fuchsia"); \ - builtin_rust_info ("target_vendor", ""); \ - builtin_rust_info ("target_env", ""); \ - EXTRA_TARGET_RUST_OS_INFO(); \ - } while (0) diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h index 460b276..9ae8919 100644 --- a/gcc/config/gcn/gcn.h +++ b/gcc/config/gcn/gcn.h @@ -27,28 +27,6 @@ } \ while(0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "amdgcn"); \ - /*TODO: maybe make arches features? e.g. "fiji", "gfx900"*/ \ - /*TODO: is defining via "is arch 3" or "is arch 3 or higher" better?*/ \ - if (TARGET_GCN3) \ - rust_add_target_info("target_feature", "gcn3"); \ - if (TARGET_GCN5) \ - rust_add_target_info("target_feature", "gcn5"); \ - if (TARGET_ABI64) \ - rust_add_target_info("target_feature", "64"); \ - else /*are these defines actually useful?*/ \ - rust_add_target_info("target_feature", "32"); \ - /*TODO: figure out how to check gomp feature*/ \ - /*TODO: ensure that vars below are accessible - defined weirdly so may not be*/ \ - if (flag_bypass_init_error) \ - rust_add_target_info("target_feature", "bypass-init-error"); \ - if (flag_worker_partitioning) \ - rust_add_target_info("target_feature", "acc-experimental-workers"); \ - /*TODO: figure out how to represent stack-size and local-symbol-id as defines*/ \ - } while (0) - /* Support for a compile-time default architecture and tuning. The rules are: --with-arch is ignored if -march is specified. diff --git a/gcc/config/gnu.h b/gcc/config/gnu.h index 15e73b2..de2ead8 100644 --- a/gcc/config/gnu.h +++ b/gcc/config/gnu.h @@ -37,12 +37,3 @@ along with GCC. If not, see <http://www.gnu.org/licenses/>. builtin_version ("Hurd"); \ builtin_version ("CRuntime_Glibc"); \ } while (0) - -#define GNU_USER_TARGET_RUST_OS_INFO() \ - do { /*is this correct? or should os be "hurd"?*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "gnu"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - /* TODO: is target_env required?*/ \ - } while (0) diff --git a/gcc/config/h8300/linux.h b/gcc/config/h8300/linux.h index 6c3ba56..9de4500 100644 --- a/gcc/config/h8300/linux.h +++ b/gcc/config/h8300/linux.h @@ -29,11 +29,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef LINK_SPEC #define LINK_SPEC "%{mh:-mh8300helf_linux} %{ms:-m h8300self_linux} %{msx:-m h8300sxelf_linux}" diff --git a/gcc/config/i386/crtdll.h b/gcc/config/i386/crtdll.h index 5112e35..75fede5 100644 --- a/gcc/config/i386/crtdll.h +++ b/gcc/config/i386/crtdll.h @@ -31,18 +31,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef EXTRA_TARGET_RUST_OS_INFO -# error "EXTRA_TARGET_RUST_OS_INFO already defined in crtdll.h (i386) - c++ undefines it and redefines it." -#endif -#define EXTRA_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "windows"); \ - builtin_rust_info ("target_os", "windows"); \ - builtin_rust_info ("target_vendor", "pc"); \ - /*TODO: is this the right target_env? it says gnu tools up there, but env may change.*/ \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #undef LIBGCC_SPEC #define LIBGCC_SPEC \ "%{mthreads:-lmingwthrd} -lmingw32 -lgcc -lcoldname -libmingwex -lcrtdll" diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h index 097592a..4515045 100644 --- a/gcc/config/i386/cygming.h +++ b/gcc/config/i386/cygming.h @@ -151,11 +151,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - EXTRA_TARGET_RUST_OS_INFO (); \ - } while (0) - /* Get tree.cc to declare a target-specific specialization of merge_decl_attributes. */ #define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1 diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h index 7657c2b..d06eda3 100644 --- a/gcc/config/i386/cygwin.h +++ b/gcc/config/i386/cygwin.h @@ -38,16 +38,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define EXTRA_TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: derived from llvm triple - rustc has no support for cygwin, but follows llvm triple*/ \ - /*target_family is defined as unix due to posix-compliance, but this is subject to change*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "windows"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "cygnus"); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ %{!ansi:-Dunix} \ diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h index 3654a50..a55f6b2 100644 --- a/gcc/config/i386/darwin.h +++ b/gcc/config/i386/darwin.h @@ -40,16 +40,6 @@ along with GCC; see the file COPYING3. If not see darwin_cpp_builtins (pfile); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - /*TODO: rust actually has "macos", "ios", and "tvos" for darwin targets, but gcc seems to have no*/ \ - /*current support for them, so assuming that target_os is always macos for now*/ \ - builtin_rust_info ("target_os", "macos"); \ - builtin_rust_info ("target_vendor", "apple"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int") diff --git a/gcc/config/i386/djgpp.h b/gcc/config/i386/djgpp.h index bc65b77..909821e 100644 --- a/gcc/config/i386/djgpp.h +++ b/gcc/config/i386/djgpp.h @@ -57,15 +57,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*rustc has no support for this, so values are taken from rusty-dos' djgpp github issue guesses*/ \ - builtin_rust_info ("target_family", "windows"); \ - builtin_rust_info ("target_os", "msdos"); \ - builtin_rust_info ("target_vendor", "pc"); \ - builtin_rust_info ("target_env", "djgpp"); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "-remap %{posix:-D_POSIX_SOURCE}" diff --git a/gcc/config/i386/gnu-user-common.h b/gcc/config/i386/gnu-user-common.h index 7a05169..23b54c5 100644 --- a/gcc/config/i386/gnu-user-common.h +++ b/gcc/config/i386/gnu-user-common.h @@ -36,11 +36,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 961f756..6b3c951 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -276,9 +276,6 @@ extern void ix86_d_target_versions (void); extern void ix86_d_register_target_info (void); extern bool ix86_d_has_stdcall_convention (unsigned int *, unsigned int *); -/* In i386-rust.cc */ -extern void ix86_rust_target_cpu_info (void); - /* In winnt.cc */ extern void i386_pe_unique_section (tree, int); extern void i386_pe_declare_function_type (FILE *, const char *, int); diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 8fb947e..f41e090 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -609,9 +609,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define TARGET_D_REGISTER_CPU_TARGET_INFO ix86_d_register_target_info #define TARGET_D_HAS_STDCALL_CONVENTION ix86_d_has_stdcall_convention -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO ix86_rust_target_cpu_info - #ifndef CC1_SPEC #define CC1_SPEC "%(cc1_cpu) " #endif diff --git a/gcc/config/i386/linux-common.h b/gcc/config/i386/linux-common.h index 25aa5f3..efa7fb2 100644 --- a/gcc/config/i386/linux-common.h +++ b/gcc/config/i386/linux-common.h @@ -30,23 +30,6 @@ along with GCC; see the file COPYING3. If not see #define EXTRA_TARGET_D_OS_VERSIONS() \ ANDROID_TARGET_D_OS_VERSIONS(); -#define EXTRA_TARGET_RUST_OS_INFO() \ - ANDROID_TARGET_RUST_OS_INFO(); -// TODO: decide on whether following c frontend style or d one - leaning towards c - - -/*#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in linux-common.h (i386) - c++ undefines it and redefines it." -# error "note that this above error (linux-common-i386) is expected due to already defining EXTRA_TARGET stuff" -#endif*/ -/* This is previously defined in gnu-user-common.h, but has no linux-specific info. */ -#undef TARGET_RUST_OS_INFO -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - ANDROID_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CC1_SPEC #define CC1_SPEC \ LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ diff --git a/gcc/config/i386/lynx.h b/gcc/config/i386/lynx.h index ecc1026..baa62c1 100644 --- a/gcc/config/i386/lynx.h +++ b/gcc/config/i386/lynx.h @@ -25,15 +25,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: not supported by rustc and so subject to change - based on llvm triple*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "lynxos"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* The svr4 ABI for the i386 says that records and unions are returned in memory. */ diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h index e5381de..d3ca0cd 100644 --- a/gcc/config/i386/mingw32.h +++ b/gcc/config/i386/mingw32.h @@ -65,14 +65,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define EXTRA_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "windows"); \ - builtin_rust_info ("target_os", "windows"); \ - builtin_rust_info ("target_vendor", "pc"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #ifndef TARGET_USE_PTHREAD_BY_DEFAULT #define SPEC_PTHREAD1 "pthread" #define SPEC_PTHREAD2 "!no-pthread" diff --git a/gcc/config/i386/netbsd-elf.h b/gcc/config/i386/netbsd-elf.h index aa60438..b1d7d48 100644 --- a/gcc/config/i386/netbsd-elf.h +++ b/gcc/config/i386/netbsd-elf.h @@ -26,11 +26,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Extra specs needed for NetBSD/i386 ELF. */ diff --git a/gcc/config/i386/netbsd64.h b/gcc/config/i386/netbsd64.h index 7eba96b..656fd45 100644 --- a/gcc/config/i386/netbsd64.h +++ b/gcc/config/i386/netbsd64.h @@ -26,11 +26,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Extra specs needed for NetBSD/x86-64 ELF. */ diff --git a/gcc/config/i386/nto.h b/gcc/config/i386/nto.h index 6b92d59..5df3009 100644 --- a/gcc/config/i386/nto.h +++ b/gcc/config/i386/nto.h @@ -36,18 +36,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in nto.h (i386) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: not supported by rustc and so subject to change - based on triple found online*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "nto"); \ - builtin_rust_info ("target_vendor", "pc"); \ - builtin_rust_info ("target_env", "qnx"); \ - } while (0) - #undef THREAD_MODEL_SPEC #define THREAD_MODEL_SPEC "posix" diff --git a/gcc/config/i386/openbsdelf.h b/gcc/config/i386/openbsdelf.h index 060ae0f..2176e79 100644 --- a/gcc/config/i386/openbsdelf.h +++ b/gcc/config/i386/openbsdelf.h @@ -25,11 +25,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - OPENBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef DBX_REGISTER_NUMBER #define DBX_REGISTER_NUMBER(n) \ (TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n]) diff --git a/gcc/config/i386/rdos.h b/gcc/config/i386/rdos.h index c185d0e..9549977 100644 --- a/gcc/config/i386/rdos.h +++ b/gcc/config/i386/rdos.h @@ -37,14 +37,3 @@ along with GCC; see the file COPYING3. If not see builtin_assert ("system=rdos"); \ } \ while (0) - -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: not supported by rustc and so subject to change - based on triple found online*/ \ - /*this seems to not refer to the 70s Data General RDOS, but one partly compatible with win32*/ \ - /*as such, target_family could be windows*/ \ - builtin_rust_info ("target_family", ""); \ - builtin_rust_info ("target_os", "rdos"); \ - builtin_rust_info ("target_vendor", "pc"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/i386/rtemself.h b/gcc/config/i386/rtemself.h index 2f1cbda..a6035ff 100644 --- a/gcc/config/i386/rtemself.h +++ b/gcc/config/i386/rtemself.h @@ -33,13 +33,3 @@ builtin_assert ("system=rtems"); \ } \ while (0) - -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/i386/t-i386 b/gcc/config/i386/t-i386 index 61ddfca..4e2a0ef 100644 --- a/gcc/config/i386/t-i386 +++ b/gcc/config/i386/t-i386 @@ -46,10 +46,6 @@ i386-d.o: $(srcdir)/config/i386/i386-d.cc $(COMPILE) $< $(POSTCOMPILE) -i386-rust.o: $(srcdir)/config/i386/i386-rust.cc - $(COMPILE) $< - $(POSTCOMPILE) - i386-options.o: $(srcdir)/config/i386/i386-options.cc $(COMPILE) $< $(POSTCOMPILE) diff --git a/gcc/config/i386/vxworks.h b/gcc/config/i386/vxworks.h index af1f42a..3b8eb6f 100644 --- a/gcc/config/i386/vxworks.h +++ b/gcc/config/i386/vxworks.h @@ -113,11 +113,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - VXWORKS_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC #undef CC1_SPEC diff --git a/gcc/config/ia64/hpux.h b/gcc/config/ia64/hpux.h index 1a7aa90..fa705d7 100644 --- a/gcc/config/ia64/hpux.h +++ b/gcc/config/ia64/hpux.h @@ -52,15 +52,6 @@ do { \ builtin_define("_ILP32"); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: rustc has no supported for hp-ux, so this is subject to change (and guessed)*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "hpux"); \ - builtin_rust_info ("target_vendor", "hp"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC \ "%{mt|pthread:-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L}" diff --git a/gcc/config/ia64/ia64-protos.h b/gcc/config/ia64/ia64-protos.h index 49aa3af..77e0cf7 100644 --- a/gcc/config/ia64/ia64-protos.h +++ b/gcc/config/ia64/ia64-protos.h @@ -65,9 +65,6 @@ extern void ia64_expand_vec_perm_even_odd (rtx, rtx, rtx, int); extern void ia64_expand_vec_setv2sf (rtx op[3]); #endif /* RTX_CODE */ -/* Defined in ia64-rust.cc */ -extern void ia64_rust_target_cpu_info (void); - #ifdef TREE_CODE #ifdef RTX_CODE extern rtx ia64_expand_builtin (tree, rtx, rtx, machine_mode, int); diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h index 271b921..bd0ef35e 100644 --- a/gcc/config/ia64/ia64.h +++ b/gcc/config/ia64/ia64.h @@ -43,8 +43,6 @@ do { \ builtin_define("__SIZEOF_FLOAT128__=16");\ } while (0) -#define TARGET_RUST_CPU_INFO ia64_rust_target_cpu_info - #ifndef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS #endif diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h index 89c08da..9351009 100644 --- a/gcc/config/ia64/linux.h +++ b/gcc/config/ia64/linux.h @@ -34,11 +34,6 @@ do { \ builtin_define("_LONGLONG"); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Need to override linux.h STARTFILE_SPEC, since it has crtbeginT.o in. */ #undef STARTFILE_SPEC #ifdef HAVE_LD_PIE diff --git a/gcc/config/ia64/t-ia64 b/gcc/config/ia64/t-ia64 index 2206dc0..3fedb7b 100644 --- a/gcc/config/ia64/t-ia64 +++ b/gcc/config/ia64/t-ia64 @@ -21,10 +21,6 @@ ia64-c.o: $(srcdir)/config/ia64/ia64-c.cc $(CONFIG_H) $(SYSTEM_H) \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/ia64/ia64-c.cc -ia64-rust.o: $(srcdir)/config/ia64/ia64-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - # genattrtab generates very long string literals. insn-attrtab.o-warn = -Wno-error diff --git a/gcc/config/ia64/vms.h b/gcc/config/ia64/vms.h index fa7f05b..81ec9db 100644 --- a/gcc/config/ia64/vms.h +++ b/gcc/config/ia64/vms.h @@ -26,9 +26,6 @@ along with GCC; see the file COPYING3. If not see builtin_define ("__IEEE_FLOAT"); \ } while (0) -#define SUBTARGET_RUST_OS_INFO() \ - do {} while (0) - /* Need .debug_line info generated from gcc and gas. */ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_DWARF2_ASM | MASK_GNU_AS) diff --git a/gcc/config/iq2000/iq2000.h b/gcc/config/iq2000/iq2000.h index 4de9b3f..3327f14 100644 --- a/gcc/config/iq2000/iq2000.h +++ b/gcc/config/iq2000/iq2000.h @@ -43,19 +43,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "iq2000"); \ - /*TODO: maybe make sub-arches features?*/ \ - if (TARGET_EMBEDDED_DATA) \ - rust_add_target_info("target_feature", "embedded-data"); \ - if (TARGET_GPOPT) \ - rust_add_target_info("target_feature", "gpopt"); \ - /*TODO: figure out if can detect no-crt0 as feature*/ \ - if (TARGET_UNINIT_CONST_IN_RODATA) \ - rust_add_target_info("target_feature", "uninit-const-in-rodata"); \ - } while (0) - /* Macros used in the machine description to test the flags. */ #define TARGET_STATS 0 diff --git a/gcc/config/kfreebsd-gnu.h b/gcc/config/kfreebsd-gnu.h index d8892bf..f74a627 100644 --- a/gcc/config/kfreebsd-gnu.h +++ b/gcc/config/kfreebsd-gnu.h @@ -35,14 +35,6 @@ along with GCC; see the file COPYING3. If not see builtin_version ("CRuntime_Glibc"); \ } while (0) -#define GNU_USER_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "kfreebsd"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #define GNU_USER_DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER #define GNU_USER_DYNAMIC_LINKER32 GLIBC_DYNAMIC_LINKER32 #define GNU_USER_DYNAMIC_LINKER64 GLIBC_DYNAMIC_LINKER64 diff --git a/gcc/config/kopensolaris-gnu.h b/gcc/config/kopensolaris-gnu.h index bdeb29a..8379f96 100644 --- a/gcc/config/kopensolaris-gnu.h +++ b/gcc/config/kopensolaris-gnu.h @@ -36,17 +36,5 @@ along with GCC; see the file COPYING3. If not see builtin_version ("CRuntime_Glibc"); \ } while (0) -#ifdef GNU_USER_TARGET_RUST_OS_INFO -# error # error "TARGET_RUST_OS_INFO already defined in kopensolaris-gnu.h - c++ undefines it and redefines it." -#endif -#define GNU_USER_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "kopensolaris"); \ - /*the target_os is maybe not right but i can't find any better atm*/ \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - #undef GNU_USER_DYNAMIC_LINKER #define GNU_USER_DYNAMIC_LINKER "/lib/ld.so.1" diff --git a/gcc/config/linux-android.h b/gcc/config/linux-android.h index 3d5548e..cf34066 100644 --- a/gcc/config/linux-android.h +++ b/gcc/config/linux-android.h @@ -31,18 +31,6 @@ builtin_version ("Android"); \ } while (0) -#define ANDROID_TARGET_RUST_OS_INFO() \ - do { \ - if (TARGET_ANDROID) { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "android"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } else { \ - builtin_rust_info ("target_os", "linux"); \ - } /*this else is required if I'm intepreting structure of defines correctly*/ \ - } while (0) - #if ANDROID_DEFAULT # define NOANDROID "mno-android" #else diff --git a/gcc/config/linux.h b/gcc/config/linux.h index ced75f11..2e888e3 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -66,20 +66,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see builtin_version ("CRuntime_Musl"); \ } while (0) -#define GNU_USER_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - /*is there way of determining target_os and target_env here since could also be android?*/ \ - /*target_vendor may not be "unknown" - FIXME ensure it is*/ \ - if (OPTION_GLIBC) \ - builtin_rust_info ("target_env", "gnu"); \ - else if (OPTION_MUSL) \ - builtin_rust_info ("target_env", "musl"); \ - else /*TODO: determine if bionic and uclibc are considered to be different envs in rustc*/ \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Determine which dynamic linker to use depending on whether GLIBC or uClibc or Bionic or musl is the default C library and whether -muclibc or -mglibc or -mbionic or -mmusl has been passed to change diff --git a/gcc/config/lm32/lm32.h b/gcc/config/lm32/lm32.h index 893c302..23f66c9 100644 --- a/gcc/config/lm32/lm32.h +++ b/gcc/config/lm32/lm32.h @@ -43,21 +43,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "lm32"); \ - if (TARGET_MULTIPLY_ENABLED) \ - rust_add_target_info("target_feature", "multiply-enabled"); \ - if (TARGET_DIVIDE_ENABLED) \ - rust_add_target_info("target_feature", "divide-enabled"); \ - if (TARGET_BARREL_SHIFT_ENABLED) \ - rust_add_target_info("target_feature", "barrel-shift-enabled"); \ - if (TARGET_SIGN_EXTEND_ENABLED) \ - rust_add_target_info("target_feature", "sign-extend-enabled"); \ - if (TARGET_USER_ENABLED) \ - rust_add_target_info("target_feature", "user-enabled"); \ - } while (0) - #undef ASM_SPEC #define ASM_SPEC "\ %{mmultiply-enabled} \ diff --git a/gcc/config/lm32/rtems.h b/gcc/config/lm32/rtems.h index 54231d0..80c5234 100644 --- a/gcc/config/lm32/rtems.h +++ b/gcc/config/lm32/rtems.h @@ -33,18 +33,5 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (lm32) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family - TODO*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Use the default */ #undef LINK_GCC_C_SEQUENCE_SPEC diff --git a/gcc/config/lm32/uclinux-elf.h b/gcc/config/lm32/uclinux-elf.h index 8ca37c7..8657122 100644 --- a/gcc/config/lm32/uclinux-elf.h +++ b/gcc/config/lm32/uclinux-elf.h @@ -67,8 +67,6 @@ #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #undef LINK_GCC_C_SEQUENCE_SPEC #define LINK_GCC_C_SEQUENCE_SPEC \ "%{static|static-pie:--start-group} %G %{!nolibc:%L} \ diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h index 665af2b..af99103 100644 --- a/gcc/config/m32c/m32c.h +++ b/gcc/config/m32c/m32c.h @@ -80,21 +80,6 @@ builtin_define ("__m32c_cpu__=1"); \ } -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "m32c"); \ - if (TARGET_R8C) \ - rust_add_target_info("target_feature", "r8c"); \ - if (TARGET_M16C) \ - rust_add_target_info("target_feature", "m16c"); \ - if (TARGET_M32CM) \ - rust_add_target_info("target_feature", "m32cm"); \ - if (TARGET_M32C) \ - rust_add_target_info("target_feature", "m32c"); \ - /*TODO: find way of getting sim info?*/ \ - /*TODO: find way of defining memregs usefully?*/ \ - } while (0) - /* The pragma handlers need to know if we've started processing functions yet, as the memregs pragma should only be given at the beginning of the file. This variable starts off TRUE and later diff --git a/gcc/config/m32c/rtems.h b/gcc/config/m32c/rtems.h index 4483a85..553f77c 100644 --- a/gcc/config/m32c/rtems.h +++ b/gcc/config/m32c/rtems.h @@ -34,18 +34,5 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (m32c) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family - TODO*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Use the default */ #undef LINK_GCC_C_SEQUENCE_SPEC diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h index 9faedd4..05661bf 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h @@ -60,8 +60,6 @@ along with GCC; see the file COPYING3. If not see /* Target OS builtins. */ #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" diff --git a/gcc/config/m68k/m68k-protos.h b/gcc/config/m68k/m68k-protos.h index 573da44..3139eb8 100644 --- a/gcc/config/m68k/m68k-protos.h +++ b/gcc/config/m68k/m68k-protos.h @@ -101,9 +101,6 @@ extern enum attr_op_mem m68k_sched_attr_op_mem (rtx_insn *); #endif /* RTX_CODE */ -/* Defined in m68k-rust.cc */ -extern void m68k_rust_target_cpu_info (void); - extern enum reg_class m68k_secondary_reload_class (enum reg_class, machine_mode, rtx); extern enum reg_class m68k_preferred_reload_class (rtx, enum reg_class); diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h index 31b83c6..cd353db 100644 --- a/gcc/config/m68k/m68k.h +++ b/gcc/config/m68k/m68k.h @@ -196,8 +196,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_CPU_INFO m68k_rust_target_cpu_info - /* Classify the groups of pseudo-ops used to assemble QI, HI and SI quantities. */ #define INT_OP_STANDARD 0 /* .byte, .short, .long */ diff --git a/gcc/config/m68k/m68kemb.h b/gcc/config/m68k/m68kemb.h index 783c05c..ee55faf 100644 --- a/gcc/config/m68k/m68kemb.h +++ b/gcc/config/m68k/m68kemb.h @@ -39,16 +39,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: assuming that embedded means "no operating system", at least by rustc terms*/ \ - /*basing this all on embedinomicon sample targets*/ \ - builtin_rust_info ("target_family", ""); \ - builtin_rust_info ("target_os", "none"); \ - builtin_rust_info ("target_vendor", ""); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Override the default LIB_SPEC from gcc.cc. We don't currently support profiling, or libg.a. */ diff --git a/gcc/config/m68k/netbsd-elf.h b/gcc/config/m68k/netbsd-elf.h index a28d45e..d262b60 100644 --- a/gcc/config/m68k/netbsd-elf.h +++ b/gcc/config/m68k/netbsd-elf.h @@ -35,11 +35,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Don't try using XFmode on the 68010. */ #undef LONG_DOUBLE_TYPE_SIZE #define LONG_DOUBLE_TYPE_SIZE (TARGET_68020 ? 80 : 64) diff --git a/gcc/config/m68k/openbsd.h b/gcc/config/m68k/openbsd.h index 2cfd341..63c57fd 100644 --- a/gcc/config/m68k/openbsd.h +++ b/gcc/config/m68k/openbsd.h @@ -28,11 +28,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - OPENBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Define __HAVE_68881__ in preprocessor, unless -msoft-float is specified. This will control the use of inline 68881 insns in certain macros. */ #undef CPP_SPEC diff --git a/gcc/config/m68k/rtemself.h b/gcc/config/m68k/rtemself.h index 1b108f5..4a796e8 100644 --- a/gcc/config/m68k/rtemself.h +++ b/gcc/config/m68k/rtemself.h @@ -36,14 +36,3 @@ builtin_assert ("system=rtems"); \ } \ while (0) - -#undef TARGET_RUST_OS_INFO /* This undef is actually necessary because m68kemb.h assumes embedded. */ -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family - TODO*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/m68k/t-opts b/gcc/config/m68k/t-opts index 5e43b47..391a931 100644 --- a/gcc/config/m68k/t-opts +++ b/gcc/config/m68k/t-opts @@ -6,7 +6,3 @@ $(srcdir)/config/m68k/m68k-tables.opt: $(srcdir)/config/m68k/genopt.sh \ $(srcdir)/config/m68k/m68k-microarchs.def $(SHELL) $(srcdir)/config/m68k/genopt.sh $(srcdir)/config/m68k > \ $(srcdir)/config/m68k/m68k-tables.opt - -m68k-rust.o: $(srcdir)/config/m68k/m68k-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/m68k/uclinux.h b/gcc/config/m68k/uclinux.h index f563636..e438b6e 100644 --- a/gcc/config/m68k/uclinux.h +++ b/gcc/config/m68k/uclinux.h @@ -58,19 +58,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in uclinux.h (m68k) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc does not distinguish between uclinux and regular linux kernels*/ \ - /*TODO: check whether defining this as GNU_USER_TARGET_RUST_OS_INFO would have different behaviour*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "linux"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - /* -msep-data is the default PIC mode on this target. */ #define DRIVER_SELF_SPECS \ "%{" FPIE_OR_FPIC_SPEC ":%{!msep-data:%{!mid-shared-library: -msep-data}}}" diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h index f7b9fd6..c905c40 100644 --- a/gcc/config/mcore/mcore.h +++ b/gcc/config/mcore/mcore.h @@ -49,31 +49,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "mcore"); \ - if (TARGET_M340) \ - rust_add_target_info("target_feature", "m340"); \ - else \ - rust_add_target_info("target_feature", "m210"); \ - if (TARGET_OVERALIGN_FUNC) \ - rust_add_target_info("target_feature", "4byte-functions"); \ - if (TARGET_CG_DATA) \ - rust_add_target_info("target_feature", "callgraph-data"); \ - if (TARGET_DIV) \ - rust_add_target_info("target_feature", "div"); \ - if (TARGET_HARDLIT) \ - rust_add_target_info("target_feature", "hardlit"); \ - /*TODO: find way of getting no-lsim info?*/ \ - if (TARGET_RELAX_IMM) \ - rust_add_target_info("target_feature", "relax-immediates"); \ - if (TARGET_SLOW_BYTES) \ - rust_add_target_info("target_feature", "slow-bytes"); \ - /*TODO: find way of defining stack-increment usefully?*/ \ - if (TARGET_W_FIELD) \ - rust_add_target_info("target_feature", "wide-bitfields"); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "%{m210:%{mlittle-endian:%ethe m210 does not have little endian support}}" diff --git a/gcc/config/microblaze/linux.h b/gcc/config/microblaze/linux.h index a75cec2..5b1a365 100644 --- a/gcc/config/microblaze/linux.h +++ b/gcc/config/microblaze/linux.h @@ -58,9 +58,4 @@ #undef TARGET_OS_CPP_BUILTINS #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in linux.h (microblaze) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack diff --git a/gcc/config/microblaze/rtems.h b/gcc/config/microblaze/rtems.h index 17be833..d2c6afd 100644 --- a/gcc/config/microblaze/rtems.h +++ b/gcc/config/microblaze/rtems.h @@ -29,14 +29,6 @@ builtin_assert( "system=rtems" ); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Redefine to include only items relevant for RTEMS */ #undef LINK_SPEC #define LINK_SPEC "%{shared:-shared} -N -relax \ diff --git a/gcc/config/mips/gnu-user.h b/gcc/config/mips/gnu-user.h index fb0c36e..6aad719 100644 --- a/gcc/config/mips/gnu-user.h +++ b/gcc/config/mips/gnu-user.h @@ -38,11 +38,6 @@ along with GCC; see the file COPYING3. If not see builtin_define ("_GNU_SOURCE"); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" diff --git a/gcc/config/mips/linux-common.h b/gcc/config/mips/linux-common.h index 4a7d6de..cf7713b 100644 --- a/gcc/config/mips/linux-common.h +++ b/gcc/config/mips/linux-common.h @@ -30,10 +30,6 @@ along with GCC; see the file COPYING3. If not see #define EXTRA_TARGET_D_OS_VERSIONS() \ ANDROID_TARGET_D_OS_VERSIONS(); -#define EXTRA_TARGET_RUST_OS_INFO() \ - ANDROID_TARGET_RUST_OS_INFO(); -/*TODO: ensure that correct target data is being set here. */ - #undef LINK_SPEC #define LINK_SPEC \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LINK_SPEC, \ diff --git a/gcc/config/mips/mips-protos.h b/gcc/config/mips/mips-protos.h index 3fa5031..9d0f4d9 100644 --- a/gcc/config/mips/mips-protos.h +++ b/gcc/config/mips/mips-protos.h @@ -392,7 +392,4 @@ extern void mips_expand_vec_cmp_expr (rtx *); extern void mips_d_target_versions (void); extern void mips_d_register_target_info (void); -/* Routines implemented in mips-rust.cc */ -extern void mips_rust_target_cpu_info (void); - #endif /* ! GCC_MIPS_PROTOS_H */ diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 684b5d2..bf5c1d5 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -684,9 +684,6 @@ struct mips_cpu_info { #define TARGET_D_CPU_VERSIONS mips_d_target_versions #define TARGET_D_REGISTER_CPU_TARGET_INFO mips_d_register_target_info -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO mips_rust_target_cpu_info - /* Default target_flags if no switches are specified */ #ifndef TARGET_DEFAULT diff --git a/gcc/config/mips/netbsd.h b/gcc/config/mips/netbsd.h index 3691a33..2ed594e 100644 --- a/gcc/config/mips/netbsd.h +++ b/gcc/config/mips/netbsd.h @@ -45,11 +45,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* The generic MIPS TARGET_CPU_CPP_BUILTINS are incorrect for NetBSD. Specifically, they define too many namespace-invasive macros. Override them here. Note this is structured for easy comparison to the version diff --git a/gcc/config/mips/rtems.h b/gcc/config/mips/rtems.h index 6bb01b6..df8c28f 100644 --- a/gcc/config/mips/rtems.h +++ b/gcc/config/mips/rtems.h @@ -32,16 +32,6 @@ do { \ builtin_assert ("system=rtems"); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* No sdata. * The RTEMS BSPs expect -G0 */ diff --git a/gcc/config/mips/sdemtk.h b/gcc/config/mips/sdemtk.h index 13034dd..f802d8b 100644 --- a/gcc/config/mips/sdemtk.h +++ b/gcc/config/mips/sdemtk.h @@ -53,17 +53,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: WTF is SDE and why can't I find any info on it? is it even a real os?*/ \ - /*note: as far as I know, rustc has no supported for sde, so this is just guessed*/ \ - /*literally everything is subject to change because of the lack of info I can find on it*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "sde"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* For __clear_cache in libgcc2.c. */ #ifdef IN_LIBGCC2 extern void mips_sync_icache (void *beg, unsigned long len); diff --git a/gcc/config/mips/t-mips b/gcc/config/mips/t-mips index 22d77bc..d7a934f 100644 --- a/gcc/config/mips/t-mips +++ b/gcc/config/mips/t-mips @@ -28,7 +28,3 @@ frame-header-opt.o: $(srcdir)/config/mips/frame-header-opt.cc mips-d.o: $(srcdir)/config/mips/mips-d.cc $(COMPILE) $< $(POSTCOMPILE) - -mips-rust.o: $(srcdir)/config/mips/mips-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/mips/vxworks.h b/gcc/config/mips/vxworks.h index 46c03d7c..11a71e0 100644 --- a/gcc/config/mips/vxworks.h +++ b/gcc/config/mips/vxworks.h @@ -58,11 +58,6 @@ VXWORKS_LINK_SPEC } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - VXWORKS_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC VXWORKS_ADDITIONAL_CPP_SPEC diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h index 16ede65..0fc45db 100644 --- a/gcc/config/mmix/mmix.h +++ b/gcc/config/mmix/mmix.h @@ -133,32 +133,6 @@ struct GTY(()) machine_function } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "mmix"); \ - /*ignoring libfuncs as options say to get rid of it*/ \ - if (TARGET_ABI_GNU) \ - rust_add_target_info("target_feature", "abi-gnu"); \ - else \ - rust_add_target_info("target_feature", "abi-mmixware"); \ - if (TARGET_FCMP_EPSILON) \ - rust_add_target_info("target_feature", "epsilon"); \ - if (TARGET_ZERO_EXTEND) \ - rust_add_target_info("target_feature", "zero-extend"); \ - if (TARGET_KNUTH_DIVISION) \ - rust_add_target_info("target_feature", "knuthdiv"); \ - if (TARGET_TOPLEVEL_SYMBOLS) \ - rust_add_target_info("target_feature", "toplevel-symbols"); \ - if (TARGET_BRANCH_PREDICT) \ - rust_add_target_info("target_feature", "branch-predict"); \ - if (TARGET_BASE_ADDRESSES) \ - rust_add_target_info("target_feature", "base-addresses"); \ - if (!(USE_RETURN_INSN)) \ - rust_add_target_info("target_feature", "single-exit"); \ - /*TODO: find way of getting no-set-program-start and elf info?*/ \ - /*TODO: find way of defining set-program-start, set-data-start usefully?*/ \ - } while (0) - #define TARGET_DEFAULT \ (MASK_BRANCH_PREDICT | MASK_BASE_ADDRESSES | MASK_USE_RETURN_INSN) diff --git a/gcc/config/mn10300/linux.h b/gcc/config/mn10300/linux.h index ec88060..8cb16f6 100644 --- a/gcc/config/mn10300/linux.h +++ b/gcc/config/mn10300/linux.h @@ -24,8 +24,6 @@ #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #undef CPP_SPEC #define CPP_SPEC "%{mam33:-D__AM33__} %{!mam33:-D__AM33__=2 -D__AM33_2__} \ %{posix:-D_POSIX_SOURCE} \ diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h index 43f8ded..bc57f4b 100644 --- a/gcc/config/mn10300/mn10300.h +++ b/gcc/config/mn10300/mn10300.h @@ -58,26 +58,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "mn10300"); \ - if (TARGET_AM33) \ - rust_add_target_info("target_feature", "am33"); \ - else if (TARGET_AM33_2) \ - rust_add_target_info("target_feature", "am33-2"); \ - else if (TARGET_AM34) \ - rust_add_target_info("target_feature", "am34"); \ - if (TARGET_MULT_BUG) \ - rust_add_target_info("target_feature", "mult-bug"); \ - if (TARGET_PTR_A0D0) \ - rust_add_target_info("target_feature", "return-pointer-on-d0"); \ - if (TARGET_ALLOW_LIW) \ - rust_add_target_info("target_feature", "liw"); \ - if (TARGET_ALLOW_SETLB) \ - rust_add_target_info("target_feature", "setlb"); \ - /*TODO: find way of getting no-crt0 and relax info?*/ \ - } while (0) - #ifndef MN10300_OPTS_H #include "config/mn10300/mn10300-opts.h" #endif diff --git a/gcc/config/moxie/moxie.h b/gcc/config/moxie/moxie.h index 981f000..7bd4581 100644 --- a/gcc/config/moxie/moxie.h +++ b/gcc/config/moxie/moxie.h @@ -423,18 +423,6 @@ enum reg_class builtin_define ("__MOXIE_BIG_ENDIAN__"); \ } -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "moxie"); \ - if (TARGET_LITTLE_ENDIAN) \ - rust_add_target_info("target_feature", "el"); \ - else \ - rust_add_target_info("target_feature", "eb"); \ - if (TARGET_HAS_MULX) \ - rust_add_target_info("target_feature", "mul.x"); \ - /*TODO: find way of getting no-crt0 info?*/ \ - } while (0) - #define HAS_LONG_UNCOND_BRANCH true #endif /* GCC_MOXIE_H */ diff --git a/gcc/config/moxie/moxiebox.h b/gcc/config/moxie/moxiebox.h index 64e7f4e..b2620ad 100644 --- a/gcc/config/moxie/moxiebox.h +++ b/gcc/config/moxie/moxiebox.h @@ -28,16 +28,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: rustc has no supported for moxiebox, so this is just guessed - values subject to change*/ \ - /*I can find virtually no info on target triples, so target_family and target_vendor most of all*/ \ - builtin_rust_info ("target_family", ""); \ - builtin_rust_info ("target_os", "moxiebox"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #undef LIB_SPEC #define LIB_SPEC \ "%{!T*:-Tmoxiebox.ld} \ diff --git a/gcc/config/moxie/rtems.h b/gcc/config/moxie/rtems.h index e80a666..737f923 100644 --- a/gcc/config/moxie/rtems.h +++ b/gcc/config/moxie/rtems.h @@ -33,16 +33,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #undef LINK_SPEC #undef SIZE_TYPE #undef PTRDIFF_TYPE diff --git a/gcc/config/moxie/uclinux.h b/gcc/config/moxie/uclinux.h index 7b55e20..b84d532 100644 --- a/gcc/config/moxie/uclinux.h +++ b/gcc/config/moxie/uclinux.h @@ -30,8 +30,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #undef TARGET_LIBC_HAS_FUNCTION #define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function diff --git a/gcc/config/msp430/msp430.h b/gcc/config/msp430/msp430.h index 54997b6..3966765 100644 --- a/gcc/config/msp430/msp430.h +++ b/gcc/config/msp430/msp430.h @@ -44,23 +44,6 @@ extern bool msp430x; } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do \ - { \ - rust_add_target_info ("target_arch", "msp430"); \ - /*TODO: ensure below variables work*/ \ - if (msp430_hwmult_type == MSP430_HWMULT_SMALL) \ - rust_add_target_info ("target_feature", "hwmult16"); \ - else if (msp430_hwmult_type == MSP430_HWMULT_LARGE) \ - rust_add_target_info ("target_feature", "hwmult32"); \ - else if (msp430_hwmult_type == MSP430_HWMULT_F5SERIES) \ - rust_add_target_info ("target_feature", "hwmultf5"); \ - if (msp430x) \ - rust_add_target_info ("target_feature", "ext"); \ - /*TODO: add other options that aren't in llvm?*/ \ - } \ - while (0) - /* For the "c" language where exceptions are implicitly disabled, use crt*_no_eh.o unless -fexceptions is passed. For other languages, only use crt*_no_eh.o if -fno-exceptions is explicitly passed. */ diff --git a/gcc/config/nds32/linux.h b/gcc/config/nds32/linux.h index 66b640c..831be81 100644 --- a/gcc/config/nds32/linux.h +++ b/gcc/config/nds32/linux.h @@ -36,11 +36,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #ifdef TARGET_BIG_ENDIAN_DEFAULT #define LD_SO_ENDIAN_SPEC "%{mlittle-endian:le}%{!mlittle-endian:be}" #else diff --git a/gcc/config/nds32/nds32-protos.h b/gcc/config/nds32/nds32-protos.h index e525656..377423c 100644 --- a/gcc/config/nds32/nds32-protos.h +++ b/gcc/config/nds32/nds32-protos.h @@ -319,9 +319,6 @@ extern int nds32_address_cost_impl (rtx, machine_mode, addr_space_t, bool); /* Auxiliary functions for pre-define marco. */ extern void nds32_cpu_cpp_builtins(struct cpp_reader *); -/* Routines implemented in nds32-rust.cc */ -extern void nds32_rust_target_cpu_info (void); - /* Auxiliary functions for const_vector's constraints. */ extern HOST_WIDE_INT const_vector_to_hwint (rtx); diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h index 9f6d172..18ef8ae 100644 --- a/gcc/config/nds32/nds32.h +++ b/gcc/config/nds32/nds32.h @@ -1006,9 +1006,6 @@ enum nds32_builtins #define TARGET_CPU_CPP_BUILTINS() \ nds32_cpu_cpp_builtins (pfile) -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO nds32_rust_target_cpu_info - /* Defining Data Structures for Per-function Information. */ diff --git a/gcc/config/nds32/t-nds32 b/gcc/config/nds32/t-nds32 index 36c3da4..3833f3d 100644 --- a/gcc/config/nds32/t-nds32 +++ b/gcc/config/nds32/t-nds32 @@ -144,7 +144,3 @@ nds32-utils.o: \ intl.h libfuncs.h $(PARAMS_H) $(OPTS_H) $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/nds32/nds32-utils.cc - -nds32-rust.o: $(srcdir)/config/nds32/nds32-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h index 8e6bd0a2..9e46a0f 100644 --- a/gcc/config/netbsd.h +++ b/gcc/config/netbsd.h @@ -29,15 +29,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -/* TARGET_RUST_OS_INFO() common to all NetBSD targets. */ -#define NETBSD_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "netbsd"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* CPP_SPEC parts common to all NetBSD targets. */ #define NETBSD_CPP_SPEC \ "%{posix:-D_POSIX_SOURCE} \ diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h index f15b999..f5dd813 100644 --- a/gcc/config/nios2/linux.h +++ b/gcc/config/nios2/linux.h @@ -26,11 +26,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" diff --git a/gcc/config/nios2/nios2-protos.h b/gcc/config/nios2/nios2-protos.h index de3be71..62de3a8 100644 --- a/gcc/config/nios2/nios2-protos.h +++ b/gcc/config/nios2/nios2-protos.h @@ -30,9 +30,6 @@ extern bool nios2_expand_return (void); extern void nios2_function_profiler (FILE *, int); extern bool nios2_fpu_insn_enabled (enum n2fpu_code); -/* Routines implemented in nios2-rust.cc */ -extern void nios2_rust_target_cpu_info (void); - #ifdef RTX_CODE extern bool nios2_large_constant_p (rtx); extern bool nios2_large_constant_memory_operand_p (rtx); diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h index 9d1d99a..7c7d5c0 100644 --- a/gcc/config/nios2/nios2.h +++ b/gcc/config/nios2/nios2.h @@ -44,9 +44,6 @@ } \ while (0) -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO nios2_rust_target_cpu_info - /* We're little endian, unless otherwise specified by defining BIG_ENDIAN_FLAG. */ #ifndef TARGET_ENDIAN_DEFAULT diff --git a/gcc/config/nios2/rtems.h b/gcc/config/nios2/rtems.h index 5a8a1a8..a96c67b 100644 --- a/gcc/config/nios2/rtems.h +++ b/gcc/config/nios2/rtems.h @@ -32,16 +32,6 @@ do { \ builtin_assert ("system=rtems"); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* This toolchain implements the ABI for Linux Systems documented in the Nios II Processor Reference Handbook. diff --git a/gcc/config/nios2/t-nios2 b/gcc/config/nios2/t-nios2 index f48788c..1649924 100644 --- a/gcc/config/nios2/t-nios2 +++ b/gcc/config/nios2/t-nios2 @@ -25,7 +25,3 @@ # MULTILIB_OPTIONS += EL/EB # MULTILIB_DIRNAMES += le be # MULTILIB_MATCHES += EL=mel EB=meb - -nios2-rust.o: $(srcdir)/config/nios2/nios2-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/nvptx/nvptx-protos.h b/gcc/config/nvptx/nvptx-protos.h index 4e4cbd1..3d6ad14 100644 --- a/gcc/config/nvptx/nvptx-protos.h +++ b/gcc/config/nvptx/nvptx-protos.h @@ -44,9 +44,6 @@ extern void nvptx_cpu_cpp_builtins (void); extern void nvptx_register_pragmas (void); extern unsigned int nvptx_data_alignment (const_tree, unsigned int); -/* Routines implemented in nvptx-rust.cc */ -extern void nvptx_rust_target_cpu_info (void); - #ifdef RTX_CODE extern void nvptx_expand_oacc_fork (unsigned); extern void nvptx_expand_oacc_join (unsigned); diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h index 9a52ade..9fda2f0 100644 --- a/gcc/config/nvptx/nvptx.h +++ b/gcc/config/nvptx/nvptx.h @@ -36,8 +36,6 @@ #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins () -#define TARGET_RUST_CPU_INFO nvptx_rust_target_cpu_info - /* Avoid the default in ../../gcc.cc, which adds "-pthread", which is not supported for nvptx. */ #define GOMP_SELF_SPECS "" diff --git a/gcc/config/nvptx/t-nvptx b/gcc/config/nvptx/t-nvptx index fa03a2e..b170766 100644 --- a/gcc/config/nvptx/t-nvptx +++ b/gcc/config/nvptx/t-nvptx @@ -14,7 +14,3 @@ mkoffload$(exeext): mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBS) MULTILIB_OPTIONS = mgomp - -nvptx-rust.o: $(srcdir)/config/nvptx/nvptx-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/openbsd.h b/gcc/config/openbsd.h index d91e1e9..54be222 100644 --- a/gcc/config/openbsd.h +++ b/gcc/config/openbsd.h @@ -102,14 +102,6 @@ while (0) } \ while (0) -#define OPENBSD_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "openbsd"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while(0) - /* CPP_SPEC appropriate for OpenBSD. We deal with -posix and -pthread. XXX the way threads are handled currently is not very satisfying, since all code must be compiled with -pthread to work. diff --git a/gcc/config/or1k/linux.h b/gcc/config/or1k/linux.h index fda6c59..52909af 100644 --- a/gcc/config/or1k/linux.h +++ b/gcc/config/or1k/linux.h @@ -27,8 +27,6 @@ #define TARGET_OS_CPP_BUILTINS() \ GNU_USER_TARGET_OS_CPP_BUILTINS () -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-or1k.so.1" #undef MUSL_DYNAMIC_LINKER diff --git a/gcc/config/or1k/or1k-protos.h b/gcc/config/or1k/or1k-protos.h index 08e4e7f..5e96a63 100644 --- a/gcc/config/or1k/or1k-protos.h +++ b/gcc/config/or1k/or1k-protos.h @@ -29,9 +29,6 @@ extern void or1k_expand_move (machine_mode, rtx, rtx); extern void or1k_expand_compare (rtx *); extern void or1k_expand_call (rtx, rtx, rtx, bool); -/* Routines implemented in or1k-rust.cc */ -extern void or1k_rust_target_cpu_info (void); - #ifdef RTX_CODE void or1k_expand_atomic_compare_and_swap (rtx operands[]); void or1k_expand_atomic_compare_and_swap_qihi (rtx operands[]); diff --git a/gcc/config/or1k/or1k.h b/gcc/config/or1k/or1k.h index 6498a1a..18a526d 100644 --- a/gcc/config/or1k/or1k.h +++ b/gcc/config/or1k/or1k.h @@ -39,8 +39,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO or1k_rust_target_cpu_info - #define TARGET_CMODEL_SMALL \ (or1k_code_model == CMODEL_SMALL) #define TARGET_CMODEL_LARGE \ diff --git a/gcc/config/or1k/rtems.h b/gcc/config/or1k/rtems.h index 931cfc0..a4f38cd 100644 --- a/gcc/config/or1k/rtems.h +++ b/gcc/config/or1k/rtems.h @@ -29,19 +29,5 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (or1k) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #define RTEMS_STARTFILE_SPEC "crtbegin%O%s" #define RTEMS_ENDFILE_SPEC "crtend%O%s" - diff --git a/gcc/config/or1k/t-or1k b/gcc/config/or1k/t-or1k index d8e9683..7862a76 100644 --- a/gcc/config/or1k/t-or1k +++ b/gcc/config/or1k/t-or1k @@ -20,7 +20,3 @@ comma=, MULTILIB_OPTIONS = $(subst $(comma), ,$(TM_MULTILIB_CONFIG)) - -or1k-rust.o: $(srcdir)/config/or1k/or1k-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/pa/pa-hpux.h b/gcc/config/pa/pa-hpux.h index cfaf49c..bf8a9cd 100644 --- a/gcc/config/pa/pa-hpux.h +++ b/gcc/config/pa/pa-hpux.h @@ -89,18 +89,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in pa-hpux.h (pa) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: rustc has no supported for hp-ux, so this is subject to change (and guessed)*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "hpux"); \ - builtin_rust_info ("target_vendor", "hp"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Like the default, except no -lg. */ #undef LIB_SPEC #define LIB_SPEC "%{!shared:%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: -L/lib/libp/ -lc}}" diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h index e71fe11..9297768 100644 --- a/gcc/config/pa/pa-hpux10.h +++ b/gcc/config/pa/pa-hpux10.h @@ -90,18 +90,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in pa-hpux10.h (pa) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: rustc has no supported for hp-ux, so this is subject to change (and guessed)*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "hpux"); \ - builtin_rust_info ("target_vendor", "hp"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #define CPP_SPEC "%{threads: -D_REENTRANT -D_DCE_THREADS}" /* We can debug dynamically linked executables on hpux9; we also want diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h index 8387425..b29dcd1 100644 --- a/gcc/config/pa/pa-hpux11.h +++ b/gcc/config/pa/pa-hpux11.h @@ -119,18 +119,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in pa-hpux11.h (pa) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: rustc has no supported for hp-ux, so this is subject to change (and guessed)*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "hpux"); \ - builtin_rust_info ("target_vendor", "hp"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC \ "%{mt|pthread:-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L}" diff --git a/gcc/config/pa/pa-linux.h b/gcc/config/pa/pa-linux.h index 6c3be29..5af11a1 100644 --- a/gcc/config/pa/pa-linux.h +++ b/gcc/config/pa/pa-linux.h @@ -27,14 +27,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in pa-linux.h (pa) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" diff --git a/gcc/config/pa/pa-netbsd.h b/gcc/config/pa/pa-netbsd.h index 271fdd5..f5eaec6 100644 --- a/gcc/config/pa/pa-netbsd.h +++ b/gcc/config/pa/pa-netbsd.h @@ -27,14 +27,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in pa-netbsd.h (pa) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC NETBSD_CPP_SPEC diff --git a/gcc/config/pa/pa-openbsd.h b/gcc/config/pa/pa-openbsd.h index 52100b7..455294f 100644 --- a/gcc/config/pa/pa-openbsd.h +++ b/gcc/config/pa/pa-openbsd.h @@ -27,14 +27,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in pa-openbsd.h (pa) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - OPENBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Our profiling scheme doesn't LP labels and counter words. */ #define NO_DEFERRED_PROFILE_COUNTERS 1 diff --git a/gcc/config/pa/pa-protos.h b/gcc/config/pa/pa-protos.h index 96c4c8f..d474d9e 100644 --- a/gcc/config/pa/pa-protos.h +++ b/gcc/config/pa/pa-protos.h @@ -115,6 +115,3 @@ extern const int pa_magic_milli[]; /* Routines implemented in pa-d.cc */ extern void pa_d_target_versions (void); extern void pa_d_register_target_info (void); - -/* Routines implemented in pa-rust.cc */ -extern void pa_rust_target_cpu_info (void); diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 84d0f81..92d3d18 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -185,8 +185,6 @@ do { \ builtin_define("__SIZEOF_FLOAT128__=16"); \ } while (0) -#define TARGET_RUST_CPU_INFO pa_rust_target_cpu_info - /* An old set of OS defines for various BSD-like systems. */ #define TARGET_OS_CPP_BUILTINS() \ do \ @@ -204,8 +202,6 @@ do { \ } \ while (0) -/* TODO: is a TARGET_RUST_OS_INFO() required here? probably not */ - #define CC1_SPEC "%{pg:} %{p:}" #define LINK_SPEC "%{mlinker-opt:-O} %{!shared:-u main} %{shared:-b}" diff --git a/gcc/config/pa/t-pa b/gcc/config/pa/t-pa index 536dab9..2428280 100644 --- a/gcc/config/pa/t-pa +++ b/gcc/config/pa/t-pa @@ -2,6 +2,3 @@ pa-d.o: $(srcdir)/config/pa/pa-d.cc $(COMPILE) $< $(POSTCOMPILE) -pa-rust.o: $(srcdir)/config/pa/pa-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/pdp11/pdp11-protos.h b/gcc/config/pdp11/pdp11-protos.h index 19592ea..5fd524b 100644 --- a/gcc/config/pdp11/pdp11-protos.h +++ b/gcc/config/pdp11/pdp11-protos.h @@ -55,6 +55,3 @@ extern void pdp11_gen_int_label (char *, const char *, int); extern void pdp11_output_labelref (FILE *, const char *); extern void pdp11_output_def (FILE *, const char *, const char *); extern void pdp11_output_addr_vec_elt (FILE *, int); - -/* Routines implemented in pdp11-rust.cc */ -extern void pdp11_rust_target_cpu_info (void); diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h index 6f176ff..b7d66c3 100644 --- a/gcc/config/pdp11/pdp11.h +++ b/gcc/config/pdp11/pdp11.h @@ -49,7 +49,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_CPU_INFO pdp11_rust_target_cpu_info /* Generate DBX debugging information. */ diff --git a/gcc/config/pdp11/t-pdp11 b/gcc/config/pdp11/t-pdp11 index fa4ba83..25cfbb5 100644 --- a/gcc/config/pdp11/t-pdp11 +++ b/gcc/config/pdp11/t-pdp11 @@ -29,7 +29,3 @@ CRTSTUFF_T_CFLAGS = -Os # We could say "-Werror -Wno-error=type-limits", alas, not all supported # gcc bootstrap compilers support the latter option. dwarf2out.o-warn = -Wno-error - -pdp11-rust.o: $(srcdir)/config/pdp11/pdp11-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/phoenix.h b/gcc/config/phoenix.h index e9dbbd0..d9eef35 100644 --- a/gcc/config/phoenix.h +++ b/gcc/config/phoenix.h @@ -26,18 +26,6 @@ along with GCC; see the file COPYING3. If not see builtin_assert ("system=unix"); \ } while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in phoenix.h - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "phoenix"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - /*TODO: ensure these values are correct*/ \ - } while(0) - #define STD_LIB_SPEC "%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" /* This will prevent selecting 'unsigned long int' instead of 'unsigned int' as 'uint32_t' in stdint-newlib.h. */ diff --git a/gcc/config/pru/pru.h b/gcc/config/pru/pru.h index 271b816..8498859 100644 --- a/gcc/config/pru/pru.h +++ b/gcc/config/pru/pru.h @@ -37,21 +37,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "pru"); \ - if (TARGET_MINRT) \ - rust_add_target_info("target_feature", "minrt"); \ - if (TARGET_OPT_LOOP) \ - rust_add_target_info("target_feature", "loop"); \ - if (pru_current_abi == PRU_ABI_GNU) \ - rust_add_target_info("target_feature", "abi-gnu"); \ - else if (pru_current_abi == PRU_ABI_TI) \ - rust_add_target_info("target_feature", "abi-ti"); \ - /*TODO: find way of getting no-relax and mcu info?*/ \ - /*TODO: add additional options for the changed abi things (e.g. pointer size, return value)?*/ \ - } while (0) - /* TI ABI implementation is not feature-complete enough (e.g. function pointers are not supported), so we cannot list it as a multilib variant. To prevent misuse from users, do not link any of the standard libraries. */ diff --git a/gcc/config/riscv/linux.h b/gcc/config/riscv/linux.h index df55f61..3880372 100644 --- a/gcc/config/riscv/linux.h +++ b/gcc/config/riscv/linux.h @@ -22,11 +22,6 @@ along with GCC; see the file COPYING3. If not see GNU_USER_TARGET_OS_CPP_BUILTINS(); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-riscv" XLEN_SPEC "-" ABI_SPEC ".so.1" #define MUSL_ABI_SUFFIX \ diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-protos.h index 92aa867..20c2381 100644 --- a/gcc/config/riscv/riscv-protos.h +++ b/gcc/config/riscv/riscv-protos.h @@ -82,9 +82,6 @@ void riscv_cpu_cpp_builtins (cpp_reader *); extern void riscv_d_target_versions (void); extern void riscv_d_register_target_info (void); -/* Routines implemented in riscv-rust.cc */ -extern void riscv_rust_target_cpu_info (void); - /* Routines implemented in riscv-builtins.cc. */ extern void riscv_atomic_assign_expand_fenv (tree *, tree *, tree *); extern rtx riscv_expand_builtin (tree, rtx, rtx, machine_mode, int); diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h index 78e224b..6956684 100644 --- a/gcc/config/riscv/riscv.h +++ b/gcc/config/riscv/riscv.h @@ -31,9 +31,6 @@ along with GCC; see the file COPYING3. If not see #define TARGET_D_CPU_VERSIONS riscv_d_target_versions #define TARGET_D_REGISTER_CPU_TARGET_INFO riscv_d_register_target_info -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO riscv_rust_target_cpu_info - #ifdef TARGET_BIG_ENDIAN_DEFAULT #define DEFAULT_ENDIAN_SPEC "b" #else diff --git a/gcc/config/riscv/rtems.h b/gcc/config/riscv/rtems.h index b00b6b2..14e5e59 100644 --- a/gcc/config/riscv/rtems.h +++ b/gcc/config/riscv/rtems.h @@ -29,16 +29,3 @@ builtin_define ("__USE_INIT_FINI__"); \ builtin_assert ("system=rtems"); \ } while (0) - -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (riscv) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/riscv/t-riscv b/gcc/config/riscv/t-riscv index a3947a5..096d70e 100644 --- a/gcc/config/riscv/t-riscv +++ b/gcc/config/riscv/t-riscv @@ -28,7 +28,3 @@ PASSES_EXTRA += $(srcdir)/config/riscv/riscv-passes.def $(common_out_file): $(srcdir)/config/riscv/riscv-cores.def \ $(srcdir)/config/riscv/riscv-protos.h \ $(srcdir)/config/riscv/riscv-subset.h - -riscv-rust.o: $(srcdir)/config/riscv/riscv-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/rl78/rl78.h b/gcc/config/rl78/rl78.h index fb710a3..ead5cdd 100644 --- a/gcc/config/rl78/rl78.h +++ b/gcc/config/rl78/rl78.h @@ -49,30 +49,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "rl78"); \ - if (RL78_MUL_NONE) \ - rust_add_target_info("target_feature", "mul-g10"); \ - else if (RL78_MUL_G13) \ - rust_add_target_info("target_feature", "mul-g13"); \ - else if (RL78_MUL_G14) \ - rust_add_target_info("target_feature", "mul-g14"); \ - if (TARGET_ALLREGS) \ - rust_add_target_info("target_feature", "allregs"); \ - if (TARGET_G10) \ - rust_add_target_info("target_feature", "cpu-g10"); \ - else if (TARGET_G13) \ - rust_add_target_info("target_feature", "cpu-g13"); \ - else if (TARGET_G14) \ - rust_add_target_info("target_feature", "cpu-g14"); \ - if (TARGET_ES0) \ - rust_add_target_info("target_feature", "es0"); \ - if (TARGET_SAVE_MDUC_REGISTERS) \ - rust_add_target_info("target_feature", "save-mduc-in-interrupts"); \ - /*TODO: find way of getting sim, relax info?*/ \ - } while (0) - #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{pg:gcrt0.o%s}%{!pg:crt0.o%s} crtbegin.o%s" diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h index 6432b77..ad3238b 100644 --- a/gcc/config/rs6000/aix.h +++ b/gcc/config/rs6000/aix.h @@ -166,16 +166,6 @@ } \ while (0) -#define AIX_TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for aix, so this is just guessed from triple*/ \ - /*target_vendor is subject to change (and target_env to a lesser extent)*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "aix"); \ - builtin_rust_info ("target_vendor", "ibm"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Define appropriate architecture macros for preprocessor depending on target switches. */ diff --git a/gcc/config/rs6000/aix71.h b/gcc/config/rs6000/aix71.h index 3d532b5..57e07bc 100644 --- a/gcc/config/rs6000/aix71.h +++ b/gcc/config/rs6000/aix71.h @@ -117,14 +117,6 @@ do { \ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in aix71.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - AIX_TARGET_RUST_OS_INFO (); \ - } while (0) - #define CPP_SPEC32 "" #define CPP_SPEC64 "-D__64BIT__" #define CPP_SPEC_COMMON "%{posix: -D_POSIX_SOURCE} \ diff --git a/gcc/config/rs6000/aix72.h b/gcc/config/rs6000/aix72.h index d60d183..ca73acb 100644 --- a/gcc/config/rs6000/aix72.h +++ b/gcc/config/rs6000/aix72.h @@ -118,14 +118,6 @@ do { \ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in aix72.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - AIX_TARGET_RUST_OS_INFO (); \ - } while (0) - #define CPP_SPEC32 "" #define CPP_SPEC64 "-D__64BIT__" #define CPP_SPEC_COMMON "%{posix: -D_POSIX_SOURCE} \ diff --git a/gcc/config/rs6000/aix73.h b/gcc/config/rs6000/aix73.h index e5ddef4..8baa27e 100644 --- a/gcc/config/rs6000/aix73.h +++ b/gcc/config/rs6000/aix73.h @@ -119,14 +119,6 @@ do { \ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in aix73.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - AIX_TARGET_RUST_OS_INFO (); \ - } while (0) - #define CPP_SPEC32 "" #define CPP_SPEC64 "-D__64BIT__" #define CPP_SPEC_COMMON "%{posix: -D_POSIX_SOURCE} \ diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index ccf1e76..b5cef42 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -74,16 +74,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - /*TODO: rust actually has "macos", "ios", and "tvos" for darwin targets, but gcc seems to have no*/ \ - /*current support for them, so assuming that target_os is always macos for now*/ \ - builtin_rust_info ("target_os", "macos"); \ - builtin_rust_info ("target_vendor", "apple"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #define SUBTARGET_OVERRIDE_OPTIONS darwin_rs6000_override_options () #define C_COMMON_OVERRIDE_OPTIONS do { \ diff --git a/gcc/config/rs6000/eabi.h b/gcc/config/rs6000/eabi.h index 3f9789c..e58283f 100644 --- a/gcc/config/rs6000/eabi.h +++ b/gcc/config/rs6000/eabi.h @@ -39,15 +39,3 @@ TARGET_OS_SYSV_CPP_BUILTINS (); \ } \ while (0) - -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in eabi.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: values here are assumed from rustc's "bare metal" template*/ \ - builtin_rust_info ("target_family", ""); \ - builtin_rust_info ("target_os", "none"); \ - builtin_rust_info ("target_vendor", ""); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/rs6000/eabisim.h b/gcc/config/rs6000/eabisim.h index 537b1b2..5b931ed 100644 --- a/gcc/config/rs6000/eabisim.h +++ b/gcc/config/rs6000/eabisim.h @@ -34,18 +34,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in eabisim.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: values here are assumed from rustc's "bare metal" template*/ \ - builtin_rust_info ("target_family", ""); \ - builtin_rust_info ("target_os", "none"); \ - builtin_rust_info ("target_vendor", ""); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Make the simulator the default */ #undef LIB_DEFAULT_SPEC #define LIB_DEFAULT_SPEC "%(lib_sim)" diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h index a3a70c8..e6a3223 100644 --- a/gcc/config/rs6000/linux.h +++ b/gcc/config/rs6000/linux.h @@ -59,13 +59,6 @@ } \ while (0) -/* Override less-specific rs6000/sysv4.h definition. */ -#undef TARGET_RUST_OS_INFO -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)" diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 02ff372..d617f346 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -312,13 +312,6 @@ extern int dot_symbols; } \ while (0) -/* Override less-specific rs6000/sysv4.h definition. */ -#undef TARGET_RUST_OS_INFO -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_OS_DEFAULT_SPEC #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux) %(include_extra)" diff --git a/gcc/config/rs6000/lynx.h b/gcc/config/rs6000/lynx.h index 7d295b5..dcf5fc4 100644 --- a/gcc/config/rs6000/lynx.h +++ b/gcc/config/rs6000/lynx.h @@ -71,18 +71,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in lynx.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: not supported by rustc and so subject to change - based on llvm triple*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "lynxos"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* LynxOS does not do anything with .fixup plus let's not create writable section for linkonce.r and linkonce.t. */ diff --git a/gcc/config/rs6000/netbsd.h b/gcc/config/rs6000/netbsd.h index e49a65d..7830f0e 100644 --- a/gcc/config/rs6000/netbsd.h +++ b/gcc/config/rs6000/netbsd.h @@ -34,14 +34,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in netbsd.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Override the default from rs6000.h to avoid conflicts with macros defined in NetBSD header files. */ diff --git a/gcc/config/rs6000/rs6000-logue.cc b/gcc/config/rs6000/rs6000-logue.cc index 5ec9170..59fe1c8 100644 --- a/gcc/config/rs6000/rs6000-logue.cc +++ b/gcc/config/rs6000/rs6000-logue.cc @@ -5324,13 +5324,12 @@ rs6000_output_function_epilogue (FILE *file) use language_string. C is 0. Fortran is 1. Ada is 3. Modula-2 is 8. C++ is 9. Java is 13. Objective-C is 14. Objective-C++ isn't assigned - a number, so for now use 9. LTO, Go, D, Rust, and JIT aren't - assigned numbers either, so for now use 0. */ + a number, so for now use 9. LTO, Go, D, and JIT aren't assigned + numbers either, so for now use 0. */ if (lang_GNU_C () || ! strcmp (language_string, "GNU GIMPLE") || ! strcmp (language_string, "GNU Go") || ! strcmp (language_string, "GNU D") - || ! strcmp (language_string, "GNU Rust") || ! strcmp (language_string, "libgccjit")) i = 0; else if (! strcmp (language_string, "GNU F77") diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index 6ff7c1d..e322ac0 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -329,9 +329,6 @@ extern void (*rs6000_target_modify_macros_ptr) (bool, HOST_WIDE_INT, extern void rs6000_d_target_versions (void); extern void rs6000_d_register_target_info (void); -/* Declare functions in rs6000-rust.cc */ -extern void rs6000_rust_target_cpu_info (void); - #ifdef NO_DOLLAR_IN_LABEL const char * rs6000_xcoff_strip_dollar (const char *); #endif diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 3096cf8..5fdb8f2 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -650,9 +650,6 @@ extern unsigned char rs6000_recip_bits[]; #define TARGET_D_CPU_VERSIONS rs6000_d_target_versions #define TARGET_D_REGISTER_CPU_TARGET_INFO rs6000_d_register_target_info -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO rs6000_rust_target_cpu_info - /* This is used by rs6000_cpu_cpp_builtins to indicate the byte order we're compiling for. Some configurations may need to override it. */ #define RS6000_CPU_CPP_ENDIAN_BUILTINS() \ diff --git a/gcc/config/rs6000/rtems.h b/gcc/config/rs6000/rtems.h index fc939ee..a6520aa 100644 --- a/gcc/config/rs6000/rtems.h +++ b/gcc/config/rs6000/rtems.h @@ -72,19 +72,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtems.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Copy and paste from linux64.h and freebsd64.h */ #undef RELOCATABLE_NEEDS_FIXUP #define RELOCATABLE_NEEDS_FIXUP \ diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index c72a861..7e2519d 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -547,19 +547,6 @@ extern int fixuplabelno; while (0) #endif -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in sysv4.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: everything in here is just guessed from gcc triples and assumptions - nothing really*/ \ - /*targets system v anymore so hard to find info on it. as such, everything subject to change*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "sysv4"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Select one of BIG_OPT, LITTLE_OPT or DEFAULT_OPT depending on various -mbig, -mlittle and -mcall- options. */ #define ENDIAN_SELECT(BIG_OPT, LITTLE_OPT, DEFAULT_OPT) \ diff --git a/gcc/config/rs6000/t-rs6000 b/gcc/config/rs6000/t-rs6000 index daf5e6a..90079ce 100644 --- a/gcc/config/rs6000/t-rs6000 +++ b/gcc/config/rs6000/t-rs6000 @@ -39,10 +39,6 @@ rs6000-d.o: $(srcdir)/config/rs6000/rs6000-d.cc $(COMPILE) $< $(POSTCOMPILE) -rs6000-rust.o: $(srcdir)/config/rs6000/rs6000-rust.cc - $(COMPILE) $< - $(POSTCOMPILE) - rs6000-logue.o: $(srcdir)/config/rs6000/rs6000-logue.cc $(COMPILE) $< $(POSTCOMPILE) diff --git a/gcc/config/rs6000/vxworks.h b/gcc/config/rs6000/vxworks.h index 2f6479c..4f6d116 100644 --- a/gcc/config/rs6000/vxworks.h +++ b/gcc/config/rs6000/vxworks.h @@ -103,13 +103,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in vxworks.h (rs6000) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - VXWORKS_TARGET_RUST_OS_INFO (); \ - } while (0) #define VX_CPUDEF(CPUID) \ ":-D" VX_CPU_PREFIX "CPU=" VX_CPU_PREFIX #CPUID diff --git a/gcc/config/rx/rx-protos.h b/gcc/config/rx/rx-protos.h index f8748e2..73bd579 100644 --- a/gcc/config/rx/rx-protos.h +++ b/gcc/config/rx/rx-protos.h @@ -171,7 +171,4 @@ rx_find_use_of_reg (rtx reg, rtx_insn* insn, F stepfunc) #endif -/* Routines implemented in rx-rust.cc */ -extern void rx_rust_target_cpu_info (void); - #endif /* GCC_RX_PROTOS_H */ diff --git a/gcc/config/rx/rx.h b/gcc/config/rx/rx.h index ca153d8..ce9c2ff 100644 --- a/gcc/config/rx/rx.h +++ b/gcc/config/rx/rx.h @@ -75,8 +75,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO rx_rust_target_cpu_info - #undef CC1_SPEC #define CC1_SPEC "\ %{mas100-syntax:%{gdwarf*:%e-mas100-syntax is incompatible with -gdwarf}} \ diff --git a/gcc/config/rx/t-rx b/gcc/config/rx/t-rx index dd11760..18c94f0 100644 --- a/gcc/config/rx/t-rx +++ b/gcc/config/rx/t-rx @@ -35,7 +35,3 @@ MULTILIB_MATCHES = nofpu=mnofpu nofpu=mcpu?rx200 nofpu=mcpu?rx100 MULTILIB_EXCEPTIONS = MULTILIB_EXTRA_OPTS = - -rx-rust.o: $(srcdir)/config/rx/rx-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h index a32d889..d7b7e7a 100644 --- a/gcc/config/s390/linux.h +++ b/gcc/config/s390/linux.h @@ -48,11 +48,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Target specific assembler settings. */ /* Rewrite -march=arch* options to the original CPU name in order to diff --git a/gcc/config/s390/s390-protos.h b/gcc/config/s390/s390-protos.h index 8746f5b..e625159 100644 --- a/gcc/config/s390/s390-protos.h +++ b/gcc/config/s390/s390-protos.h @@ -179,9 +179,6 @@ extern bool s390_const_operand_ok (tree, int, int, tree); extern void s390_d_target_versions (void); extern void s390_d_register_target_info (void); -/* Routines implemented in s390-rust.cc */ -extern void s390_rust_target_cpu_info (void); - /* Pass management. */ namespace gcc { class context; } class rtl_opt_pass; diff --git a/gcc/config/s390/s390.h b/gcc/config/s390/s390.h index b239072..5a64048 100644 --- a/gcc/config/s390/s390.h +++ b/gcc/config/s390/s390.h @@ -251,9 +251,6 @@ enum processor_flags #define TARGET_D_CPU_VERSIONS s390_d_target_versions #define TARGET_D_REGISTER_CPU_TARGET_INFO s390_d_register_target_info -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO s390_rust_target_cpu_info - #ifdef DEFAULT_TARGET_64BIT #define TARGET_DEFAULT (MASK_64BIT | MASK_ZARCH | MASK_HARD_DFP \ | MASK_OPT_HTM | MASK_OPT_VX) diff --git a/gcc/config/s390/t-s390 b/gcc/config/s390/t-s390 index 82b1d92..767df10 100644 --- a/gcc/config/s390/t-s390 +++ b/gcc/config/s390/t-s390 @@ -30,7 +30,3 @@ s390-c.o: $(srcdir)/config/s390/s390-c.cc \ s390-d.o: $(srcdir)/config/s390/s390-d.cc $(COMPILE) $< $(POSTCOMPILE) - -s390-rust.o: $(srcdir)/config/s390/s390-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/s390/tpf.h b/gcc/config/s390/tpf.h index 5822d99..26469cb 100644 --- a/gcc/config/s390/tpf.h +++ b/gcc/config/s390/tpf.h @@ -69,19 +69,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in tpf.h (s390) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: everything in here is just guessed from gcc triples as rustc has no support*/ \ - /*as such, stuff subject to change*/ \ - builtin_rust_info ("target_family", ""); \ - builtin_rust_info ("target_os", "tpf"); \ - builtin_rust_info ("target_vendor", "ibm"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - #define EXTRA_SPECS \ { "entry_spec", ENTRY_SPEC } diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index a26bde1..d96d077 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -37,11 +37,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef TARGET_DEFAULT #define TARGET_DEFAULT \ (TARGET_CPU_DEFAULT | TARGET_ENDIAN_DEFAULT | TARGET_OPT_DEFAULT) diff --git a/gcc/config/sh/netbsd-elf.h b/gcc/config/sh/netbsd-elf.h index 109c753..f18e6b0 100644 --- a/gcc/config/sh/netbsd-elf.h +++ b/gcc/config/sh/netbsd-elf.h @@ -35,11 +35,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Provide a LINK_SPEC appropriate for a NetBSD/sh ELF target. We use the SH_LINK_SPEC from sh/sh.h, and define the appropriate SUBTARGET_LINK_SPEC that pulls in what we need from a generic diff --git a/gcc/config/sh/rtems.h b/gcc/config/sh/rtems.h index 9b945e1..8b9c33b 100644 --- a/gcc/config/sh/rtems.h +++ b/gcc/config/sh/rtems.h @@ -29,13 +29,3 @@ builtin_define( "__rtems__" ); \ builtin_assert( "system=rtems" ); \ } while (0) - -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/sh/rtemself.h b/gcc/config/sh/rtemself.h index 57df68b..7190826 100644 --- a/gcc/config/sh/rtemself.h +++ b/gcc/config/sh/rtemself.h @@ -29,13 +29,3 @@ builtin_define( "__rtems__" ); \ builtin_assert( "system=rtems" ); \ } while (0) - -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h index 706c258..44a4bdf 100644 --- a/gcc/config/sh/sh-protos.h +++ b/gcc/config/sh/sh-protos.h @@ -313,9 +313,6 @@ sh_cbranch_distance (rtx_insn* cbranch_insn, extern void sh_cpu_cpp_builtins (cpp_reader* pfile); -/* Routines implemented in sh-rust.cc */ -extern void sh_rust_target_cpu_info (void); - extern const char *output_jump_label_table (void); extern rtx get_t_reg_rtx (void); extern void sh_expand_prologue (void); diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h index 8427d6a..4f209d2 100644 --- a/gcc/config/sh/sh.h +++ b/gcc/config/sh/sh.h @@ -31,8 +31,6 @@ extern int code_for_indirect_jump_scratch; #define TARGET_CPU_CPP_BUILTINS() sh_cpu_cpp_builtins (pfile) -#define TARGET_RUST_CPU_INFO sh_rust_target_cpu_info - /* Value should be nonzero if functions must have frame pointers. Zero means the frame pointer need not be set up (and parms may be accessed via the stack pointer) in functions that seem suitable. */ diff --git a/gcc/config/sh/t-sh b/gcc/config/sh/t-sh index f994783..dd5652e 100644 --- a/gcc/config/sh/t-sh +++ b/gcc/config/sh/t-sh @@ -25,10 +25,6 @@ sh-c.o: $(srcdir)/config/sh/sh-c.cc \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/sh/sh-c.cc -sh-rust.o: $(srcdir)/config/sh/sh-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - sh_treg_combine.o: $(srcdir)/config/sh/sh_treg_combine.cc \ $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(TM_H) $(TM_P_H) coretypes.h $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< diff --git a/gcc/config/sh/vxworks.h b/gcc/config/sh/vxworks.h index d498256..ae31a63 100644 --- a/gcc/config/sh/vxworks.h +++ b/gcc/config/sh/vxworks.h @@ -28,11 +28,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - VXWORKS_TARGET_RUST_OS_INFO (); \ - } while (0) - #undef SUBTARGET_OVERRIDE_OPTIONS #define SUBTARGET_OVERRIDE_OPTIONS \ do \ diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index 8cf2164..e22c70c 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -124,16 +124,6 @@ along with GCC; see the file COPYING3. If not see solaris_override_options (); \ } while (0) -#define EXTRA_TARGET_RUST_OS_INFO() -#define TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "solaris"); \ - builtin_rust_info ("target_vendor", "sun"); \ - builtin_rust_info ("target_env", ""); \ - EXTRA_TARGET_RUST_OS_INFO(); \ - } while (0) - #if DEFAULT_ARCH32_P #define MULTILIB_DEFAULTS { "m32" } #else diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index d5b6b7d..6a809e9 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -27,11 +27,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef ENDFILE_SPEC #define ENDFILE_SPEC \ GNU_USER_TARGET_ENDFILE_SPEC \ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index a3eee0f..46823b6 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -30,11 +30,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - GNU_USER_TARGET_RUST_OS_INFO(); \ - } while (0) - /* On Linux, the combination sparc64-* --with-cpu=v8 is supported and selects a 32-bit compiler. */ #if defined(TARGET_64BIT_DEFAULT) && TARGET_CPU_DEFAULT >= TARGET_CPU_v9 diff --git a/gcc/config/sparc/netbsd-elf.h b/gcc/config/sparc/netbsd-elf.h index 78f02ac..af194df 100644 --- a/gcc/config/sparc/netbsd-elf.h +++ b/gcc/config/sparc/netbsd-elf.h @@ -35,11 +35,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* CPP defines used by all NetBSD targets. */ #undef CPP_SUBTARGET_SPEC #define CPP_SUBTARGET_SPEC "%(netbsd_cpp_spec)" diff --git a/gcc/config/sparc/openbsd64.h b/gcc/config/sparc/openbsd64.h index e7de490..3ca1e0a 100644 --- a/gcc/config/sparc/openbsd64.h +++ b/gcc/config/sparc/openbsd64.h @@ -41,11 +41,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - OPENBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef ASM_SPEC #define ASM_SPEC "\ -s %{" FPIE_OR_FPIC_SPEC ":-K PIC} \ diff --git a/gcc/config/sparc/rtemself.h b/gcc/config/sparc/rtemself.h index 0dd1743..b40baf2 100644 --- a/gcc/config/sparc/rtemself.h +++ b/gcc/config/sparc/rtemself.h @@ -38,19 +38,6 @@ } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in rtemself.h (sparc) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Use the default */ #undef LINK_GCC_C_SEQUENCE_SPEC diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h index 226742c..f9e1c74 100644 --- a/gcc/config/sparc/sparc-protos.h +++ b/gcc/config/sparc/sparc-protos.h @@ -116,7 +116,4 @@ extern rtl_opt_pass *make_pass_work_around_errata (gcc::context *); extern void sparc_d_target_versions (void); extern void sparc_d_register_target_info (void); -/* Routines implemented in sparc-rust.cc */ -extern void sparc_rust_target_cpu_info (void); - #endif /* __SPARC_PROTOS_H__ */ diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 268ab43..2e17fca 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -31,9 +31,6 @@ along with GCC; see the file COPYING3. If not see #define TARGET_D_CPU_VERSIONS sparc_d_target_versions #define TARGET_D_REGISTER_CPU_TARGET_INFO sparc_d_register_target_info -/* Target CPU info for Rust. */ -#define TARGET_RUST_CPU_INFO sparc_rust_target_cpu_info - /* Specify this in a cover file to provide bi-architecture (32/64) support. */ /* #define SPARC_BI_ARCH */ diff --git a/gcc/config/sparc/t-sparc b/gcc/config/sparc/t-sparc index b6cd858..2dd06c9 100644 --- a/gcc/config/sparc/t-sparc +++ b/gcc/config/sparc/t-sparc @@ -28,10 +28,6 @@ sparc-d.o: $(srcdir)/config/sparc/sparc-d.cc $(COMPILE) $< $(POSTCOMPILE) -sparc-rust.o: $(srcdir)/config/sparc/sparc-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - # Hack around PR bootstrap/92002. tree-ssanames.o-warn += -Wno-error=uninitialized -Wno-error=maybe-uninitialized wide-int.o-warn += -Wno-error=uninitialized -Wno-error=maybe-uninitialized diff --git a/gcc/config/sparc/vxworks.h b/gcc/config/sparc/vxworks.h index 877b74c..c9ce2d2 100644 --- a/gcc/config/sparc/vxworks.h +++ b/gcc/config/sparc/vxworks.h @@ -27,11 +27,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - VXWORKS_TARGET_RUST_OS_INFO (); \ - } while (0) - #undef SUBTARGET_OVERRIDE_OPTIONS #define SUBTARGET_OVERRIDE_OPTIONS VXWORKS_OVERRIDE_OPTIONS diff --git a/gcc/config/tilegx/linux.h b/gcc/config/tilegx/linux.h index 52596a4..aae1f95 100644 --- a/gcc/config/tilegx/linux.h +++ b/gcc/config/tilegx/linux.h @@ -18,12 +18,6 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: ensure that this is all that needs to be defined*/ \ - GNU_USER_TARGET_RUST_OS_INFO (); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "%{pthread:-D_REENTRANT}" diff --git a/gcc/config/tilegx/tilegx.h b/gcc/config/tilegx/tilegx.h index 2a3c763..3f1c25d 100644 --- a/gcc/config/tilegx/tilegx.h +++ b/gcc/config/tilegx/tilegx.h @@ -54,21 +54,6 @@ #define TARGET_CPU_CPP_BUILTINS() \ tilegx_cpu_cpp_builtins (pfile) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "tilegx"); \ - if (tilegx_cpu == 0) \ - rust_add_target_info("target_feature", "cpu-tilegx"); \ - if (TARGET_32BIT) \ - rust_add_target_info("target_feature", "32"); \ - else \ - rust_add_target_info("target_feature", "64"); \ - if (tilegx_cmodel == CM_SMALL) \ - rust_add_target_info("target_feature", "cmodel-small"); \ - else if (tilegx_cmodel == CM_LARGE) \ - rust_add_target_info("target_feature", "cmodel-large"); \ - } while (0) - #undef PTRDIFF_TYPE #define PTRDIFF_TYPE (TARGET_32BIT ? "int" : "long int") diff --git a/gcc/config/tilepro/linux.h b/gcc/config/tilepro/linux.h index 1e99388..65a411e 100644 --- a/gcc/config/tilepro/linux.h +++ b/gcc/config/tilepro/linux.h @@ -18,12 +18,6 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ -#define TARGET_RUST_OS_INFO() \ - do { \ - /*TODO: ensure that this is all that needs to be defined*/ \ - GNU_USER_TARGET_RUST_OS_INFO (); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC "%{pthread:-D_REENTRANT}" diff --git a/gcc/config/tilepro/tilepro.h b/gcc/config/tilepro/tilepro.h index a9abb03..6c37aba 100644 --- a/gcc/config/tilepro/tilepro.h +++ b/gcc/config/tilepro/tilepro.h @@ -34,14 +34,6 @@ #define TARGET_CPU_CPP_BUILTINS() \ tilepro_cpu_cpp_builtins (pfile) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "tilepro"); \ - rust_add_target_info("target_feature", "32"); \ - if (tilepro_cpu == 0) \ - rust_add_target_info("target_feature", "cpu-tilepro"); \ - } while (0) - #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" diff --git a/gcc/config/v850/rtems.h b/gcc/config/v850/rtems.h index 40f4385..96948b6 100644 --- a/gcc/config/v850/rtems.h +++ b/gcc/config/v850/rtems.h @@ -32,16 +32,6 @@ } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc has no supported for rtems, so this is just guessed*/ \ - /*everything is subject to change, especially target_env and target_family*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "rtems"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", ""); \ - } while (0) - /* Map mv850e1 and mv850es to mv850e to match MULTILIB_MATCHES */ #undef ASM_SPEC #define ASM_SPEC "%{mv850es:-mv850e} \ diff --git a/gcc/config/v850/t-v850 b/gcc/config/v850/t-v850 index 797d252..275ee8f 100644 --- a/gcc/config/v850/t-v850 +++ b/gcc/config/v850/t-v850 @@ -30,10 +30,6 @@ v850-c.o: $(srcdir)/config/v850/v850-c.cc $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ $(srcdir)/config/v850/v850-c.cc -v850-rust.o: $(srcdir)/config/v850/v850-rust.cc \ - $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(C_COMMON_H) - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $< - # Local Variables: # mode: Makefile # End: diff --git a/gcc/config/v850/v850-protos.h b/gcc/config/v850/v850-protos.h index 716b6eb..890552b 100644 --- a/gcc/config/v850/v850-protos.h +++ b/gcc/config/v850/v850-protos.h @@ -65,7 +65,4 @@ extern void ghs_pragma_endtda (struct cpp_reader *); extern void ghs_pragma_endsda (struct cpp_reader *); extern void ghs_pragma_endzda (struct cpp_reader *); -/* Routines implemented in v850-rust.cc */ -extern void v850_rust_target_cpu_info (void); - #endif /* ! GCC_V850_PROTOS_H */ diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index 1fbb4dc..328926e 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -156,8 +156,6 @@ } \ while(0) -#define TARGET_RUST_CPU_INFO v850_rust_target_cpu_info - #define MASK_CPU (MASK_V850 | MASK_V850E | MASK_V850E1 | MASK_V850E2 | MASK_V850E2V3 | MASK_V850E3V5) /* Target machine storage layout */ diff --git a/gcc/config/vax/linux.h b/gcc/config/vax/linux.h index 2cd0ac9..1893b02 100644 --- a/gcc/config/vax/linux.h +++ b/gcc/config/vax/linux.h @@ -20,8 +20,6 @@ along with GCC; see the file COPYING3. If not see #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - /* We use GAS, G-float double and want new DI patterns. */ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_QMATH | MASK_G_FLOAT) diff --git a/gcc/config/vax/netbsd-elf.h b/gcc/config/vax/netbsd-elf.h index cd22da1..eba9e28 100644 --- a/gcc/config/vax/netbsd-elf.h +++ b/gcc/config/vax/netbsd-elf.h @@ -27,14 +27,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in netbsd-elf.h (vax) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - NETBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - #undef CPP_SPEC #define CPP_SPEC NETBSD_CPP_SPEC diff --git a/gcc/config/vax/openbsd.h b/gcc/config/vax/openbsd.h index acb5408..85a0721 100644 --- a/gcc/config/vax/openbsd.h +++ b/gcc/config/vax/openbsd.h @@ -29,11 +29,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - OPENBSD_TARGET_RUST_OS_INFO(); \ - } while (0) - /* Layout of source language data types. */ /* This must agree with <machine/ansi.h> */ diff --git a/gcc/config/vax/vax.h b/gcc/config/vax/vax.h index 63cfbe9..45c0e75 100644 --- a/gcc/config/vax/vax.h +++ b/gcc/config/vax/vax.h @@ -33,23 +33,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "vax"); \ - if (TARGET_G_FLOAT) \ - rust_add_target_info("target_feature", "g-float"); \ - else \ - rust_add_target_info("target_feature", "d-float"); \ - if (TARGET_UNIX_ASM) \ - rust_add_target_info("target_feature", "unix-as"); \ - else \ - rust_add_target_info("target_feature", "gas"); \ - if (TARGET_VAXC_ALIGNMENT) \ - rust_add_target_info("target_feature", "vaxc-alignment"); \ - if (TARGET_QMATH) \ - rust_add_target_info("target_feature", "qmath"); \ - } while (0) - /* Use -J option for long branch support with Unix assembler. */ #define ASM_SPEC "-J" diff --git a/gcc/config/visium/visium.h b/gcc/config/visium/visium.h index 4e70587..e981924 100644 --- a/gcc/config/visium/visium.h +++ b/gcc/config/visium/visium.h @@ -80,30 +80,6 @@ } \ while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "visium"); \ - /*TODO: figure out how to get info from debug, sim and enable-trampolines*/ \ - if (TARGET_FPU) \ - rust_add_target_info("target_feature", "hard-float"); \ - else \ - rust_add_target_info("target_feature", "soft-float"); \ - if (TARGET_MCM) \ - rust_add_target_info("target_feature", "mcm"); \ - else if (visium_cpu_and_features == PROCESSOR_GR5) \ - rust_add_target_info("target_feature", "gr5"); \ - else if (visium_cpu_and_features == PROCESSOR_GR6) \ - rust_add_target_info("target_feature", "gas"); \ - if (TARGET_SV_MODE) \ - rust_add_target_info("target_feature", "sv-mode"); \ - else \ - rust_add_target_info("target_feature", "user-mode"); \ - if (TARGET_BMI) \ - rust_add_target_info("target_feature", "bmi"); \ - if (TARGET_FPU_IEEE) \ - rust_add_target_info("target_feature", "fpu-ieee"); \ - } while (0) - /* Recast the cpu class to be the cpu attribute. Every file includes us, but not every file includes insn-attr.h. */ #define visium_cpu_attr ((enum attr_cpu) visium_cpu) diff --git a/gcc/config/vms/vms.h b/gcc/config/vms/vms.h index 0b216cc..847624a 100644 --- a/gcc/config/vms/vms.h +++ b/gcc/config/vms/vms.h @@ -38,19 +38,6 @@ along with GCC; see the file COPYING3. If not see builtin_define_with_int_value ("__VMS_VER", vms_c_get_vms_ver ()); \ } while (0) -#define TARGET_RUST_OS_INFO() \ - do { \ - /*target_family (and others) are subject to change - no support by rustc so unknown values - TODO*/ \ - /*target_family written as unix because of supposed POSIX-compliance*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "vms"); \ - /*target_vendor written as unknown because i don't know what it would be (maybe HP?)*/ \ - builtin_rust_info ("target_vendor", "unknown"); \ - /*target_env is empty as not a gnu target environment*/ \ - builtin_rust_info ("target_env", ""); \ - SUBTARGET_RUST_OS_INFO(); \ - } while (0) - extern void vms_c_register_includes (const char *, const char *, int); #define TARGET_EXTRA_INCLUDES vms_c_register_includes diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h index 4811b42..6a5f2f8 100644 --- a/gcc/config/vxworks.h +++ b/gcc/config/vxworks.h @@ -337,14 +337,6 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority); } \ while (0) -#define VXWORKS_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "vxworks"); \ - builtin_rust_info ("target_vendor", "wrs"); \ - builtin_rust_info ("target_env", "gnu"); \ - } while (0) - /* For specific CPU macro definitions expected by the system headers, different versions of VxWorks expect different forms of macros, such as "_VX_CPU=..." on Vx7 and some variants of Vx6, or "CPU=..." diff --git a/gcc/config/vxworksae.h b/gcc/config/vxworksae.h index dc1dbe1..0cc4546 100644 --- a/gcc/config/vxworksae.h +++ b/gcc/config/vxworksae.h @@ -77,15 +77,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#define VXWORKS_TARGET_RUST_OS_INFO() \ - do { \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "vxworks"); \ - builtin_rust_info ("target_vendor", "wrs"); \ - builtin_rust_info ("target_env", "gnu"); \ - /*is env correct? vxworks.h implies that this might not come with a gnu toolchain*/ \ - } while (0) - /* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE. */ /* None of the VxWorks AE/653/MILS ports to date has native TLS support. */ diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index a9357df..edce618 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h @@ -20,8 +20,6 @@ along with GCC; see the file COPYING3. If not see #define TARGET_OS_CPP_BUILTINS() GNU_USER_TARGET_OS_CPP_BUILTINS() -#define TARGET_RUST_OS_INFO() GNU_USER_TARGET_RUST_OS_INFO() - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h index 3edc181..d47fd63 100644 --- a/gcc/config/xtensa/uclinux.h +++ b/gcc/config/xtensa/uclinux.h @@ -27,19 +27,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#ifdef TARGET_RUST_OS_INFO -# error "TARGET_RUST_OS_INFO already defined in uclinux.h (xtensa) - c++ undefines it and redefines it." -#endif -#define TARGET_RUST_OS_INFO() \ - do { \ - /*note: as far as I know, rustc does not distinguish between uclinux and regular linux kernels*/ \ - builtin_rust_info ("target_family", "unix"); \ - builtin_rust_info ("target_os", "linux"); \ - builtin_rust_info ("target_vendor", "unknown"); \ - builtin_rust_info ("target_env", "gnu"); \ - /*TODO: is GNU_USER_TARGET_RUST_OS_INFO() better here or is hardcoded stuff fine?*/ \ - } while (0) - #undef SUBTARGET_CPP_SPEC #define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h index 06342fa..00e2930 100644 --- a/gcc/config/xtensa/xtensa.h +++ b/gcc/config/xtensa/xtensa.h @@ -90,20 +90,6 @@ along with GCC; see the file COPYING3. If not see builtin_define ("__XTENSA_SOFT_FLOAT__"); \ } while (0) -#define TARGET_RUST_CPU_INFO() \ - do { \ - rust_add_target_info("target_arch", "xtensa"); \ - /*TODO: figure out how to get info from longcalls, target-align and text-section-literals*/ \ - if (TARGET_CONST16) \ - rust_add_target_info("target_feature", "const16"); \ - if (TARGET_FORCE_NO_PIC) \ - rust_add_target_info("target_feature", "force-no-pic"); \ - if (TARGET_AUTO_LITPOOLS) \ - rust_add_target_info("target_feature", "auto-litpools"); \ - if (TARGET_SERIALIZE_VOLATILE) \ - rust_add_target_info("target_feature", "serialize-volatile"); \ - } while (0) - #define CPP_SPEC " %(subtarget_cpp_spec) " #ifndef SUBTARGET_CPP_SPEC diff --git a/gcc/configure b/gcc/configure index 6956339..fd72270 100755 --- a/gcc/configure +++ b/gcc/configure @@ -645,7 +645,6 @@ GMPINC GMPLIBS target_cpu_default d_target_objs -rust_target_objs fortran_target_objs cxx_target_objs c_target_objs @@ -655,8 +654,6 @@ xm_include_list xm_file_list tm_d_include_list tm_d_file_list -tm_rust_include_list -tm_rust_file_list tm_p_include_list tm_p_file_list tm_defines @@ -12998,7 +12995,6 @@ fi tm_file="${tm_file} defaults.h" tm_p_file="${tm_p_file} tm-preds.h" tm_d_file="${tm_d_file} defaults.h" -tm_rust_file="${tm_rust_file} defaults.h" host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" # We don't want ansidecl.h in target files, write code there in ISO/GNU C. @@ -13407,21 +13403,6 @@ for f in $tm_d_file; do esac done -tm_rust_file_list= -tm_rust_include_list="options.h insn-constants.h" -for f in $tm_rust_file; do - case $f in - defaults.h ) - tm_rust_file_list="${tm_rust_file_list} \$(srcdir)/$f" - tm_rust_include_list="${tm_rust_include_list} $f" - ;; - * ) - tm_rust_file_list="${tm_rust_file_list} \$(srcdir)/config/$f" - tm_rust_include_list="${tm_rust_include_list} config/$f" - ;; - esac -done - xm_file_list= xm_include_list= for f in $xm_file; do diff --git a/gcc/configure.ac b/gcc/configure.ac index dcb2b6e..40cfd38 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2103,7 +2103,6 @@ AC_SUBST(HAVE_AUTO_BUILD) tm_file="${tm_file} defaults.h" tm_p_file="${tm_p_file} tm-preds.h" tm_d_file="${tm_d_file} defaults.h" -tm_rust_file="${tm_rust_file} defaults.h" host_xm_file="auto-host.h ansidecl.h ${host_xm_file}" build_xm_file="${build_auto} ansidecl.h ${build_xm_file}" # We don't want ansidecl.h in target files, write code there in ISO/GNU C. @@ -2361,21 +2360,6 @@ for f in $tm_d_file; do esac done -tm_rust_file_list= -tm_rust_include_list="options.h insn-constants.h" -for f in $tm_rust_file; do - case $f in - defaults.h ) - tm_rust_file_list="${tm_rust_file_list} \$(srcdir)/$f" - tm_rust_include_list="${tm_rust_include_list} $f" - ;; - * ) - tm_rust_file_list="${tm_rust_file_list} \$(srcdir)/config/$f" - tm_rust_include_list="${tm_rust_include_list} config/$f" - ;; - esac -done - xm_file_list= xm_include_list= for f in $xm_file; do @@ -7438,8 +7422,6 @@ AC_SUBST(tm_p_file_list) AC_SUBST(tm_p_include_list) AC_SUBST(tm_d_file_list) AC_SUBST(tm_d_include_list) -AC_SUBST(tm_rust_file_list) -AC_SUBST(tm_rust_include_list) AC_SUBST(xm_file_list) AC_SUBST(xm_include_list) AC_SUBST(xm_defines) @@ -7448,7 +7430,6 @@ AC_SUBST(c_target_objs) AC_SUBST(cxx_target_objs) AC_SUBST(fortran_target_objs) AC_SUBST(d_target_objs) -AC_SUBST(rust_target_objs) AC_SUBST(target_cpu_default) AC_SUBST_FILE(language_hooks) diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 87f0274..962bbb8 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -53,7 +53,6 @@ through the macros defined in the @file{.h} file. * PCH Target:: Validity checking for precompiled headers. * C++ ABI:: Controlling C++ ABI changes. * D Language and ABI:: Controlling D ABI changes. -* Rust Language and ABI:: Controlling Rust ABI changes. * Named Address Spaces:: Adding support for named address spaces * Misc:: Everything else. @end menu @@ -11062,22 +11061,6 @@ if they have external linkage. If this flag is false, then instantiated decls will be emitted as weak symbols. The default is @code{false}. @end deftypevr -@node Rust Language and ABI -@section Rust ABI parameters -@cindex parameters, rust abi - -@deftypefn {Rust Target Hook} void TARGET_RUST_CPU_INFO (void) -Declare all environmental CPU info and features relating to the target CPU -using the function @code{rust_add_target_info}, which takes a string representing -the feature key and a string representing the feature value. Configuration pairs -predefined by this hook apply to all files that are being compiled. -@end deftypefn - -@deftypefn {Rust Target Hook} void TARGET_RUST_OS_INFO (void) -Similar to @code{TARGET_RUST_CPU_INFO}, but is used for configuration info -relating to the target operating system. -@end deftypefn - @node Named Address Spaces @section Adding support for named address spaces @cindex named address spaces diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index f993523..394b59e 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -53,7 +53,6 @@ through the macros defined in the @file{.h} file. * PCH Target:: Validity checking for precompiled headers. * C++ ABI:: Controlling C++ ABI changes. * D Language and ABI:: Controlling D ABI changes. -* Rust Language and ABI:: Controlling Rust ABI changes. * Named Address Spaces:: Adding support for named address spaces * Misc:: Everything else. @end menu @@ -7328,14 +7327,6 @@ floating-point support; they are not included in this mechanism. @hook TARGET_D_TEMPLATES_ALWAYS_COMDAT -@node Rust Language and ABI -@section Rust ABI parameters -@cindex parameters, rust abi - -@hook TARGET_RUST_CPU_INFO - -@hook TARGET_RUST_OS_INFO - @node Named Address Spaces @section Adding support for named address spaces @cindex named address spaces diff --git a/gcc/genhooks.cc b/gcc/genhooks.cc index 80c350c..20ad607 100644 --- a/gcc/genhooks.cc +++ b/gcc/genhooks.cc @@ -35,7 +35,6 @@ static struct hook_desc hook_array[] = { #include "c-family/c-target.def" #include "common/common-target.def" #include "d/d-target.def" -#include "rust/rust-target.def" #undef DEFHOOK }; diff --git a/gcc/rust/rust-lang.cc b/gcc/rust/rust-lang.cc index ed822cc..c9af790 100644 --- a/gcc/rust/rust-lang.cc +++ b/gcc/rust/rust-lang.cc @@ -104,6 +104,8 @@ struct GTY (()) language_function void rust_add_target_info (const char *key, const char *value) { + sorry ("TODO"); + Rust::Session::get_instance ().options.target_data.insert_key_value_pair ( key, value); } diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index 7d599b1..6d7f1a8 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -41,8 +41,8 @@ #include "diagnostic.h" #include "input.h" -#include "rust-target.h" #include "selftest.h" +#include "target.h" extern bool saw_errors (void); @@ -131,256 +131,15 @@ validate_crate_name (const std::string &crate_name, Error &error) return true; } -// Implicitly enable a target_feature (and recursively enable dependencies). -void -Session::implicitly_enable_feature (std::string feature_name) -{ - // TODO: is this really required since features added would be complete via - // target spec? - - if (!options.target_data.has_key_value_pair ("target_feature", feature_name)) - { - // if feature has dependencies, enable them - if (feature_name == "aes") - { - implicitly_enable_feature ("sse2"); - } - else if (feature_name == "avx") - { - implicitly_enable_feature ("sse4.2"); - } - else if (feature_name == "avx2") - { - implicitly_enable_feature ("avx"); - } - else if (feature_name == "fma") - { - implicitly_enable_feature ("avx"); - } - else if (feature_name == "pclmulqdq") - { - implicitly_enable_feature ("sse2"); - } - else if (feature_name == "sha") - { - implicitly_enable_feature ("sse2"); - } - else if (feature_name == "sse2") - { - implicitly_enable_feature ("sse"); - } - else if (feature_name == "sse3") - { - implicitly_enable_feature ("sse2"); - } - else if (feature_name == "sse4.1") - { - implicitly_enable_feature ("sse3"); - } - else if (feature_name == "sse4.2") - { - implicitly_enable_feature ("sse4.1"); - } - else if (feature_name == "ssse3") - { - implicitly_enable_feature ("sse3"); - } - - options.target_data.insert_key_value_pair ("target_feature", - std::move (feature_name)); - } -} - -// Meant to enable all target features. As this will be done by target hook, -// this method's deprecated. -void -Session::enable_features () -{ - bool has_target_crt_static = false; - - rust_debug ( - "ERROR: Somewhere in call chain Session::enable_features is called."); - - if (has_target_crt_static) - { - // enable "crt-static" attribute - } - - /* TODO: do this via target hook. have one for each target that implicitly - * enables the - * features for that platform. Would probably have to make custom target hook. - */ - - /* - if (target == "x86" || target == "x86_64") { - if (TARGET_AES) { - // enable aes, implicitly enable sse2 - implicitly_enable_feature("aes"); - } - - if (TARGET_AVX) { - // enable avx, implicitly enable sse4.2 - implicitly_enable_feature("sse4.2"); - } - - if (TARGET_AVX2) { - // enable avx2, implicitly enable avx - implicitly_enable_feature("avx"); - } - - if (TARGET_BMI) { - // enable bmi1 - implicitly_enable_feature("bmi1"); - } - - if (TARGET_BMI2) { - // enable bmi2 - implicitly_enable_feature("bmi2"); - } - - if (TARGET_FMA) { - // enable fma, implicitly enable avx - implicitly_enable_feature("fma"); - } - - if (TARGET_FXSR) { - // enable fxsr - implicitly_enable_feature("fxsr"); - } - - if (TARGET_LZCNT) { - // enable lzcnt - implicitly_enable_feature("lzcnt"); - } - - if (TARGET_VPCLMULQDQ) { - // enable pclmulqdq, implicitly enable sse2 - implicitly_enable_feature("pclmulqdq"); - } - - if (TARGET_POPCNT) { - // enable popcnt - implicitly_enable_feature("popcnt"); - } - - if (TARGET_RDRND) { - // enable rdrand - implicitly_enable_feature("rdrand"); - } - - if (TARGET_RDSEED) { - // enable rdseed - implicitly_enable_feature("rdseed"); - } - - if (TARGET_SHA) { - // enable sha, implicitly enable sse2 - implicitly_enable_feature("sha"); - } - - if (TARGET_SSE) { - // enable sse - implicitly_enable_feature("sse"); - } - - if (TARGET_SSE2) { - // enable sse2, implicitly enable sse - implicitly_enable_feature("sse2"); - } - - if (TARGET_SSE3) { - // enable sse3, implicitly enable sse2 - implicitly_enable_feature("sse3"); - } - - if (TARGET_SSE4_1) { - // enable sse4.1, implicitly enable sse3 - implicitly_enable_feature("sse4.1"); - } - - if (TARGET_SSE4_2) { - // enable sse4.2, implicitly enable sse4.1 - implicitly_enable_feature("sse4.2"); - } - - if (TARGET_SSSE3) { - // enable ssse3, implicitly enable sse3 - implicitly_enable_feature("ssse3"); - } - - if (TARGET_XSAVE) { - // enable xsave - implicitly_enable_feature("xsave"); - } - - if (TARGET_XSAVEC) { - // enable xsavec - implicitly_enable_feature("xsavec"); - } - - if (TARGET_XSAVEOPT) { - // enable xsaveopt - implicitly_enable_feature("xsaveopt"); - } - - if (TARGET_XSAVES) { - // enable xsaves - implicitly_enable_feature("xsaves"); - } - } - options.target_data.features.shrink_to_fit(); - std::sort(options.target_data.features.begin(), - options.target_data.features.end());*/ -} - void Session::init () { -#ifndef TARGET_RUST_OS_INFO -#define TARGET_RUST_OS_INFO() -#endif -//#define builtin_rust_info(KEY, VALUE) rust_add_target_info (KEY, VALUE) -// might as well use c++ stuff -#define builtin_rust_info(KEY, VALUE) \ - options.target_data.insert_key_value_pair (KEY, VALUE) - - // initialise target hooks - // targetrustm.rust_cpu_info(); - // targetrustm.rust_os_info(); - // ok, that's not working too well TODO - see if can salvage old - // implementation - TARGET_RUST_CPU_INFO (); - TARGET_RUST_OS_INFO (); - - /* note that due to issues with gcc targets, some implementations of those two - * macros above (TARGET_RUST_CPU_INFO and TARGET_RUST_OS_INFO) are not - * function calls, but actually inline substitutions. As such, they can't be - * stored with a function pointer in a "real" target hook. - * At least, that's my current understanding of it. */ - -#undef builtin_rust_info - - // target-independent values that should exist in all targets options.target_data.insert_key_value_pair ("target_pointer_width", std::to_string (POINTER_SIZE)); options.target_data.insert_key_value_pair ("target_endian", BYTES_BIG_ENDIAN ? "big" : "little"); - // TODO: find min atomic width and max atomic width - // from it, add atomic-related stuff for sizes 8, 16, 32, 64, and 128 (if - // inside bounds) in rustc, min atomic width is a known quantity (or 8 if not - // known), and max is also a known quantity (or is pointer size if not known) - // TODO: add atomic pointer if some criteria is satisfied - - // TODO: find whether target has "atomic cas" - - // add debug_assertions if enabled and proc_macro if crate type has it or - // whatever - - // derived values from hook - options.target_data.init_derived_values (); - // setup singleton linemap linemap = rust_get_linemap (); diff --git a/gcc/rust/rust-session-manager.h b/gcc/rust/rust-session-manager.h index 2432de7..99dd107 100644 --- a/gcc/rust/rust-session-manager.h +++ b/gcc/rust/rust-session-manager.h @@ -325,9 +325,6 @@ private: void dump_hir_pretty (HIR::Crate &crate) const; void dump_type_resolution (HIR::Crate &crate) const; - void implicitly_enable_feature (std::string feature_name); - void enable_features (); - // pipeline stages - TODO maybe move? /* Register plugins pipeline stage. TODO maybe move to another object? * Currently dummy stage. In future will handle attribute injection diff --git a/gcc/rust/rust-target-def.h b/gcc/rust/rust-target-def.h deleted file mode 100644 index 94c3f9f..0000000 --- a/gcc/rust/rust-target-def.h +++ /dev/null @@ -1,20 +0,0 @@ -/* rust-target-def.h -- Default initializers for Rust target hooks. - Copyright (C) 2020-2022 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -#include "rust/rust-target-hooks-def.h" -#include "tree.h" -#include "hooks.h" diff --git a/gcc/rust/rust-target.def b/gcc/rust/rust-target.def deleted file mode 100644 index 6d1ccaf..0000000 --- a/gcc/rust/rust-target.def +++ /dev/null @@ -1,89 +0,0 @@ -/* rust-target.def -- Target hook definitions for the Rust front end. - Copyright (C) 2020-2022 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -/* See target-hooks-macros.h for details of macros that should be - provided by the including file, and how to use them here. */ - -#include "target-hooks-macros.h" - -#undef HOOK_TYPE -#define HOOK_TYPE "Rust Target Hook" - -HOOK_VECTOR (TARGETRUSTM_INITIALIZER, gcc_targetrustm) - -#undef HOOK_PREFIX -#define HOOK_PREFIX "TARGET_" - -/* Environmental CPU info and features (e.g. endianness, pointer size) relating to the target CPU. */ -DEFHOOK -(rust_cpu_info, - "Declare all environmental CPU info and features relating to the target CPU\n\ -using the function @code{rust_add_target_info}, which takes a string representing\n\ -the feature key and a string representing the feature value. Configuration pairs\n\ -predefined by this hook apply to all files that are being compiled.", - void, (void), - hook_void_void) - -// TODO: remove: format of DEFHOOK is return type, (param types), default value for function that it translates to - -/* Environmental OS info relating to the target OS. */ -DEFHOOK -(/*d_os_versions*/rust_os_info, - "Similar to @code{TARGET_RUST_CPU_INFO}, but is used for configuration info\n\ -relating to the target operating system.", - void, (void), - hook_void_void) - -/* The sizeof CRITICAL_SECTION or pthread_mutex_t. */ -/*DEFHOOK -(d_critsec_size, - "Returns the size of the data structure used by the target operating system\n\ -for critical sections and monitors. For example, on Microsoft Windows this\n\ -would return the @code{sizeof(CRITICAL_SECTION)}, while other platforms that\n\ -implement pthreads would return @code{sizeof(pthread_mutex_t)}.", - unsigned, (void), - hook_uint_void_0)*/ - - /* TODO: add more if required. Possible ones include static C runtime, target_env - * or vendor (if not covered by OS), and flags from the driver that may or may not - * require a target hook (might instead require a different type of hook) like - * test, debug_assertions, and proc_macro. */ - - /* TODO: rustc target support by tier: - * Tier 1 (definitely work): - * - i686-pc-windows-gnu - * - i686-pc-windows-msvc - * - i686-unknown-linux-gnu - * - x86_64-apple-darwin - * - x86_64-pc-windows-gnu - * - x86_64-pc-windows-msvc - * - x86_64-unknown-linux-gnu - * - Basically, 32-bit and 64-bit x86 for windows (MinGW and MSVC), gnu/linux, and osx - * Other tiers have too much crap, but basic breakdown is: - * Tier 2: - * - archs: ARM64 (aarch64), ARMv7, ARMv6, asm.js, i586 (32-bit x86 without SSE), mips, - * mips64, powerpc, powerpc64, risc-v, s390x, sparc, webasm, netbsd, redox (does gcc have support?), - * cloudabi (never head of it; i imagine no gcc support) - * - oses: ios, fuchsia, android, windows (msvc and mingw), gnu/linux, freebsd, netbsd - * Tier 2.5: - * - powerpc SPE linux, various cloudabi stuff, sparc - * Tier 3: - * - more obscure stuff like UWP support, vxworks, openbsd, dragonflybsd, haiku, bitrig, windows xp, - * cuda, hexagon, and combinations of them and earlier stuff */ - -/* Close the 'struct gcc_targetrustm' definition. */ -HOOK_VECTOR_END (C90_EMPTY_HACK) diff --git a/gcc/rust/rust-target.h b/gcc/rust/rust-target.h deleted file mode 100644 index 743ac51..0000000 --- a/gcc/rust/rust-target.h +++ /dev/null @@ -1,47 +0,0 @@ -/* rust-target.h -- Data structure definitions for target-specific Rust - behavior. Copyright (C) 2020-2022 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3, or (at your option) any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; see the file COPYING3. If not see - <http://www.gnu.org/licenses/>. */ - -#ifndef GCC_RUST_TARGET_H -#define GCC_RUST_TARGET_H - -#include "target.h" -#include "tm.h" -#include "memmodel.h" -#include "tm_p.h" - -// TODO: find out what this stuff actually does -#define DEFHOOKPOD(NAME, DOC, TYPE, INIT) TYPE NAME; -// #define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (*NAME) PARAMS; -#define DEFHOOK_UNDOC DEFHOOK -#define HOOKSTRUCT(FRAGMENT) FRAGMENT - -#include "rust-target.def" - -/* Each target can provide their own. */ -extern struct gcc_targetrustm targetrustm; -/* Some kind of structure to store all rust hook macros (like the - * TARGET_RUST_CPU_INFO). This is required to store the function pointers for - * the target hooks so that the frontend can call them - * and it calls the correct target-specific function. */ - -/* Used by target to add predefined version idenditiers. */ -// extern void d_add_builtin_version (const char *); -/* Used by target to add target-related info. */ -extern void -rust_add_target_info (const char *key, const char *value); - -#endif |