From patchwork Fri Dec 30 00:01:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 637818 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp3177856pvb; Thu, 29 Dec 2022 16:04:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsZ3acTdRhUZLpTCUkk1rY7m72ex7cNIYdaE+hyYjGwvah+TIJDyKZroj2Mmm6woKtj3Vp9 X-Received: by 2002:a05:6214:8e3:b0:521:ae4d:ea6a with SMTP id dr3-20020a05621408e300b00521ae4dea6amr38975890qvb.20.1672358682083; Thu, 29 Dec 2022 16:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672358682; cv=none; d=google.com; s=arc-20160816; b=iVDIKy1IIxbspAq1nk1MTKXGAeI2a5VakQ2ElyZ6FoVojA7TwgDCez3R5R2xiy/ILc oMbbktDLVxFObunigiWJABpPqK+l/dua1TCpeG9oIpGTy3QXn50E3hvwlcSk/cteqs4D yrUbU+0y4hqPUcfmeVBWC4oANPwnqQFC8k2EHoYGE9aU+R9aJ476jH0idF3pwbbDcwa7 FK2ko+hCV7gdroYe8jILN/OcELlOmQL84lhynmwa0+wAKvEKscXzQDYI/cCOPRl1A7vL 6XIYuqbVtlk3HG5G90z6QMnkCEvI1+68W//Gm7xMDR+SNNHDNtB4S/6qNKOl7P38RbTv 2uPg== 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=c/h+CZ1u1u143Bw0/Z/DE3c3OyH/4blYHrBoByb7anTRG48dbxO/fiXptKBuXJnMTM P2S6486ydorn3QPox0ZIfPPHZ7I/8YcXK2rk3OmStnMNx2cle5bq+LhgvDejDqjnOvAK CYcHwn3QL69tUnu8I3++pp3r65yJ5g4ArQSbOAglLj8WdF6TMdCs7JlooKpBPz782JPC FO1ax3rQT3BntXOGikpoo181MWUs7qpzsL2HOex4TtTTuo+l/3WYWI5ZvDEKNqKJwvi7 iCghqGBJHm9UFtDX+RRPqg2afYp2bZqKmx4PJi4wS6XIkEyhsC0kYX0jWXr8mpbO+G42 OOlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xdE1yUOX; 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 2-20020a05621420a200b004afb62a7941si8944874qvd.262.2022.12.29.16.04.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 29 Dec 2022 16:04:42 -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=xdE1yUOX; 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 1pB2rB-00032B-1y; Thu, 29 Dec 2022 19:02:41 -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 1pB2r8-000317-Ar for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:02:38 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pB2r6-0002hC-JT for qemu-devel@nongnu.org; Thu, 29 Dec 2022 19:02:38 -0500 Received: by mail-pl1-x62d.google.com with SMTP id m4so20370874pls.4 for ; Thu, 29 Dec 2022 16:02: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=xdE1yUOXFiKW5kpfFqQqgypJYicUEhTmb0vH18lmIH1o6wFYZZjLR93KLydG7rta44 BW7r6HooNlIV6IraZh6VB+NZ+O7YKeE9rt68rHqek8LSFF5is9lsVUZu1REVnK5vSOx0 K1QC10puMCt5LbcrK8zPQucn7VmZvRr4xOUCsb6IsLZGNswakM214LCBiaRZKQ3iAICH aJpPM29GNGdKMkJv9gabDnXBJhRxek7dZ9FyXkQ0tAeL/r+NMJ0hqT02oa0sDKFLYe7i WETbHMKXtP/5aYFkOywLBcIym59Bj3PCsY0eBHnelQKv8XE1ovv6JUppyTRuo6meWzGD 7Vyw== 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=8JOoCv+cH8VP6N+ZYGKuThzx8dQnVyh/ynPNqE9cwIF2qqTDq8ratMbBo1+H3ulssr 392wXiFPV3Ip/FiQKq4pLW66rn2LGGXHZXClNO5Vs3VG0WyOshGwjGXEGHIqBLHjzdvp lDtx1qCi2SX6IbBhyly8Sp8RGrgR1BTSGrIAnSWjbpTiqs9B2plt4dADKDZdWNtzyolF Unl2aZ/Q+TrvL3G2T4m6rJSwIpbQsKmz0ctk3o1y08pGwNDsJlCM2gBh8XrhF9vcXgmd bEjS/jCAOLNl+SZ1vWYB3LPsu7tUdtRsureeMIMhwHCZWk3VXBeV4C3pCA5p1N96T1EC BELw== X-Gm-Message-State: AFqh2kpYCeZsftcBAE1F79UT2gSkP6FL9bzEAevzIU/xnHij7GgWKRnu i6WDGw78bnOx5g03fjpBvkqXaY8eUfSkRzWM X-Received: by 2002:a17:903:28e:b0:192:a470:c6d with SMTP id j14-20020a170903028e00b00192a4700c6dmr3191440plr.41.1672358555180; Thu, 29 Dec 2022 16:02:35 -0800 (PST) Received: from stoup.. (76-14-210-194.or.wavecable.com. [76.14.210.194]) by smtp.gmail.com with ESMTPSA id j14-20020a170903028e00b00192849e1d0asm7343953plr.116.2022.12.29.16.02.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Dec 2022 16:02:34 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 13/47] tcg: Remove TCG_TARGET_STACK_GROWSUP Date: Thu, 29 Dec 2022 16:01:47 -0800 Message-Id: <20221230000221.2764875-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221230000221.2764875-1-richard.henderson@linaro.org> References: <20221230000221.2764875-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62d.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 */