aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2020-07-22 22:06:46 +0800
committerPhilip Herron <philip.herron@embecosm.com>2020-11-28 21:13:19 +0000
commitcc2880c40817a08a19c6dd4c5bb1aa2a1fc3346f (patch)
tree6848082c6097b2272daca0c0a0b79b3dd5d942ab
parentffb8dbc16a003a0f00662ded052de3a3b7dcb964 (diff)
downloadgcc-cc2880c40817a08a19c6dd4c5bb1aa2a1fc3346f.zip
gcc-cc2880c40817a08a19c6dd4c5bb1aa2a1fc3346f.tar.gz
gcc-cc2880c40817a08a19c6dd4c5bb1aa2a1fc3346f.tar.bz2
Added TILE-Gx target hook
-rw-r--r--gcc/config/tilegx/tilegx.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/tilegx/tilegx.h b/gcc/config/tilegx/tilegx.h
index 15ab6f4..61d189d 100644
--- a/gcc/config/tilegx/tilegx.h
+++ b/gcc/config/tilegx/tilegx.h
@@ -54,6 +54,21 @@
#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")