From patchwork Sat Dec 24 23:57:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 636704 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp933182pvb; Sat, 24 Dec 2022 16:15:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXvkWV0DOD07z8/ERzGab8S7IaMzbNaAom6a6y2eK0fWA+wQZNk0NA3D0+wPaIBnb6Cg6CH1 X-Received: by 2002:a05:6214:4409:b0:4c7:bbf:ce89 with SMTP id oj9-20020a056214440900b004c70bbfce89mr19676250qvb.22.1671927335307; Sat, 24 Dec 2022 16:15:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671927335; cv=none; d=google.com; s=arc-20160816; b=giy6bBjuSMb0yHl4ZqRAVVDP9x+yOlQFP4wZSf9M1ue4z61Wk6x4Svt+cGE05v2S22 h8CvTuxTjQIko07oHjOCiaTCj746MObuknf/tloBWRgNJm8cU3BjnjJ31eAJT+/1givh 2ie8cAVzu28g1A3WGrFg1M+8LIaJ/1qx+fdqrangVT3wqYdohF5kwkyHpIlJwMByeANA KmdWWi3wOa59jsz/2mB7gFjglfCTOebuyk7tiKMobEka5IhXpU66y4rRyJsaCAY6RkvD feMhPRa9MRMhEZsocRGUiPT/FIVD2z9KgzDS8bb9zK9D1Vg/pqNd1c+2aQ3gq4poqmMi M4PQ== 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=WRnYCcPWX5BOQQf1a59sccPy8bi18QDF38eChoryi3g=; b=zqPtehX9ICGz91Eq6FBcpe9cxzetgmrGYip6L+Df6xEBgtx7hlPSl5HBqtiyCpKijw sMk9VK1eWzIFgn6+JV8b4TkkFCeZpQtfNexFpXgffrRtfjGdITFza15sZiZgR7OzgMsP CuPZwxRoRIALl6NUupdkDwec9OHwvYcoZX4cJQ9LvXz2buRFaIoEO+erXJ7HrAfkhdcK 2c+cA/MSi+V9LYoTREm9I2g8NOshEDEDmDY13uHKpoxUaL7gTkXPpJ0doIQCFirniCUE ORUmHaXfY+kNwhWd/eaFkcKL/QTTke27YI+/pdNU7VdE60az9/vO4jhpEQeiYNfXHyy5 40MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iqAkJokN; 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 q50-20020a05620a2a7200b006ff8c5e810fsi2630432qkp.428.2022.12.24.16.15.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Dec 2022 16:15:35 -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=iqAkJokN; 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 1p9EP2-0002qG-CS; Sat, 24 Dec 2022 18:58:08 -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 1p9EOq-0002RE-Lo for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:58 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9EOo-0006Mh-Qd for qemu-devel@nongnu.org; Sat, 24 Dec 2022 18:57:56 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d7so8024230pll.9 for ; Sat, 24 Dec 2022 15:57:54 -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=WRnYCcPWX5BOQQf1a59sccPy8bi18QDF38eChoryi3g=; b=iqAkJokNkpKws9Yhs9UsbE0fbi9WoVy21F1RhhehesbWsN8tVjrhVaihfSrupf6XtL SdHa/RVz5pIBaG6ulKOd2aq5MWJjN6RoUMDJnsTPPKuM23jW5NFgwkCA4VLg1fjW6B/u c7UFZaQEvLe2RapkDMxADjT54Z209IFZnN0tWr+VPp2JgsReI+Z++7I5VTCWc4AnifTj nioPXCT22smkAkDWJAGZw9uztr1Qx5DLNJ25B1qfiNb+BcR/FYtrkSAOq2uxn9aRX3fS KqkadXTxnG0P8hTk+HuNAShsSjwSk5wIgvWePXmKRypxtCoB2q9JbfH9AncnMHy3Fq5v necg== 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=WRnYCcPWX5BOQQf1a59sccPy8bi18QDF38eChoryi3g=; b=5dxtwDxQdSkshksicthHB+asl2lzRtXf86kXNwrVweZ0W7KWJdkSD29gPHYCqABJ8N qB7TjH54Kp3eIsBB70jA/CpuAjN5nOWSLuMqJdXgB40lFincEa1b9dhjsrSwdDluGROh NlvKkuWoC0Dp+MEZJxndZBd9GGR8/H/RBD4ow1ilqFQAJ/N684dvy4TiP10SltRs+FRY o51cNmfWqaLUO7ZSmco+wDIpmoZhQgofHUv94O/6NVFen/TinLhhQpuqDB1XhE55SBlU YmuEgsumULp/W/8qVgtWdBu0QR3aTwOZgDEB4olMD2wvsKxZctt3V6sVnIeYXcTqN/pr xQZQ== X-Gm-Message-State: AFqh2kpYuXZCfKRokRD58z8gjl0smEN5xBap6WXP/ZEWUdY80YOGTbr6 O05EomC/Mp1QjGJ1hcKP7GM7bjNrfSIM8Bfc X-Received: by 2002:a17:902:b613:b0:18f:98bb:c08e with SMTP id b19-20020a170902b61300b0018f98bbc08emr14213521pls.36.1671926273443; Sat, 24 Dec 2022 15:57:53 -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.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Dec 2022 15:57:52 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: alex.bennee@linaro.org, philmd@linaro.org Subject: [PATCH v5 33/43] accel/tcg/plugin: Avoid duplicate copy in copy_call Date: Sat, 24 Dec 2022 15:57:10 -0800 Message-Id: <20221224235720.842093-34-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::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.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 We copied all of the arguments in copy_op_nocheck. We only need to replace the one argument that we change. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/plugin-gen.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c index 9e359c006a..77e6823d6b 100644 --- a/accel/tcg/plugin-gen.c +++ b/accel/tcg/plugin-gen.c @@ -397,9 +397,7 @@ static TCGOp *copy_call(TCGOp **begin_op, TCGOp *op, void *empty_func, func_idx = TCGOP_CALLO(op) + TCGOP_CALLI(op); *cb_idx = func_idx; - op->args[func_idx] = (uintptr_t)func; - op->args[func_idx + 1] = old_op->args[func_idx + 1]; return op; }