aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2020-06-26 22:02:34 +0800
committerPhilip Herron <philip.herron@embecosm.com>2020-11-28 21:13:17 +0000
commit5f3f4b10772c2be961de0c59cd3f5409b63fa5f9 (patch)
tree1ceec145c6e945a5883a2e8ceaa3f40bb2e2ceaf /gcc
parent0195559c0ece9d91a581330c694f5ecde5213c90 (diff)
downloadgcc-5f3f4b10772c2be961de0c59cd3f5409b63fa5f9.zip
gcc-5f3f4b10772c2be961de0c59cd3f5409b63fa5f9.tar.gz
gcc-5f3f4b10772c2be961de0c59cd3f5409b63fa5f9.tar.bz2
Added M*Core target hook (or provisional one at least)
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/mcore/mcore.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index ff746c1..b24009c 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -49,6 +49,31 @@
} \
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}}"