From e58a5c98546ba203c77d870d065a48784a1d153d Mon Sep 17 00:00:00 2001 From: SimplyTheOther Date: Mon, 22 Jun 2020 22:16:25 +0800 Subject: Added IQ2000 target hook --- gcc/config/iq2000/iq2000.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc') diff --git a/gcc/config/iq2000/iq2000.h b/gcc/config/iq2000/iq2000.h index 2a257e5..bbd4dff 100644 --- a/gcc/config/iq2000/iq2000.h +++ b/gcc/config/iq2000/iq2000.h @@ -43,6 +43,19 @@ } \ while (0) +#define TARGET_RUST_CPU_INFO() \ + do { \ + rust_add_target_info("target_arch", "iq2000"); \ + /*TODO: maybe make sub-arches features?*/ \ + if (TARGET_EMBEDDED_DATA) \ + rust_add_target_info("target_feature", "embedded-data"); \ + if (TARGET_GPOPT) \ + rust_add_target_info("target_feature", "gpopt"); \ + /*TODO: figure out if can detect no-crt0 as feature*/ \ + if (TARGET_UNINIT_CONST_IN_RODATA) \ + rust_add_target_info("target_feature", "uninit-const-in-rodata"); \ + } while (0) + /* Macros used in the machine description to test the flags. */ #define TARGET_STATS 0 -- cgit v1.1