diff options
author | SimplyTheOther <simplytheother@gmail.com> | 2020-06-21 17:59:20 +0800 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2020-11-28 21:13:17 +0000 |
commit | 3e34ae54b071ebda46d7226b03b4bc32859dee68 (patch) | |
tree | 23e6a8ce99791508637c64b6707f54fee60f9cd4 | |
parent | 72b91a85f0f6b3a3800beb351db95dd758efc85c (diff) | |
download | gcc-3e34ae54b071ebda46d7226b03b4bc32859dee68.zip gcc-3e34ae54b071ebda46d7226b03b4bc32859dee68.tar.gz gcc-3e34ae54b071ebda46d7226b03b4bc32859dee68.tar.bz2 |
Added (really crappy) GCN target hook
-rw-r--r-- | gcc/config/gcn/gcn.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h index f63e7df..2ca7cc2 100644 --- a/gcc/config/gcn/gcn.h +++ b/gcc/config/gcn/gcn.h @@ -27,6 +27,28 @@ } \ while(0) +#define TARGET_RUST_CPU_INFO() \ + do { \ + rust_add_target_info("target_arch", "amdgcn"); \ + /*TODO: maybe make arches features? e.g. "fiji", "gfx900"*/ \ + /*TODO: is defining via "is arch 3" or "is arch 3 or higher" better?*/ \ + if (TARGET_GCN3) \ + rust_add_target_info("target_feature", "gcn3"); \ + if (TARGET_GCN5) \ + rust_add_target_info("target_feature", "gcn5"); \ + if (TARGET_ABI64) \ + rust_add_target_info("target_feature", "64"); \ + else /*are these defines actually useful?*/ \ + rust_add_target_info("target_feature", "32"); \ + /*TODO: figure out how to check gomp feature*/ \ + /*TODO: ensure that vars below are accessible - defined weirdly so may not be*/ \ + if (flag_bypass_init_error) \ + rust_add_target_info("target_feature", "bypass-init-error"); \ + if (flag_worker_partitioning) \ + rust_add_target_info("target_feature", "acc-experimental-workers"); \ + /*TODO: figure out how to represent stack-size and local-symbol-id as defines*/ \ + } while (0) + /* Support for a compile-time default architecture and tuning. The rules are: --with-arch is ignored if -march is specified. |