From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id B88893857BB3 for ; Sun, 13 Nov 2022 21:46:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B88893857BB3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu Received: by mail-ed1-x534.google.com with SMTP id a13so14802777edj.0 for ; Sun, 13 Nov 2022 13:46:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=e/eWWSnHa+qcto148TgGROBQiNtNsahk7zrpPhsLJew=; b=WRaCXidKxwwu0GzqBDM/QQiAg/PkUw/41pztzfJdqNcOu8vc5TSaYBEtj9gmKfn89s E21hwlq7OujU0qk8UU8mWRoNYh0Z/V92N2SQspgjCpID/8CCGaDPEZV8xGaQtimA7g3k 5ubCwRq9rOrmQFiFPPXDP7VEXB76Uj/rCb88eyaOSV1EYINchpkkND/LzuZ7hD/iI1Hu c6wwiKDxrAu1QYDwXEuNPHOFoTBqsEGZplDwj+AzFU88c2M/9gnmFa0v6CkWY1GqrXBR Rt+4jW1mnmfAu6GpWGA3Q2zR5t8w5Owsu4mogaXXWXfVcC/8DY7rfnOb7ssYM1Bhicqk 89zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e/eWWSnHa+qcto148TgGROBQiNtNsahk7zrpPhsLJew=; b=77WUKP/uEVOLEF7q2hOfSt8zNApUh1DCyZSjeIEcaUGkBZwQm1G8VCqHQ7jTROrIaq 6xImrwEg19wVcDrL28y9vegQg+IzKSxph9kIld1/ZDIb4sDw1gHC1/RnY+4OGlHBeYGp SbMJcfeoJiFQwAxMIhzNX/6K+2ZviiYWQd9yV8VSO/W2tkjld2Ip8z6p4wVYyK4nwznd VjL/c1xwGbdPnLHbYsF408UsxI8JhEJONgKwPQ1HQy0+d2xi79qcmzVTAIi1ABcmSuGL iW+vyrXqd2TozLlqnSQLG29JHO2q42FyhggIA/8ylNMhS97yE7x+c/+YQrqsOWvOJmlH cx0g== X-Gm-Message-State: ANoB5pltNhei+EQTtnFCxd94s8QYI0gagNLiGYS8z7FzfQO4fzhMcKdm 23ZhIfEGJxocRKVHEN5EUZ8kT2BZgSa1d6L3 X-Google-Smtp-Source: AA0mqf60UjoxoIsJwOwpXtcJi79qMrzCHsGpjxpHIQb6k+ncTQ07pUiJgiVgPjmJp3es5+YlQWE3gA== X-Received: by 2002:a05:6402:60a:b0:461:92bd:21cf with SMTP id n10-20020a056402060a00b0046192bd21cfmr8727282edv.405.1668376004268; Sun, 13 Nov 2022 13:46:44 -0800 (PST) Received: from beast.fritz.box (62-178-148-172.cable.dynamic.surfer.at. [62.178.148.172]) by smtp.gmail.com with ESMTPSA id lb17-20020a170907785100b00734bfab4d59sm3432282ejc.170.2022.11.13.13.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 13:46:43 -0800 (PST) From: Christoph Muellner To: gcc-patches@gcc.gnu.org, Kito Cheng , Jim Wilson , Palmer Dabbelt , Andrew Waterman , Philipp Tomsich , Cooper Qu , Lifang Xia , Yunhai Shang , Zhiwei Liu Cc: =?UTF-8?q?Christoph=20M=C3=BCllner?= Subject: [PATCH 2/7] riscv: riscv-cores.def: Add T-Head XuanTie C906 Date: Sun, 13 Nov 2022 22:46:31 +0100 Message-Id: <20221113214636.2747737-3-christoph.muellner@vrull.eu> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221113214636.2747737-1-christoph.muellner@vrull.eu> References: <20221113214636.2747737-1-christoph.muellner@vrull.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_MANYTO,KAM_NUMSUBJECT,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Christoph Müllner This adds T-Head's XuanTie C906 to the list of known cores as "thead-c906". The C906 is shipped for quite some time (it is the core of the Allwinner D1). Note, that the tuning struct for the C906 is already part of GCC (it is also name "thead-c906"). gcc/ChangeLog: * config/riscv/riscv-cores.def (RISCV_CORE): Add "thead-c906". gcc/testsuite/ChangeLog: * gcc.target/riscv/mcpu-thead-c906.c: New test. Signed-off-by: Christoph Müllner --- gcc/config/riscv/riscv-cores.def | 2 ++ .../gcc.target/riscv/mcpu-thead-c906.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/mcpu-thead-c906.c diff --git a/gcc/config/riscv/riscv-cores.def b/gcc/config/riscv/riscv-cores.def index 31ad34682c5..648a010e09b 100644 --- a/gcc/config/riscv/riscv-cores.def +++ b/gcc/config/riscv/riscv-cores.def @@ -73,4 +73,6 @@ RISCV_CORE("sifive-s76", "rv64imafdc", "sifive-7-series") RISCV_CORE("sifive-u54", "rv64imafdc", "sifive-5-series") RISCV_CORE("sifive-u74", "rv64imafdc", "sifive-7-series") +RISCV_CORE("thead-c906", "rv64imafdc", "thead-c906") + #undef RISCV_CORE diff --git a/gcc/testsuite/gcc.target/riscv/mcpu-thead-c906.c b/gcc/testsuite/gcc.target/riscv/mcpu-thead-c906.c new file mode 100644 index 00000000000..f579e7e2215 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/mcpu-thead-c906.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-skip-if "-march given" { *-*-* } { "-march=*" } } */ +/* { dg-options "-mcpu=thead-c906" { target { rv64 } } } */ +/* T-Head XuanTie C906 => rv64imafdc */ + +#if !((__riscv_xlen == 64) \ + && !defined(__riscv_32e) \ + && defined(__riscv_mul) \ + && defined(__riscv_atomic) \ + && (__riscv_flen == 64) \ + && defined(__riscv_compressed)) +#error "unexpected arch" +#endif + +int main() +{ + return 0; +} -- 2.38.1