From patchwork Thu Mar 11 14:39:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 397512 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp387311jai; Thu, 11 Mar 2021 07:01:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJycautkAA0jC843RocX0DlSFR+hsIsdCYl7chD2Uf9eo/9910iQt7PUxKWssjnXKaJnHhQl X-Received: by 2002:a2e:b175:: with SMTP id a21mr5234270ljm.5.1615474880953; Thu, 11 Mar 2021 07:01:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615474880; cv=none; d=google.com; s=arc-20160816; b=e3GO1d60JdzKlvnsbX9iUsvvrsW2SJjNnECMZtKIHpuFEgjhKB5YEMvoPhE4srPXiZ ajibumOIEz6CZg9hO/BRBAHF5bNbU3hATTvcs4UO7jYo5jNyrvBDBhIOy2p+y0hxRhsV /7Es1FrEV+YShd4OppCPk3qVCRDlXrcTOfwX2IouBvf0471MYOADhbnSRfk+Zux6s3Kz +r5fbwnUS04B82a4azhqFYYp5sZNg4QMgwSfha0W6Z0O8bIKKvG71HfcJWiL37O4Qz4w B2MizvSjWZkAIpfP4ssV+uWnQlVBYOc0Gx0fwq+VjHauXHDBGt1CqTFGmf1kISHenu08 +Tpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=06Y+cyMxl+dC1AQMaIsueXy7S/PiohsOvXqBqGkx3uw=; b=BJ8MXJB875KdoaOOo+k8PI0qvbnB8Wo5IuRqaVCv4QMUUpVdQUlpYJPxEJ9N2srGFo EbQ+/k8zED8ZOvMuNPqaGosUCP3xtEZzl+Sd+0ojHv4kllfKpdvCIPKixeskNbfXGpqO 0QjH8bg2ldAaf58665hn7CS1ELrBdmwS1F5hrlOWi7qrheDYWZmfnmFO5gha+47K9TOj KOLqddTmMNQPeyiVsQ0OYXW2Kx8TfA6MF6WuRs1jx4sctPTqSmrl1kV3bvtjvPGCJD/k xGbiE7+m47Ao+BPPY4P7nsULRZMGqhPY7SAiQQ/gBCPJ9A39ZjlGAGXVsjqtwX6CRNRX Rt2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QKPRXBQg; 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=fail (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 c9si2891042lji.8.2021.03.11.07.01.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Mar 2021 07:01:20 -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=fail header.i=@linaro.org header.s=google header.b=QKPRXBQg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55360 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKMoR-000055-Ph for patch@linaro.org; Thu, 11 Mar 2021 10:01:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKMUm-0003oP-6J for qemu-devel@nongnu.org; Thu, 11 Mar 2021 09:41:01 -0500 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]:34280) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKMUU-0006cT-6u for qemu-devel@nongnu.org; Thu, 11 Mar 2021 09:40:53 -0500 Received: by mail-qk1-x733.google.com with SMTP id t4so20834758qkp.1 for ; Thu, 11 Mar 2021 06:40:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=06Y+cyMxl+dC1AQMaIsueXy7S/PiohsOvXqBqGkx3uw=; b=QKPRXBQgU3YRAKcDAThexKRUDReRIr0vYpQYxTsRN2b898Ovzc5r/isDOGdr1o6uRE /EZ4/3f+w1JzdqwxbXKebch8PT0JSRgiRq1ddG0MZp0vRsw8wNcRaHEPZxdjxrPf4oZo CXfhT1sEu1WI8kV7Ptzkov2HS1go4do7j83WAYk5pMtcaNJqZ2qCjUjmu2E+gSjaZ5dV DuS/RlmsayDLTPuMYVK2njPdVY9NGYWbPZyn2ERv9KkoPHtggC7FwZryW2UhsMXw5RgV 2KLf8T8HGe2260S1Y6J+LqXWjch995A1JIxUljtF37ttLuqZfqPfHUHjiEH3ooorkCoG cj+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=06Y+cyMxl+dC1AQMaIsueXy7S/PiohsOvXqBqGkx3uw=; b=dnT3AE59FL24E/tRjKYLBXMzaNufJ6prsCoRXjIkscqpLQZyydn1e5Iyq4Eyv6mubC FkCINIi+OqL4id7GNtsu4w2Hdh4Y9uu0tfMELK0/+GHnRBOS1g4X1bP2JtnZBoojvaQA ocpQOjkxB8To+GeaLhhQ5Pyix2klvpcK2idx4SapXkHSkWGQ+TWVNxXO7mS7LfTMYzYU xYJr/kFF2UtAB5dbPbtXvBCpjSy+oYLXwxwDWQGHaQ/SdTOYirZtoL00gYFGQUp8x8ur rugfZLMzoo3mv/CNPAy7vfvTe54Byrv94R31j8niCfJ36Ki4+TMkEdQzc1aBFo+j6YDL CXYg== X-Gm-Message-State: AOAM533bzrPwmN6EfbNVMglt28LuCs7YAVXKNsmwy9Q0Hmjb2VyELx2q grIf7a7K0zRGl6s3hLFt8XXM+ZrwC8IvDLzn X-Received: by 2002:a37:46c5:: with SMTP id t188mr8040014qka.47.1615473641303; Thu, 11 Mar 2021 06:40:41 -0800 (PST) Received: from localhost.localdomain (fixed-187-189-51-144.totalplay.net. [187.189.51.144]) by smtp.gmail.com with ESMTPSA id d84sm2070324qke.53.2021.03.11.06.40.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Mar 2021 06:40:41 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v5 29/57] tcg/tci: Split out tcg_out_op_p Date: Thu, 11 Mar 2021 08:39:30 -0600 Message-Id: <20210311143958.562625-30-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210311143958.562625-1-richard.henderson@linaro.org> References: <20210311143958.562625-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x733.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=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sw@weilnetz.de, alex.bennee@linaro.org, f4bug@amsat.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- tcg/tci/tcg-target.c.inc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/tcg/tci/tcg-target.c.inc b/tcg/tci/tcg-target.c.inc index 1e3f2c4049..cb0cbbb8da 100644 --- a/tcg/tci/tcg-target.c.inc +++ b/tcg/tci/tcg-target.c.inc @@ -293,6 +293,16 @@ static void tcg_out_op_l(TCGContext *s, TCGOpcode op, TCGLabel *l0) old_code_ptr[1] = s->code_ptr - old_code_ptr; } +static void tcg_out_op_p(TCGContext *s, TCGOpcode op, void *p0) +{ + uint8_t *old_code_ptr = s->code_ptr; + + tcg_out_op_t(s, op); + tcg_out_i(s, (uintptr_t)p0); + + old_code_ptr[1] = s->code_ptr - old_code_ptr; +} + static void tcg_out_op_rrs(TCGContext *s, TCGOpcode op, TCGReg r0, TCGReg r1, intptr_t i2) { @@ -403,17 +413,13 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, switch (opc) { case INDEX_op_exit_tb: - tcg_out_op_t(s, opc); - tcg_out_i(s, args[0]); - old_code_ptr[1] = s->code_ptr - old_code_ptr; + tcg_out_op_p(s, opc, (void *)args[0]); break; case INDEX_op_goto_tb: tcg_debug_assert(s->tb_jmp_insn_offset == 0); /* indirect jump method. */ - tcg_out_op_t(s, opc); - tcg_out_i(s, (uintptr_t)(s->tb_jmp_target_addr + args[0])); - old_code_ptr[1] = s->code_ptr - old_code_ptr; + tcg_out_op_p(s, opc, s->tb_jmp_target_addr + args[0]); set_jmp_reset_offset(s, args[0]); break;