From patchwork Sat May 12 17:57:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 912428 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="JRJKHF3s"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40jvpF4YwXz9s2S for ; Sun, 13 May 2018 03:58:29 +1000 (AEST) Received: from localhost ([::1]:60433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHYmo-00067T-TK for incoming@patchwork.ozlabs.org; Sat, 12 May 2018 13:58:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fHYly-0005wv-30 for qemu-devel@nongnu.org; Sat, 12 May 2018 13:57:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fHYlu-0002tL-8f for qemu-devel@nongnu.org; Sat, 12 May 2018 13:57:34 -0400 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:44063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fHYlu-0002t0-3R for qemu-devel@nongnu.org; Sat, 12 May 2018 13:57:30 -0400 Received: by mail-pl0-x241.google.com with SMTP id e6-v6so5031723plt.11 for ; Sat, 12 May 2018 10:57:29 -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=uzTRu1cJli0cUNrCwQfSv1pusDe6ToUhXEDAbL1UNTY=; b=JRJKHF3sjjVxz04+kQvCMYmUkBLh8CNKBfI7/VR9ufbHDW3dFBUNjkc0qgWlFjgYag LPVI5csf7uM6N4hgAWsJnit4417O3SIBwDyhhaTpO5n9m4JNyL5fcm8BQIBudaGey+kr REZ6yiJvrEEPVxb3Dnbsih78vo7WJF2yWn+hc= 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=uzTRu1cJli0cUNrCwQfSv1pusDe6ToUhXEDAbL1UNTY=; b=tuYDuBVgZGWbUkGb7WWudJBcS07ws2ZyaIkyFpA1KIHDuC7lIubGwCB+KW3k5yXPQ7 Rhwh8NLxCn5pfIZbFPh+bHR3nVnV5QmQ01nCZbREEHJjGy+CiEHV7AL4cguagvmvPkbC h4xxI+z0j+jFmObbkNfuE2cZcS+SlJ1cRY2uVktYhKuJLh8vjM2JCZTXjzla6hR3Er40 pKmguCBN4Ni4hrjwNfbVAPEc1NMbBVwYgZCVyDAOJ69bc7c2POm5iC2oEXbY0X/Hj9Ea pvWce8gDJVFjyJCOX8UKiR9qftl0jqFrnYurGUpIft/0sEQV25d7Q4AdUun/jCJFqqIV Tsxg== X-Gm-Message-State: ALKqPwdyyfYaQO6P1+VyiflFFR8EVpcZ9cLKRdYFaASTyhS83zUKxvRQ tT0UPlzikWCng9NwUrGQ+exzgxGNzss= X-Google-Smtp-Source: AB8JxZp2wtd7ltTE8lUBEvxzXc0kyYnG+Q06luXPwnQhjsRP8DOjJrtJ5EvymD5wRH4OIpjmQIyEBg== X-Received: by 2002:a17:902:8f97:: with SMTP id z23-v6mr3312217plo.329.1526147848545; Sat, 12 May 2018 10:57:28 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id t1-v6sm8695688pgu.41.2018.05.12.10.57.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 12 May 2018 10:57:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 12 May 2018 10:57:21 -0700 Message-Id: <20180512175724.5923-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512175724.5923-1-richard.henderson@linaro.org> References: <20180512175724.5923-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:c01::241 Subject: [Qemu-devel] [PATCH 1/4] target/xtensa: Replace DISAS_UPDATE with DISAS_NORETURN 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: jcmvbkbc@gmail.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The usage of DISAS_UPDATE is after noreturn helpers. It is thus indistinguishable from DISAS_NORETURN. Signed-off-by: Richard Henderson --- target/xtensa/translate.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index aad496347d..a1e63f9661 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -47,9 +47,6 @@ #include "exec/log.h" -/* is_jmp field values */ -#define DISAS_UPDATE DISAS_TARGET_0 /* cpu state was modified dynamically */ - struct DisasContext { const XtensaConfig *config; TranslationBlock *tb; @@ -317,7 +314,7 @@ static void gen_exception_cause(DisasContext *dc, uint32_t cause) tcg_temp_free(tcause); if (cause == ILLEGAL_INSTRUCTION_CAUSE || cause == SYSCALL_CAUSE) { - dc->is_jmp = DISAS_UPDATE; + dc->is_jmp = DISAS_NORETURN; } } @@ -339,7 +336,7 @@ static void gen_debug_exception(DisasContext *dc, uint32_t cause) tcg_temp_free(tpc); tcg_temp_free(tcause); if (cause & (DEBUGCAUSE_IB | DEBUGCAUSE_BI | DEBUGCAUSE_BN)) { - dc->is_jmp = DISAS_UPDATE; + dc->is_jmp = DISAS_NORETURN; } } @@ -351,7 +348,7 @@ static bool gen_check_privilege(DisasContext *dc) } #endif gen_exception_cause(dc, PRIVILEGED_CAUSE); - dc->is_jmp = DISAS_UPDATE; + dc->is_jmp = DISAS_NORETURN; return false; } @@ -360,7 +357,7 @@ static bool gen_check_cpenable(DisasContext *dc, unsigned cp) if (option_enabled(dc, XTENSA_OPTION_COPROCESSOR) && !(dc->cpenable & (1 << cp))) { gen_exception_cause(dc, COPROCESSOR0_DISABLED + cp); - dc->is_jmp = DISAS_UPDATE; + dc->is_jmp = DISAS_NORETURN; return false; } return true; @@ -382,7 +379,7 @@ static void gen_jump_slot(DisasContext *dc, TCGv dest, int slot) tcg_gen_exit_tb(0); } } - dc->is_jmp = DISAS_UPDATE; + dc->is_jmp = DISAS_NORETURN; } static void gen_jump(DisasContext *dc, TCGv dest) @@ -918,7 +915,7 @@ static bool gen_window_check1(DisasContext *dc, unsigned r1) TCGv_i32 w = tcg_const_i32(r1 / 4); gen_helper_window_check(cpu_env, pc, w); - dc->is_jmp = DISAS_UPDATE; + dc->is_jmp = DISAS_NORETURN; return false; } return true; @@ -1103,14 +1100,14 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) tcg_gen_insn_start(dc.pc); ++insn_count; gen_exception(&dc, EXCP_YIELD); - dc.is_jmp = DISAS_UPDATE; + dc.is_jmp = DISAS_NORETURN; goto done; } if (tb->flags & XTENSA_TBFLAG_EXCEPTION) { tcg_gen_insn_start(dc.pc); ++insn_count; gen_exception(&dc, EXCP_DEBUG); - dc.is_jmp = DISAS_UPDATE; + dc.is_jmp = DISAS_NORETURN; goto done; } @@ -1121,7 +1118,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) if (unlikely(cpu_breakpoint_test(cs, dc.pc, BP_ANY))) { tcg_gen_movi_i32(cpu_pc, dc.pc); gen_exception(&dc, EXCP_DEBUG); - dc.is_jmp = DISAS_UPDATE; + dc.is_jmp = DISAS_NORETURN; /* The address covered by the breakpoint must be included in [tb->pc, tb->pc + tb->size) in order to for it to be properly cleared -- thus we increment the PC here so that