From nobody Wed Nov 27 19:30:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697835110; cv=none; d=zohomail.com; s=zohoarc; b=KzYu5QLJtau5qEZxrqHlI/S0+XGC/XuKGQvQbZGewYnpU9NW+hWR7omZC9J+7iY1Vj5v7GSWFerQvaKYphoXhT6w/SaX3Nh/pd/7lWiIyV2dB3EVAjLSnMEx/5reLYEX8d9HpJAsInGJUSoeT63h22i0K33rXeX9jp+Yk9n+0Io= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697835110; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mLJZOZT+lQfb7f2jxY8G9POC0Jl6++4YjRa95Z5whBs=; b=C6Yo4se9jucE1uj5VNqSwlAPr3YXh8dwN8WzYDfOWxXxhqy+CjFp6c6zcN0iGH7urHq6w3eq0Q8tzekXQhW9JxKyNbcfh5zX9x0Eos1xS1ezQHaY/kjKi2gK+hpGcLes9NknPWCwTM58I2J56XiUjTJXlL92iGRlFMZbPyxVmD0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697835110547293.5480608196141; Fri, 20 Oct 2023 13:51:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtwLt-0007rE-T8; Fri, 20 Oct 2023 16:44:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtwLl-0007lv-9M for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:44:09 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtwLh-0008Ea-92 for qemu-devel@nongnu.org; Fri, 20 Oct 2023 16:44:04 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6b5cac99cfdso1154679b3a.2 for ; Fri, 20 Oct 2023 13:44:00 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id k15-20020aa7998f000000b00688965c5227sm1944975pfh.120.2023.10.20.13.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 13:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697834639; x=1698439439; darn=nongnu.org; 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=mLJZOZT+lQfb7f2jxY8G9POC0Jl6++4YjRa95Z5whBs=; b=KEmwcthD0ITAkDvHlOVkgAITZWT2k6uUCKsn5oIA5QBzGR4Z8oKycd+y3lo3ge9ptF HYXOuAW0IuwhEhkRCstIxOjsI92vz83Zf5lQQoKLzfBm2QmbnO4dfRma/iTYmo8Hw5jm AzaXWhkx6sPsaGM/AuokX3NIhS5Fo3BEo/I7vbParkzH/+HDJk0pbD77PydiRKmDGoQD GVthDp/ITnhzptsKybxFsOVtyi6Gj+7MavTlNy+k2sCisZr7Ka03HlFaN1xq7vnO/SHU iY6w0irGT8Wm8kcQfFpD+9XzlCP3BcyzZrejmwQQc6vmJScI/FgSkGzw9xhlFoJjduy2 exPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697834639; x=1698439439; 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=mLJZOZT+lQfb7f2jxY8G9POC0Jl6++4YjRa95Z5whBs=; b=MR6TUUDcLHSJpymoBJtcvW4CJm87Qd6ZHLHHi6nOJXNP55nw01tgNEsDdiz/b6Tjbo OERlhFBmNQxbVv0UYI83Z/WQDS8SvpTggFTWyXM4TKeZi1WKdt4zFkrlr3yTboKbJEIf IwObaBIcLxWuXX/d9PoNKzT2ZGOjLEcaA/trjoKx7KBgSh14DFde2z296ZEDF2nGLouR KeLz2CvKhBz90SfLMDe3YCVxGF5Lebgvbw+jRLgAiC1xhwDp7bKs9lvF9XlJ1rWzRY8R rtQw1Z5VM6CF2tO+7GuWk/XLVue/SmvclXVATMfFItmZw4r3jV7W7DF8J99KsgSbjwSu v5GA== X-Gm-Message-State: AOJu0Yxml19zMRjcoWsWBi2SREvJ3sSiuV70BSEDMZZK+ye0JH6vg2hI 3NIkvxOV/QQHGHCLryhrAXd1v67gpC+VC1+X/jA= X-Google-Smtp-Source: AGHT+IGfwqAUNIaFqmf7/BNw4Jab48mDUqppZWmGj3apEd+xxoRYtt1/uEx9Op5WItnVXOQ5oso5sQ== X-Received: by 2002:a05:6a20:258b:b0:15e:bb88:b771 with SMTP id k11-20020a056a20258b00b0015ebb88b771mr2486228pzd.37.1697834639434; Fri, 20 Oct 2023 13:43:59 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH v2 29/65] target/hppa: Remove TARGET_HPPA64 Date: Fri, 20 Oct 2023 13:42:55 -0700 Message-Id: <20231020204331.139847-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020204331.139847-1-richard.henderson@linaro.org> References: <20231020204331.139847-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x42b.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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697835111231100005 Content-Type: text/plain; charset="utf-8" Allow both user-only and system mode to run pa2.0 cpus. Avoid creating a separate qemu-system-hppa64 binary; force the qemu-hppa binary to use TARGET_ABI32. Signed-off-by: Richard Henderson --- configs/targets/hppa-linux-user.mak | 1 + target/hppa/cpu-param.h | 23 +++++++---------------- target/hppa/cpu.h | 9 --------- target/hppa/cpu.c | 3 --- target/hppa/translate.c | 2 -- 5 files changed, 8 insertions(+), 30 deletions(-) diff --git a/configs/targets/hppa-linux-user.mak b/configs/targets/hppa-lin= ux-user.mak index 361ea39d71..8e0a80492f 100644 --- a/configs/targets/hppa-linux-user.mak +++ b/configs/targets/hppa-linux-user.mak @@ -1,4 +1,5 @@ TARGET_ARCH=3Dhppa +TARGET_ABI32=3Dy TARGET_SYSTBL_ABI=3Dcommon,32 TARGET_SYSTBL=3Dsyscall.tbl TARGET_BIG_ENDIAN=3Dy diff --git a/target/hppa/cpu-param.h b/target/hppa/cpu-param.h index c2791ae5f2..2fb8e7924b 100644 --- a/target/hppa/cpu-param.h +++ b/target/hppa/cpu-param.h @@ -8,26 +8,17 @@ #ifndef HPPA_CPU_PARAM_H #define HPPA_CPU_PARAM_H =20 -#ifdef TARGET_HPPA64 -# define TARGET_LONG_BITS 64 -# define TARGET_REGISTER_BITS 64 -# define TARGET_VIRT_ADDR_SPACE_BITS 64 -# define TARGET_PHYS_ADDR_SPACE_BITS 64 -#elif defined(CONFIG_USER_ONLY) -# define TARGET_LONG_BITS 32 -# define TARGET_REGISTER_BITS 32 +#define TARGET_LONG_BITS 64 +#define TARGET_REGISTER_BITS 64 + +#if defined(CONFIG_USER_ONLY) && defined(TARGET_ABI32) +# define TARGET_PHYS_ADDR_SPACE_BITS 32 # define TARGET_VIRT_ADDR_SPACE_BITS 32 -# define TARGET_PHYS_ADDR_SPACE_BITS 32 #else -/* - * In order to form the GVA from space:offset, - * we need a 64-bit virtual address space. - */ -# define TARGET_LONG_BITS 64 -# define TARGET_REGISTER_BITS 32 +# define TARGET_PHYS_ADDR_SPACE_BITS 64 # define TARGET_VIRT_ADDR_SPACE_BITS 64 -# define TARGET_PHYS_ADDR_SPACE_BITS 32 #endif + #define TARGET_PAGE_BITS 12 =20 #endif diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h index 2182437882..8320f82464 100644 --- a/target/hppa/cpu.h +++ b/target/hppa/cpu.h @@ -107,11 +107,7 @@ #define PSW_T 0x01000000 #define PSW_S 0x02000000 #define PSW_E 0x04000000 -#ifdef TARGET_HPPA64 #define PSW_W 0x08000000 /* PA2.0 only */ -#else -#define PSW_W 0 -#endif #define PSW_Z 0x40000000 /* PA1.x only */ #define PSW_Y 0x80000000 /* PA1.x only */ =20 @@ -124,13 +120,8 @@ #define PSW_SM_P PSW_P #define PSW_SM_Q PSW_Q /* Enable Interrupt State Collection */ #define PSW_SM_R PSW_R /* Enable Recover Counter Trap */ -#ifdef TARGET_HPPA64 #define PSW_SM_E 0x100 #define PSW_SM_W 0x200 /* PA2.0 only : Enable Wide Mode */ -#else -#define PSW_SM_E 0 -#define PSW_SM_W 0 -#endif =20 #define CR_RC 0 #define CR_PID1 8 diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 81d51e98b6..36875a6a1a 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -253,13 +253,10 @@ static const TypeInfo hppa_cpu_type_infos[] =3D { .class_size =3D sizeof(HPPACPUClass), .class_init =3D hppa_cpu_class_init, }, -#ifdef TARGET_HPPA64 { .name =3D TYPE_HPPA64_CPU, .parent =3D TYPE_HPPA_CPU, - .instance_init =3D hppa64_cpu_initfn, }, -#endif }; =20 DEFINE_TYPES(hppa_cpu_type_infos) diff --git a/target/hppa/translate.c b/target/hppa/translate.c index be1763cb45..450f64bac3 100644 --- a/target/hppa/translate.c +++ b/target/hppa/translate.c @@ -2156,7 +2156,6 @@ static bool trans_mfctl(DisasContext *ctx, arg_mfctl = *a) =20 switch (ctl) { case CR_SAR: -#ifdef TARGET_HPPA64 if (a->e =3D=3D 0) { /* MFSAR without ,W masks low 5 bits. */ tmp =3D dest_gpr(ctx, rt); @@ -2164,7 +2163,6 @@ static bool trans_mfctl(DisasContext *ctx, arg_mfctl = *a) save_gpr(ctx, rt, tmp); goto done; } -#endif save_gpr(ctx, rt, cpu_sar); goto done; case CR_IT: /* Interval Timer */ --=20 2.34.1