aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2020-07-13 22:16:57 +0800
committerPhilip Herron <philip.herron@embecosm.com>2020-11-28 21:13:19 +0000
commit51e1554100dc5abc53c0e4fea82a62b26281ab98 (patch)
tree59c2c64228d86f9d84c62af4f0648896975aefc3 /gcc
parentba0c8e0c3603f2d76cfbba9f488fc14e05a4fc14 (diff)
downloadgcc-51e1554100dc5abc53c0e4fea82a62b26281ab98.zip
gcc-51e1554100dc5abc53c0e4fea82a62b26281ab98.tar.gz
gcc-51e1554100dc5abc53c0e4fea82a62b26281ab98.tar.bz2
Added RL78 target hook (or at least provisional one)
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rl78/rl78.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/config/rl78/rl78.h b/gcc/config/rl78/rl78.h
index 8f9a51c..c0491d1 100644
--- a/gcc/config/rl78/rl78.h
+++ b/gcc/config/rl78/rl78.h
@@ -49,6 +49,30 @@
} \
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"