From patchwork Wed Oct 18 21:50:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 735083 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1224723wro; Wed, 18 Oct 2023 14:53:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFM4lx+TtITOye8Zzzf8pZwnv7qIWKJjpWQCxHPl7pQJ/dshag3iyLiuY+vfqnNIA0EsDFL X-Received: by 2002:aca:1a01:0:b0:3a8:4d1f:9dd0 with SMTP id a1-20020aca1a01000000b003a84d1f9dd0mr501119oia.30.1697666029534; Wed, 18 Oct 2023 14:53:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697666029; cv=none; d=google.com; s=arc-20160816; b=lfaLtxIQpgbZeRV4nbf3Ph8sB5uHc/3CAFMATq2ax4cf/IuFdOT2CwYC5ykodc3qGV O8sw+o64fptuUVsTDVlhvZz09h43d+cgduUrhtbykkDKqqvn+wXpqE2Yd0HnvzGBzC9U iDiIpNSbZ0YQ+KqT+hpww9BNVOuZ5CIgEy9n7p8EgBWM1rmhojRQZEIcazJSQFGl26Zv NSkTvVDIN1JIQCo86K/2zLlQD/8rX4Ixmu5TjsrIMCiYngyWhnm99WzoTSUFpXLB2BHe 4pJcRbm12PgW86Zad0fOGgIc3svpjgshpmzTtLXuJe6pJiT8LeR0mu9xROLxIbHJhuja kArw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=8/S8sSHxU6SsNqJ7pUVzXGT8Rv+p2JizeJrho9KZ9JM=; fh=f2WZoDMBYjCKWIIOoPI+rQtxlv4fmOm4u+dLdQLqpOk=; b=YVzK94NRDOCUC/q1sLxnJW1Eb7melZqDj4RDgX4hjB4fNB/OG0n8Q8eqeG1vRavRXJ kRW9+ucr5sfO101xDt5ftXyul85rlT8hZsZUPpuYQDaLAklcyqrvS0uNPS1/gPerf6gb 5EMqAy4PPFwc9CyW9wK5aT5qFBQ6NTuboSLmrn4u3khT5Faj8HvcpS8GwyO40l7yRhym w+sLT9OiJ8bRsFtuVRw+L5dWlMZyahhQTTp1kQAFR995FwppRe9DTtwTx7jcIrV8SjdN H3DSXCAixYAC2KHy7Dnm7f0W3muSMLXg5wyisWPA3uJHP9p/3KxPr+P0p7a20D92h5a6 o+2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I8h6xbfD; 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=pass (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 bd17-20020ad45691000000b0065af1ba14c0si608558qvb.132.2023.10.18.14.53.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Oct 2023 14:53:49 -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=pass header.i=@linaro.org header.s=google header.b=I8h6xbfD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtESC-00014e-Q1; Wed, 18 Oct 2023 17:51:48 -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 1qtES5-0000is-TK for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:51:42 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtES2-0004Mg-Ti for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:51:41 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6934202b8bdso6378350b3a.1 for ; Wed, 18 Oct 2023 14:51:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697665897; x=1698270697; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=8/S8sSHxU6SsNqJ7pUVzXGT8Rv+p2JizeJrho9KZ9JM=; b=I8h6xbfDiSye8PAScOVCCK2+G99toazOIVwvJQ5wpX+ziCS7njDwpcKy2daI3s/6En BgyrG++TjkYB7z73GOF/PnsqLQUuIzVQTMeRmMufC7MNtvq/79Tebq64q/1YT0BYFqut NUh1sQNz1nHlLSxwscsX5WDvxvkN5LlBOVLEjOqezPSOvIilcueDoJhdssKo3KKOXFis YJD7FuNxev0uRPZj7dOOE4PzOf6gtWRzcllKcbrrEcKag7pXodZZ092l7AnNHn7BsiZG j5bMysj5YyQlHduib74e1LmrVnCioIvROfpjZRqb5iw+jaQBssqj5SOco1WTJdMFAfUK 64Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697665897; x=1698270697; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8/S8sSHxU6SsNqJ7pUVzXGT8Rv+p2JizeJrho9KZ9JM=; b=MJxeUc3t7+nKdYm/gsBlC0+56R+kBx3+00wUbb1WOLa8jCcXrjHJqh3POjoiksQNJL osKFVqtDyX7VUzX1M52EhAdG1MHV1itGKNa+1NxqOb/a76W8u1Qiw4xte1koAOBimjw5 Xj9tu4aF0/UqPrUSbDu5pIm8HBI7cojwiAKueb3y7lSboJlsHOQONPnpENhafNKKszfl IeY2vz8dy1M2kv0pioI3/NYBBsDj2o2IJLoxoWxyho21s7uMvGyvzvzdpuBgfb6V2Apl nl8jPoLXaUq8yGdlfXmjh3fm0KVio5uczZUg81duCjgtEvKIHoZKbZ33zuSFUxx4JaKW z4nQ== X-Gm-Message-State: AOJu0Yx7Sddaeb4aRHHMa9qi//h1JizxMDxI2C7Ss1sn4Wl4/rkvfKoo 6KrdN7ndyBOeW1MN/30d4NUjYlpdWKcOB1V3Lpg= X-Received: by 2002:a05:6a00:c91:b0:690:ce36:8b00 with SMTP id a17-20020a056a000c9100b00690ce368b00mr451446pfv.2.1697665896863; Wed, 18 Oct 2023 14:51:36 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id w17-20020a63f511000000b005b61a024ec7sm2176380pgh.74.2023.10.18.14.51.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 14:51:36 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH 00/61] target/hppa: Implement hppa64-cpu Date: Wed, 18 Oct 2023 14:50:34 -0700 Message-Id: <20231018215135.1561375-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x435.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This is the pa2.0 cpu that should populate Helge's C3700 workstation. I have adjusted both user and system binaries to always support the 64-bit cpu but default to the 32-bit cpu. I have not yet copied the linux kernel sigframe hackery to save the upper halves of the registers across signals. I couldn't get hppa-linux-gcc to produce 64-bit code with -march=2.0. I did some some manual testing with hppa64-linux-gnu, but that expects lp64 and a full 64-bit system library, so the tests has to be small and self-contained and also required some manual adjustment for the .got pointer references. But! With said adjustments we can run tests/tcg/multilib/sha512, which uses uint64_t a fair bit. Bugs were found and fixed. r~ Helge Deller (2): target/hppa: sar register allows only 5 bits on 32-bit CPU target/hppa: Fix interruption based on default PSW Richard Henderson (59): include/hw/elf: Remove truncating signed casts target/hppa: Remove get_temp target/hppa: Remove get_temp_tl target/hppa: Remove load_const target/hppa: Fix hppa64 case in machine.c target/hppa: Fix load in do_load_32 target/hppa: Truncate rotate count in trans_shrpw_sar target/hppa: Fix trans_ds for hppa64 target/hppa: Fix do_add, do_sub for hppa64 target/hppa: Fix bb_sar for hppa64 target/hppa: Fix extrw and depw with sar for hppa64 target/hppa: Introduce TYPE_HPPA64_CPU target/hppa: Make HPPA_BTLB_ENTRIES variable target/hppa: Implement cpu_list target/hppa: Implement hppa_cpu_class_by_name target/hppa: Update cpu_hppa_get/put_psw for hppa64 target/hppa: Handle absolute addresses for pa2.0 target/hppa: Adjust hppa_cpu_dump_state for hppa64 hw/hppa: Translate phys addresses for the cpu target/hppa: Fix hppa64 addressing target/hppa: Pass d to do_cond target/hppa: Pass d to do_sub_cond target/hppa: Pass d to do_log_cond target/hppa: Pass d to do_sed_cond target/hppa: Pass d to do_unit_cond linux-user/hppa: Fixes for TARGET_ABI32 target/hppa: Drop attempted gdbstub support for hppa64 target/hppa: Remove TARGET_HPPA64 target/hppa: Decode d for logical instructions target/hppa: Decode d for unit instructions target/hppa: Decode d for cmpclr instructions target/hppa: Decode d for add instructions target/hppa: Decode d for sub instructions target/hppa: Decode d for bb instructions target/hppa: Decode d for cmpb instructions target/hppa: Decode CMPIB double-word target/hppa: Decode ADDB double-word target/hppa: Implement LDD, LDCD, LDDA, STD, STDA target/hppa: Implement DEPD, DEPDI target/hppa: Implement EXTRD target/hppa: Implement SHRPD target/hppa: Implement CLRBTS, POPBTS, PUSHBTS, PUSHNOM target/hppa: Implement STDBY target/hppa: Implement IDTLBT, IITLBT target/hppa: Remove TARGET_REGISTER_BITS target/hppa: Remove most of the TARGET_REGISTER_BITS redirections target/hppa: Remove remaining TARGET_REGISTER_BITS redirections target/hppa: Use tcg_temp_new_i64 not tcg_temp_new target/hppa: Replace tcg_gen_*_tl with tcg_gen_*_i64 target/hppa: Implement HADD target/hppa: Implement HSUB target/hppa: Implement HAVG target/hppa: Implement HSHL, HSHR target/hppa: Implement HSHLADD, HSHRADD target/hppa: Implement MIXH, MIXW target/hppa: Implement PERMH target/hppa: Precompute zero into DisasContext target/hppa: Return zero for r0 from load_gpr target/hppa: Simplify trans_dep*_imm configs/targets/hppa-linux-user.mak | 1 + include/hw/elf_ops.h | 17 +- linux-user/hppa/target_elf.h | 2 +- target/hppa/cpu-param.h | 22 +- target/hppa/cpu-qom.h | 1 + target/hppa/cpu.h | 99 +- target/hppa/helper.h | 53 +- target/hppa/insns.decode | 169 ++- hw/hppa/machine.c | 93 +- linux-user/hppa/signal.c | 6 +- target/hppa/cpu.c | 52 +- target/hppa/gdbstub.c | 26 +- target/hppa/helper.c | 91 +- target/hppa/int_helper.c | 30 +- target/hppa/machine.c | 13 +- target/hppa/mem_helper.c | 141 +- target/hppa/op_helper.c | 310 +++- target/hppa/sys_helper.c | 13 +- target/hppa/translate.c | 2030 +++++++++++++++------------ 19 files changed, 1959 insertions(+), 1210 deletions(-)