From nobody Mon Feb 9 16:02:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1493295359438707.1835299343018; Thu, 27 Apr 2017 05:15:59 -0700 (PDT) Received: from localhost ([::1]:60376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3iKz-0000DS-PS for importer@patchew.org; Thu, 27 Apr 2017 08:15:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d3i6A-0004AW-9u for qemu-devel@nongnu.org; Thu, 27 Apr 2017 08:00:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d3i67-0001Z0-Fd for qemu-devel@nongnu.org; Thu, 27 Apr 2017 08:00:38 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:33431) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d3i67-0001Yr-9t for qemu-devel@nongnu.org; Thu, 27 Apr 2017 08:00:35 -0400 Received: by mail-wr0-x241.google.com with SMTP id w50so3540762wrc.0 for ; Thu, 27 Apr 2017 05:00:35 -0700 (PDT) Received: from bigtime.twiddle.net.com (251.red-80-29-7.adsl.static.ccgg.telefonica.net. [80.29.7.251]) by smtp.gmail.com with ESMTPSA id i199sm3056470wmf.33.2017.04.27.05.00.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 05:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=mcHYbekBog45VUoPtmzy8HfKy2CCLzb9V2qQHFRTxp8=; b=Bxa4EXIsPBjmBxwNB/IxnZL5QsR+vRTcXGeRD6/+NCORZGfUuNG8DmBM7A0LuLWPJf EjbrwsubvXFijrKdzeDy+/A+C5cug/fPuoiCSQMCIrkDVkshpXXbxZlUVc+joUjLWJL8 ZkpGDcclvAMqmL2sOm3r0NWV/aNaHMw82onudrLOmEc4/eTZsRQi5oIOzIC5P1ZGsc2b eaFbJFqyOOydCrkxqYYli/Ti23WIbBi/a9DqLVA/hq4HxqZVcTN269Fsya4PAl/PnZvi JiSlopFOHPTAMOiUv0XfXKT6tYCbhvYCc/x62HzdkEjDjbpQjkxeeTG73jKNyuFhS1Oe JSiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=mcHYbekBog45VUoPtmzy8HfKy2CCLzb9V2qQHFRTxp8=; b=ZE5l75dE3XpK9ziuaZq+D45UpDSnGf2BWI8cQq3kROTmdPjM9pX63YWb5cLLYGNlPB WADKu14aivtYZCkcRDqMy++XZd0Bharp80oFbvzYTpxjv9f4NtKC+89AxGimvTRxB6JK 1uZx3c+NgbTD5u+WQhJw2LBsN8L3vwxjis1I2lWOC9Vr+zKtKpmTHUDfhPXHorMz5z1o qkCk1nYjl3eYdF2Gkzh01K4CyGKUjYJXdYXFopJuPcR6SkZE2cMGksx3CMKxx6lHrMKB qlYd+W/clVZ5HxN4t1uJcb8G8IpJf5MbjpkHzGXPLqqffJDmMcGMTpeUg+gcePVqCVZW SohQ== X-Gm-Message-State: AN3rC/5zrSNvyr15MMwiHg4wffLcWiY7A5epiLapWo/G26SQDPEtWtov 1uYMOxhBf73Wjw== X-Received: by 10.223.170.195 with SMTP id i3mr3874966wrc.49.1493294434232; Thu, 27 Apr 2017 05:00:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 Apr 2017 14:00:05 +0200 Message-Id: <20170427120006.20564-19-rth@twiddle.net> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170427120006.20564-1-rth@twiddle.net> References: <20170427120006.20564-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PATCH v5 18/19] tcg/sparc: Implement goto_ptr X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: cota@braap.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.h | 2 +- tcg/sparc/tcg-target.inc.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h index 9348ddd..854a0af 100644 --- a/tcg/sparc/tcg-target.h +++ b/tcg/sparc/tcg-target.h @@ -123,7 +123,7 @@ extern bool use_vis3_instructions; #define TCG_TARGET_HAS_muls2_i32 1 #define TCG_TARGET_HAS_muluh_i32 0 #define TCG_TARGET_HAS_mulsh_i32 0 -#define TCG_TARGET_HAS_goto_ptr 0 +#define TCG_TARGET_HAS_goto_ptr 1 =20 #define TCG_TARGET_HAS_extrl_i64_i32 1 #define TCG_TARGET_HAS_extrh_i64_i32 1 diff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.inc.c index 3785d77..18afce2 100644 --- a/tcg/sparc/tcg-target.inc.c +++ b/tcg/sparc/tcg-target.inc.c @@ -1003,7 +1003,11 @@ static void tcg_target_qemu_prologue(TCGContext *s) /* delay slot */ tcg_out_nop(s); =20 - /* No epilogue required. We issue ret + restore directly in the TB. = */ + /* Epilogue for goto_ptr. */ + s->code_gen_epilogue =3D s->code_ptr; + tcg_out_arithi(s, TCG_REG_G0, TCG_REG_I7, 8, RETURN); + /* delay slot */ + tcg_out_movi_imm13(s, TCG_REG_O0, 0); =20 #ifdef CONFIG_SOFTMMU build_trampolines(s); @@ -1288,6 +1292,10 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, tcg_out_nop(s); s->tb_jmp_reset_offset[a0] =3D tcg_current_code_size(s); break; + case INDEX_op_goto_ptr: + tcg_out_arithi(s, TCG_REG_G0, a0, 0, JMPL); + tcg_out_nop(s); + break; case INDEX_op_br: tcg_out_bpcc(s, COND_A, BPCC_PT, arg_label(a0)); tcg_out_nop(s); @@ -1513,6 +1521,7 @@ static const TCGTargetOpDef sparc_op_defs[] =3D { { INDEX_op_exit_tb, { } }, { INDEX_op_goto_tb, { } }, { INDEX_op_br, { } }, + { INDEX_op_goto_ptr, { "r" } }, =20 { INDEX_op_ld8u_i32, { "r", "r" } }, { INDEX_op_ld8s_i32, { "r", "r" } }, --=20 2.9.3