From nobody Tue Feb 10 06:57:44 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.zohomail.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 150482509277473.3177883067874; Thu, 7 Sep 2017 15:58:12 -0700 (PDT) Received: from localhost ([::1]:42583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq5kR-0000Zs-Lm for importer@patchew.org; Thu, 07 Sep 2017 18:58:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dq5UE-0003F3-4r for qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dq5U9-0008ME-Fe for qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:26 -0400 Received: from mail-pg0-x22b.google.com ([2607:f8b0:400e:c05::22b]:37081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dq5U9-0008LZ-9X for qemu-devel@nongnu.org; Thu, 07 Sep 2017 18:41:21 -0400 Received: by mail-pg0-x22b.google.com with SMTP id d8so1804327pgt.4 for ; Thu, 07 Sep 2017 15:41:21 -0700 (PDT) Received: from bigtime.twiddle.net (97-126-108-236.tukw.qwest.net. [97.126.108.236]) by smtp.gmail.com with ESMTPSA id h19sm770678pfh.142.2017.09.07.15.41.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Sep 2017 15:41:19 -0700 (PDT) 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; bh=H7OIZz6ye65zyAW3I3NdIdDeG7/KcItlzmmSrm81ckA=; b=eVtRLIYzIkxxe18bIKbzDDOx0WkAT82Pfy8j8FceiJvoQwB2h+RK1tg3M9yzoZkti7 IoPQ8mPmWdX9Tzb/qVEd2xaRn17+oQwiKnMp2foSBgSC22SXOpHR3z+zNUPsaU+u4nMP Y6bXsLWkwzatTHIx/7j4H4EtyP/26yWywWH+Q= 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; bh=H7OIZz6ye65zyAW3I3NdIdDeG7/KcItlzmmSrm81ckA=; b=i0WYZ3f/TBvaUm56OoakEnqI2wfq2sKifRwkQM+2jVVNQJBEZ2v3qzOP4DM2oAV8EA qVxj2EUjqS/TX8ABz0FCo1RboPGhpUCR5qjK+OMR2sGvX8ovV/ia1V80oX8LiuybOgiK 7N90f+Lr9KmqrxGSWIz/LGqCoTToemaBSHZsxuH/bOoZQL9/zUrOpNvq5vq4gzNkbIYn faMYQMf0xgi7lQdQNO/OmKlTiGbNJw7rG5kfRBd3qyaRcAMfQYIveXibNobnsBwV135b FUHMTzRj2s1CNn2ddwRg3b7iwL4qT+Rxq+1TJ8NNjx68qfiP/TAXY33kGxETclgaKzyD 08qg== X-Gm-Message-State: AHPjjUibjk48dbgJsJV3NeBHyMJfxt57gjYO7QyqwOBOxEek4tRENktw DF8jS+fylCfBw6HA8+No1w== X-Google-Smtp-Source: ADKCNb7JS1VhXKBUsD4kUiWuHlcZTIKb7DTSkuw6p50sT30fHTAkb2yKA6ZlxHuheLYOxwMhmgjxww== X-Received: by 10.98.245.207 with SMTP id b76mr915846pfm.223.1504824080066; Thu, 07 Sep 2017 15:41:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 7 Sep 2017 15:40:46 -0700 Message-Id: <20170907224051.21518-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170907224051.21518-1-richard.henderson@linaro.org> References: <20170907224051.21518-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22b Subject: [Qemu-devel] [PULL 18/23] tcg/arm: Extract INSN_NOP 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: peter.maydell@linaro.org, Richard Henderson 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" From: Richard Henderson We'll want this for tcg_out_nop_fill. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index f40e87066f..78603a19db 100644 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/arm/tcg-target.inc.c @@ -160,8 +160,18 @@ typedef enum { =20 INSN_DMB_ISH =3D 0x5bf07ff5, INSN_DMB_MCR =3D 0xba0f07ee, + + /* Architected nop introduced in v6k. */ + /* ??? This is an MSR (imm) 0,0,0 insn. Anyone know if this + also Just So Happened to do nothing on pre-v6k so that we + don't need to conditionalize it? */ + INSN_NOP_v6k =3D 0xe320f000, + /* Otherwise the assembler uses mov r0,r0 */ + INSN_NOP_v4 =3D (COND_AL << 28) | ARITH_MOV, } ARMInsn; =20 +#define INSN_NOP (use_armv7_instructions ? INSN_NOP_v6k : INSN_NOP_v4) + static const uint8_t tcg_cond_to_arm_cond[] =3D { [TCG_COND_EQ] =3D COND_EQ, [TCG_COND_NE] =3D COND_NE, @@ -375,16 +385,7 @@ static inline void tcg_out_dat_reg(TCGContext *s, =20 static inline void tcg_out_nop(TCGContext *s) { - if (use_armv7_instructions) { - /* Architected nop introduced in v6k. */ - /* ??? This is an MSR (imm) 0,0,0 insn. Anyone know if this - also Just So Happened to do nothing on pre-v6k so that we - don't need to conditionalize it? */ - tcg_out32(s, 0xe320f000); - } else { - /* Prior to that the assembler uses mov r0, r0. */ - tcg_out_dat_reg(s, COND_AL, ARITH_MOV, 0, 0, 0, SHIFT_IMM_LSL(0)); - } + tcg_out32(s, INSN_NOP); } =20 static inline void tcg_out_mov_reg(TCGContext *s, int cond, int rd, int rm) --=20 2.13.5