From patchwork Sat Dec 24 23:56:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 636676 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp930517pvb; Sat, 24 Dec 2022 16:04:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXvkKWgtB+QXbFzfb005i5lF7/N4PqPRgUf3tUcTKTEEEuZt9OejkFl3DFhGVjmO3K97AErU X-Received: by 2002:a05:622a:5814:b0:3a5:af69:408a with SMTP id fg20-20020a05622a581400b003a5af69408amr22645294qtb.67.1671926680802; Sat, 24 Dec 2022 16:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671926680; cv=none; d=google.com; s=arc-20160816; b=l56u0zgyH7jquHf0URNXenUAF4LMaEw/SpF7GmQqKeZKTROJeFZ/FhPsUnqmdjUh3G bZ8cLPZnewkFcAFHay7ii8yCoZh3L+EY6gcVhJKiTfbR50psaekeEH22ncXPZkadkYng 4TGJYsFCqpiAArkZJMKKYXqasXj/LQcflGm3zuTuunyAgBVQc2t7+0DIZRrXSsD3fj61 dYlcZwhw7ETMbcpuQ40lVDjCfSQoiNFLSc4R3qcn1f6yS53xgyx9MczbKk6CBVQLLyLU ry9PhaRfLRvaUcXVPqiCyrXiQP/IeYOfBVbwi2/p7EK/CnD1mXMYCGFYC2qUSKNXgZsm wyAA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ICnDE5CkA2lmO28avcdDx7Ov//rZAy7zNfU1ruYzqlU=; b=gNLGzWzCG3uXkkwRJw7oaRWCNgwW0yQoF7CnGnuA19BumUUQvrblQ3Gzm0L63z6SQq v+YdfGVvp1I27SzueXUeJQj7+hPRoi6D7e13mTpzlTAiJQ5W6+x6A3PVuwiGXvuPf4ye LFzAESVz4GLL4qDT4EO24UPY/ieU058JH5HXIa6jtOuMhmZ8dFfaAD/bORkF3V+ZN9S0 vpP7xqngCFuHglQOoDIuGktrb+AEQI8qspg8Coo1LMyB8UBmTYrZyOy7ZejZC0pLKikD CcUByqo/bpiQXSi8hH/gaHY95IV5oSLFhnLSV27YyRrMlkkwffLZNM6EU9M69R7yjgSs kWLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cwggcCW4; 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 ay27-20020a05622a229b00b003a5ab65df2fsi2674064qtb.6.2022.12.24.16.04.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Dec 2022 16:04:40 -0800 (PST) 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=cwggcCW4; 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 1p9EOc-0002MZ-8P; Sat, 24 Dec 2022 18:57:42 -0500 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 1p9EOY-0002KZ-AO for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:38 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9EOW-0006Ix-J1 for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:38 -0500 Received: by mail-pj1-x1032.google.com with SMTP id p4so7977136pjk.2 for ; Sat, 24 Dec 2022 15:57:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; 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=ICnDE5CkA2lmO28avcdDx7Ov//rZAy7zNfU1ruYzqlU=; b=cwggcCW4rnW3gXkxWMiPlWRWSUaEyNPWZorPNGibfV1/SDBkJCMWHe/WbMk7ee+HY7 6m8oIoV5DdEmRwtOjFsS7qvhCXdrCSAYYp90qsrZn8e2aReOeny1RPTH0ItgKXK3S5X1 jmtHLNYkNMT9CmU9ZfkD5h9iiYgRSUmPH4qRZDIUxix0bbNgPrSQWoU5WyMDfd9Fgu4o cx2dvzmzgSiFo7LjG/bT1+KhQw3WfRd9kTybjtkYOvcd4wvyFRPVuE/JL6iOQ5CJ2RVf Z9Q7G0zOlATtHT9ofTHVkgGyfc7qSNP4wy0w5amCXSPEJehVzDmtPDAx9q8iOZ6BtLDH F1TQ== 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=ICnDE5CkA2lmO28avcdDx7Ov//rZAy7zNfU1ruYzqlU=; b=ZIsQa68FQGOzYeeqp1Qp+dn8VqU71GdFj6Y+/j6Ypt+tzwFPs94Fj/Ed7/TtWLe10O B1ZkOHl2ms+qCr8Zqx5TU+geZ4V7pR124BDrqHZE6ph3q31XV1CGxvGHWY/siZiflc05 PmuWRJfEqKKJFHsrsIJvaW6NWXq4ZSkXDXwbzNsoz/aSosm2DxjVAWx7OOsfRtfYBQpH AG2C7l4bMHpNCkcEd6yn/Rx4I9Q6fz8Z/iEFQUkYWsf/ra8jHn5gSv5Ggo23YhoYkcM+ UaPNmkrdk6RyeZ2d4J1uMP3ugIg8T7sc7VQeWNso6nrx5jXZaARhjXFFJDgS42yyl1X8 bs8A== X-Gm-Message-State: AFqh2kp8cHaY0C/Y8p/rypCrMKVEfC7r824GXHkk2FSUY+hgh0G1uP5F L+tLm/OdOnv0rSsSSC6gMwyeEGKw3j3/Pnxr X-Received: by 2002:a17:902:6b89:b0:189:cf92:6f5c with SMTP id p9-20020a1709026b8900b00189cf926f5cmr16456920plk.52.1671926255189; Sat, 24 Dec 2022 15:57:35 -0800 (PST) Received: from stoup.. (76-14-210-194.or.wavecable.com. [76.14.210.194]) by smtp.gmail.com with ESMTPSA id cp12-20020a170902e78c00b00187022627d7sm4599716plb.36.2022.12.24.15.57.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Dec 2022 15:57:34 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, philmd@linaro.org Subject: [PATCH v5 13/43] tcg: Remove TCG_TARGET_STACK_GROWSUP Date: Sat, 24 Dec 2022 15:56:50 -0800 Message-Id: <20221224235720.842093-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221224235720.842093-1-richard.henderson@linaro.org> References: <20221224235720.842093-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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 The hppa host code has been removed since 2013; this should have been deleted at the same time. Fixes: 802b5081233a ("tcg-hppa: Remove tcg backend") Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 1 - tcg/arm/tcg-target.h | 1 - tcg/tcg.c | 32 ++------------------------------ 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index 485f685bd2..e145d50fef 100644 --- a/tcg/aarch64/tcg-target.h +++ b/tcg/aarch64/tcg-target.h @@ -16,7 +16,6 @@ #define TCG_TARGET_INSN_UNIT_SIZE 4 #define TCG_TARGET_TLB_DISPLACEMENT_BITS 24 #define MAX_CODE_GEN_BUFFER_SIZE (2 * GiB) -#undef TCG_TARGET_STACK_GROWSUP typedef enum { TCG_REG_X0, TCG_REG_X1, TCG_REG_X2, TCG_REG_X3, diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index 7e96495392..56c1ac4586 100644 --- a/tcg/arm/tcg-target.h +++ b/tcg/arm/tcg-target.h @@ -30,7 +30,6 @@ extern int arm_arch; #define use_armv7_instructions (__ARM_ARCH >= 7 || arm_arch >= 7) -#undef TCG_TARGET_STACK_GROWSUP #define TCG_TARGET_INSN_UNIT_SIZE 4 #define TCG_TARGET_TLB_DISPLACEMENT_BITS 16 #define MAX_CODE_GEN_BUFFER_SIZE UINT32_MAX diff --git a/tcg/tcg.c b/tcg/tcg.c index 215ddf2db5..05d2b70ab7 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -1552,25 +1552,8 @@ void tcg_gen_callN(void *func, TCGTemp *ret, int nargs, TCGTemp **args) } if (TCG_TARGET_REG_BITS < 64 && is_64bit) { - /* - * If stack grows up, then we will be placing successive - * arguments at lower addresses, which means we need to - * reverse the order compared to how we would normally - * treat either big or little-endian. For those arguments - * that will wind up in registers, this still works for - * HPPA (the only current STACK_GROWSUP target) since the - * argument registers are *also* allocated in decreasing - * order. If another such target is added, this logic may - * have to get more complicated to differentiate between - * stack arguments and register arguments. - */ -#if HOST_BIG_ENDIAN != defined(TCG_TARGET_STACK_GROWSUP) - op->args[pi++] = temp_arg(args[i] + 1); - op->args[pi++] = temp_arg(args[i]); -#else - op->args[pi++] = temp_arg(args[i]); - op->args[pi++] = temp_arg(args[i] + 1); -#endif + op->args[pi++] = temp_arg(args[i] + HOST_BIG_ENDIAN); + op->args[pi++] = temp_arg(args[i] + !HOST_BIG_ENDIAN); real_args += 2; continue; } @@ -3854,12 +3837,6 @@ static bool tcg_reg_alloc_dup2(TCGContext *s, const TCGOp *op) return true; } -#ifdef TCG_TARGET_STACK_GROWSUP -#define STACK_DIR(x) (-(x)) -#else -#define STACK_DIR(x) (x) -#endif - static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op) { const int nb_oargs = TCGOP_CALLO(op); @@ -3899,18 +3876,13 @@ static void tcg_reg_alloc_call(TCGContext *s, TCGOp *op) stack_offset = TCG_TARGET_CALL_STACK_OFFSET; for (i = nb_regs; i < nb_iargs; i++) { arg = op->args[nb_oargs + i]; -#ifdef TCG_TARGET_STACK_GROWSUP - stack_offset -= sizeof(tcg_target_long); -#endif if (arg != TCG_CALL_DUMMY_ARG) { ts = arg_temp(arg); temp_load(s, ts, tcg_target_available_regs[ts->type], s->reserved_regs, 0); tcg_out_st(s, ts->type, ts->reg, TCG_REG_CALL_STACK, stack_offset); } -#ifndef TCG_TARGET_STACK_GROWSUP stack_offset += sizeof(tcg_target_long); -#endif } /* assign input registers */