From patchwork Tue Nov 2 11:06:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516641 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp4407885iml; Tue, 2 Nov 2021 04:24:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqmZ84y83FAD7/QiX0Nc484EctwIR3GL9CG7Ox9Q+1fqrEpfK2cdpEz0mWgsXIChvAidLd X-Received: by 2002:a9d:12c2:: with SMTP id g60mr538071otg.372.1635852287129; Tue, 02 Nov 2021 04:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635852287; cv=none; d=google.com; s=arc-20160816; b=TmHz41U9LPWD8ev03QtgTdOj/C9Fgk+tC2EB+SQ/xeaEVXSR5rO4VTQbacfOCjSzSJ vK/9a9G8IBOr+tfPVBJxtVmpu2qYxZT9OLdunWGXnEaMdCnNp7Ya/PpTWha5aHrfJPyM B5DKFzXcXYZLz0VchDc8uVQbsCDwiTX806gd3bJKoxlCpxo2Wgq1JGjpH3SCCfENrs2r E7wDF0sCTkqz/wq+izcDVlXXJhQICzrl2fjrmfI0dZTa89jjNBq48ZsofQ6VMUR7tPMt 7TbB2YDeHvlM1uW24aNkJTRz1lolOMe0WSeTfvj7nynfJRGYDT/HYdsZmNWI+OG7nGYI UKeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=dyOAbtDEe2hsdPtG2fphhVCPp8pp4Epcy5WbMT+mT+o=; b=DJTt2iQEDds3y4iAlYRRcGRDYcuTl2xNDtQM0bLADnWiJH08mb3DIOjcG96PpRM+DC RkCQtpgSPCKWF/SIQM8BZsgloAH7U70e8JxvH1gHtrGp+dFlAUeMZ598t6SbwgAGq2go mw+edK77syYq2HUXOS7yZlMfpiID7Js5p4mUz9rnrBWqUTF+GLX3HDEmGTkD4DGhAUEt FBeY+Azv5LN85zjejv87KrWec6lE3cCoig+1Y8A+mg53F0JIbPBYclRJSAZRKbwz5Mjl pNE+5rOmA/6OTScDYUC2YgSpszLvk4guX2KcGvUP5nwGwKbUONmX/X8mMwpEkRXRN31G 0CEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ubnsuYS/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q1si3775124otf.160.2021.11.02.04.24.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Nov 2021 04:24:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="ubnsuYS/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhruI-00064x-Fm for patch@linaro.org; Tue, 02 Nov 2021 07:24:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhrdt-0003hR-Ow for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:07:49 -0400 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:39471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhrdq-0000rT-7g for qemu-devel@nongnu.org; Tue, 02 Nov 2021 07:07:48 -0400 Received: by mail-qv1-xf2a.google.com with SMTP id k29so13012856qve.6 for ; Tue, 02 Nov 2021 04:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dyOAbtDEe2hsdPtG2fphhVCPp8pp4Epcy5WbMT+mT+o=; b=ubnsuYS/0j6S4B/eh3xJJe+kVKMcVaVdJcMnzHcKn3mAno3LsHxaFOtAUPOTLgkYl1 szZY4WXHuWoOE4o4aKALcxSUuOv+s0Q6JWRjqR94snLA3d0QOPzJlTNv7qTTiPXK1gBe d7HG3xDLpiGNRVfb14XSPv92WALIdlQ29lZQQoBwHvMkyu1BXldonvEjPDnQ4ReBfU1Y TsY4IE46+aIyRRZTx1rr9i2BAecXtRCDj+XkDYOVG1Od4t/RqOF70DGwNXYI7/SUunMo mCapZhof3aH+I+KxSXqPZKTRXwPKZIVhV2V6xlTXxU/jvZCJEcsWNp+1jvRW4jhRhPHR PWnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dyOAbtDEe2hsdPtG2fphhVCPp8pp4Epcy5WbMT+mT+o=; b=Er4QnjPLaKPmx0+DwKyv7ZGpuOyLPOLwbYDtZGTNJkA29iHC45z+3+gA9bsbng5KWM J2xRs4+s/olOjtg1LvGNW8PXy0coT01lNUT3NjzS9JKORoUXHo96RIQmNH8zHTvfWRJq FVlciBzDdtTj7is4DW6idrnYqdLGt0lDTJZuPxwzCucpu8YXjMwy0r+WyLA/xNjROXtK H7zz/gmRZhQxqhZu43qKa+xGYHW2RZYtuf18n74dmR2Qn8+ztQIr+Cu42i7kwiUSdGQJ 5fEfztjqfgRHTcvPOAiFlz84TdO/A2EjgSZWoscY4wwMm2cm/Eni5K+OqU4XUoiOaToS bWuw== X-Gm-Message-State: AOAM532lnfiO22FHZ4ZhRqrUMInmlzv6eeRRIJ/tmSg3qSmgcZ24PT3E vwSsldiVf7SvqTFtbvVJ3JsK5cHeVZe4vA== X-Received: by 2002:a0c:9c0f:: with SMTP id v15mr34742043qve.8.1635851264274; Tue, 02 Nov 2021 04:07:44 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-57.nyc.biz.rr.com. [172.254.253.57]) by smtp.gmail.com with ESMTPSA id bm7sm3568612qkb.86.2021.11.02.04.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 04:07:44 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 05/60] configure: Merge riscv32 and riscv64 host architectures Date: Tue, 2 Nov 2021 07:06:45 -0400 Message-Id: <20211102110740.215699-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211102110740.215699-1-richard.henderson@linaro.org> References: <20211102110740.215699-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::f2a; envelope-from=richard.henderson@linaro.org; helo=mail-qv1-xf2a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Francis , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Warner Losh Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The existing code for safe-syscall.inc.S will compile without change for riscv32 and riscv64. We may also drop the meson.build stanza that merges them for tcg/. Reviewed-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-by: Richard Henderson --- configure | 8 ++------ meson.build | 4 +--- linux-user/host/{riscv64 => riscv}/hostdep.h | 4 ++-- linux-user/host/riscv32/hostdep.h | 11 ----------- linux-user/host/{riscv64 => riscv}/safe-syscall.inc.S | 0 5 files changed, 5 insertions(+), 22 deletions(-) rename linux-user/host/{riscv64 => riscv}/hostdep.h (94%) delete mode 100644 linux-user/host/riscv32/hostdep.h rename linux-user/host/{riscv64 => riscv}/safe-syscall.inc.S (100%) -- 2.25.1 diff --git a/configure b/configure index 039467c04b..d57ad58342 100755 --- a/configure +++ b/configure @@ -570,11 +570,7 @@ elif check_define __s390__ ; then cpu="s390" fi elif check_define __riscv ; then - if check_define _LP64 ; then - cpu="riscv64" - else - cpu="riscv32" - fi + cpu="riscv" elif check_define __arm__ ; then cpu="arm" elif check_define __aarch64__ ; then @@ -587,7 +583,7 @@ ARCH= # Normalise host CPU name and set ARCH. # Note that this case should only have supported host CPUs, not guests. case "$cpu" in - ppc|ppc64|s390x|sparc64|x32|riscv32|riscv64) + ppc|ppc64|s390x|sparc64|x32|riscv) ;; ppc64le) ARCH="ppc64" diff --git a/meson.build b/meson.build index 2c5b53cbe2..90e3e85f20 100644 --- a/meson.build +++ b/meson.build @@ -55,7 +55,7 @@ have_block = have_system or have_tools python = import('python').find_installation() supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux'] -supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv32', 'riscv64', 'x86', 'x86_64', +supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64', 'arm', 'aarch64', 'mips', 'mips64', 'sparc', 'sparc64'] cpu = host_machine.cpu_family() @@ -351,8 +351,6 @@ if not get_option('tcg').disabled() tcg_arch = 'i386' elif config_host['ARCH'] == 'ppc64' tcg_arch = 'ppc' - elif config_host['ARCH'] in ['riscv32', 'riscv64'] - tcg_arch = 'riscv' endif add_project_arguments('-iquote', meson.current_source_dir() / 'tcg' / tcg_arch, language: ['c', 'cpp', 'objc']) diff --git a/linux-user/host/riscv64/hostdep.h b/linux-user/host/riscv/hostdep.h similarity index 94% rename from linux-user/host/riscv64/hostdep.h rename to linux-user/host/riscv/hostdep.h index 865f0fb9ff..2ba07456ae 100644 --- a/linux-user/host/riscv64/hostdep.h +++ b/linux-user/host/riscv/hostdep.h @@ -5,8 +5,8 @@ * See the COPYING file in the top-level directory. */ -#ifndef RISCV64_HOSTDEP_H -#define RISCV64_HOSTDEP_H +#ifndef RISCV_HOSTDEP_H +#define RISCV_HOSTDEP_H /* We have a safe-syscall.inc.S */ #define HAVE_SAFE_SYSCALL diff --git a/linux-user/host/riscv32/hostdep.h b/linux-user/host/riscv32/hostdep.h deleted file mode 100644 index adf9edbf2d..0000000000 --- a/linux-user/host/riscv32/hostdep.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * hostdep.h : things which are dependent on the host architecture - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - */ - -#ifndef RISCV32_HOSTDEP_H -#define RISCV32_HOSTDEP_H - -#endif diff --git a/linux-user/host/riscv64/safe-syscall.inc.S b/linux-user/host/riscv/safe-syscall.inc.S similarity index 100% rename from linux-user/host/riscv64/safe-syscall.inc.S rename to linux-user/host/riscv/safe-syscall.inc.S