From nobody Mon Nov 10 01:22:24 2025 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552481152895714.0376703055618; Wed, 13 Mar 2019 05:45:52 -0700 (PDT) Received: from localhost ([127.0.0.1]:43989 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h43GV-0004yO-O4 for importer@patchew.org; Wed, 13 Mar 2019 08:45:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h43Bx-0001MJ-FW for qemu-devel@nongnu.org; Wed, 13 Mar 2019 08:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h43Bu-0005LB-PI for qemu-devel@nongnu.org; Wed, 13 Mar 2019 08:41:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42626) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h43Bs-0005I1-Ad for qemu-devel@nongnu.org; Wed, 13 Mar 2019 08:41:00 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 86D7A30944E2; Wed, 13 Mar 2019 12:40:57 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-43.ams2.redhat.com [10.36.112.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id C3F5A1001E6F; Wed, 13 Mar 2019 12:40:55 +0000 (UTC) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 13 Mar 2019 13:40:39 +0100 Message-Id: <20190313124042.12855-5-pbonzini@redhat.com> In-Reply-To: <20190313124042.12855-1-pbonzini@redhat.com> References: <20190313124042.12855-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 13 Mar 2019 12:40:57 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 4/7] tcg: add tcg_out_start 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: fweimer@redhat.com, kwolf@redhat.com, richard.henderson@linaro.org, stefanha@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This function is called at the beginning of any translation block. We will use it to emit ENDBR32 or ENDBR64 annotations for x86 CET. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 4 ++++ tcg/arm/tcg-target.inc.c | 4 ++++ tcg/i386/tcg-target.inc.c | 4 ++++ tcg/mips/tcg-target.inc.c | 4 ++++ tcg/ppc/tcg-target.inc.c | 4 ++++ tcg/riscv/tcg-target.inc.c | 4 ++++ tcg/s390/tcg-target.inc.c | 4 ++++ tcg/sparc/tcg-target.inc.c | 4 ++++ tcg/tcg.c | 2 ++ tcg/tci/tcg-target.inc.c | 4 ++++ 10 files changed, 38 insertions(+) diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index d57f9e500f..885cb48988 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -2524,6 +2524,10 @@ QEMU_BUILD_BUG_ON(FRAME_SIZE >=3D (1 << 14)); /* We're expecting to use a single ADDI insn. */ QEMU_BUILD_BUG_ON(FRAME_SIZE - PUSH_SIZE > 0xfff); =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + static void tcg_target_qemu_prologue(TCGContext *s) { TCGReg r; diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index 2245a8aeb9..4b0df86074 100644 --- a/tcg/arm/tcg-target.inc.c +++ b/tcg/arm/tcg-target.inc.c @@ -2270,6 +2270,10 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int c= ount) } } =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + /* Compute frame size via macros, to share between tcg_target_qemu_prologue and tcg_register_jit. */ =20 diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index e0670e5098..781b1faec2 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -3497,6 +3497,10 @@ static const int tcg_target_callee_save_regs[] =3D { + TCG_TARGET_STACK_ALIGN - 1) \ & ~(TCG_TARGET_STACK_ALIGN - 1)) =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + /* Generate global QEMU prologue and epilogue code */ static void tcg_target_qemu_prologue(TCGContext *s) { diff --git a/tcg/mips/tcg-target.inc.c b/tcg/mips/tcg-target.inc.c index 8a92e916dd..b954166ad1 100644 --- a/tcg/mips/tcg-target.inc.c +++ b/tcg/mips/tcg-target.inc.c @@ -2469,6 +2469,10 @@ static tcg_insn_unit *align_code_ptr(TCGContext *s) return s->code_ptr; } =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + /* Stack frame parameters. */ #define REG_SIZE (TCG_TARGET_REG_BITS / 8) #define SAVE_SIZE ((int)ARRAY_SIZE(tcg_target_callee_save_regs) * REG_SIZ= E) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index 773690f1d9..92aae6e77d 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.inc.c @@ -1906,6 +1906,10 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int c= ount) } } =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + /* Parameters for function call generation, used in tcg.c. */ #define TCG_TARGET_STACK_ALIGN 16 #define TCG_TARGET_EXTEND_ARGS 1 diff --git a/tcg/riscv/tcg-target.inc.c b/tcg/riscv/tcg-target.inc.c index b785f4acb7..04a6aed27d 100644 --- a/tcg/riscv/tcg-target.inc.c +++ b/tcg/riscv/tcg-target.inc.c @@ -1790,6 +1790,10 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOp= code op) } } =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + static const int tcg_target_callee_save_regs[] =3D { TCG_REG_S0, /* used for the global env (TCG_AREG0) */ TCG_REG_S1, diff --git a/tcg/s390/tcg-target.inc.c b/tcg/s390/tcg-target.inc.c index 7db90b3bae..f867d77a36 100644 --- a/tcg/s390/tcg-target.inc.c +++ b/tcg/s390/tcg-target.inc.c @@ -2495,6 +2495,10 @@ static void query_s390_facilities(void) } } =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + static void tcg_target_init(TCGContext *s) { query_s390_facilities(); diff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.inc.c index 7a61839dc1..f795e78153 100644 --- a/tcg/sparc/tcg-target.inc.c +++ b/tcg/sparc/tcg-target.inc.c @@ -1004,6 +1004,10 @@ static void build_trampolines(TCGContext *s) } #endif =20 +static inline void tcg_out_start(TCGContext *s) +{ +} + /* Generate global QEMU prologue and epilogue code */ static void tcg_target_qemu_prologue(TCGContext *s) { diff --git a/tcg/tcg.c b/tcg/tcg.c index 9b2bf7f439..368a3ec5b3 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -100,6 +100,7 @@ static void tcg_register_jit_int(void *buf, size_t size, /* Forward declarations for functions declared and used in tcg-target.inc.= c. */ static const char *target_parse_constraint(TCGArgConstraint *ct, const char *ct_str, TCGType typ= e); +static void tcg_out_start(TCGContext *s); static void tcg_out_ld(TCGContext *s, TCGType type, TCGReg ret, TCGReg arg= 1, intptr_t arg2); static void tcg_out_mov(TCGContext *s, TCGType type, TCGReg ret, TCGReg ar= g); @@ -3926,6 +3927,7 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb) #endif =20 num_insns =3D -1; + tcg_out_start(s); QTAILQ_FOREACH(op, &s->ops, link) { TCGOpcode opc =3D op->opc; =20 diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c index 0015a98485..cb90012999 100644 --- a/tcg/tci/tcg-target.inc.c +++ b/tcg/tci/tcg-target.inc.c @@ -889,6 +889,10 @@ static void tcg_target_init(TCGContext *s) CPU_TEMP_BUF_NLONGS * sizeof(long)); } =20 +static inline void tcg_out_start(void) +{ +} + /* Generate global QEMU prologue and epilogue code. */ static inline void tcg_target_qemu_prologue(TCGContext *s) { --=20 2.20.1