aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2020-07-09 22:12:37 +0800
committerPhilip Herron <philip.herron@embecosm.com>2020-11-28 21:13:18 +0000
commit1bb2b31af2430f0759aa1f6f3bb6157bbe64715f (patch)
tree4e67c2377b23981827be9f819833ada0e6be1e83 /gcc
parent7cd87ee2da3a4ba776cd409d7070bf4b42f553c6 (diff)
downloadgcc-1bb2b31af2430f0759aa1f6f3bb6157bbe64715f.zip
gcc-1bb2b31af2430f0759aa1f6f3bb6157bbe64715f.tar.gz
gcc-1bb2b31af2430f0759aa1f6f3bb6157bbe64715f.tar.bz2
Added PRU target hook (or provisional one at least)
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/pru/pru.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/config/pru/pru.h b/gcc/config/pru/pru.h
index 7f217fe..164cafb 100644
--- a/gcc/config/pru/pru.h
+++ b/gcc/config/pru/pru.h
@@ -37,6 +37,21 @@
} \
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. */