From 72b91a85f0f6b3a3800beb351db95dd758efc85c Mon Sep 17 00:00:00 2001 From: SimplyTheOther Date: Sun, 21 Jun 2020 17:27:51 +0800 Subject: Added FT32 target hook (or at least provisional one) --- gcc/config/ft32/ft32.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gcc') diff --git a/gcc/config/ft32/ft32.h b/gcc/config/ft32/ft32.h index 962cce8..eb63c5b 100644 --- a/gcc/config/ft32/ft32.h +++ b/gcc/config/ft32/ft32.h @@ -463,6 +463,22 @@ 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"); \ + /*TODO: figure out how to use lra option*/ \ + 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 -- cgit v1.1