From 113f2b15c41a6b9656e55505ba4a47a05ab493ee Mon Sep 17 00:00:00 2001 From: SimplyTheOther Date: Thu, 23 Jul 2020 22:21:24 +0800 Subject: Added Visium target hook (or at least provisional one) --- gcc/config/visium/visium.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gcc') diff --git a/gcc/config/visium/visium.h b/gcc/config/visium/visium.h index 5cb940f..3b36252 100644 --- a/gcc/config/visium/visium.h +++ b/gcc/config/visium/visium.h @@ -80,6 +80,30 @@ } \ while (0) +#define TARGET_RUST_CPU_INFO() \ + do { \ + rust_add_target_info("target_arch", "visium"); \ + /*TODO: figure out how to get info from debug, sim and enable-trampolines*/ \ + if (TARGET_FPU) \ + rust_add_target_info("target_feature", "hard-float"); \ + else \ + rust_add_target_info("target_feature", "soft-float"); \ + if (TARGET_MCM) \ + rust_add_target_info("target_feature", "mcm"); \ + else if (visium_cpu_and_features == PROCESSOR_GR5) \ + rust_add_target_info("target_feature", "gr5"); \ + else if (visium_cpu_and_features == PROCESSOR_GR6) \ + rust_add_target_info("target_feature", "gas"); \ + if (TARGET_SV_MODE) \ + rust_add_target_info("target_feature", "sv-mode"); \ + else \ + rust_add_target_info("target_feature", "user-mode"); \ + if (TARGET_BMI) \ + rust_add_target_info("target_feature", "bmi"); \ + if (TARGET_FPU_IEEE) \ + rust_add_target_info("target_feature", "fpu-ieee"); \ + } while (0) + /* Recast the cpu class to be the cpu attribute. Every file includes us, but not every file includes insn-attr.h. */ #define visium_cpu_attr ((enum attr_cpu) visium_cpu) -- cgit v1.1