From patchwork Fri Aug 28 14:18:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 248536 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp1133195ilg; Fri, 28 Aug 2020 07:32:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvgQdiSA3PBtsH/ht1X6aw1pw/SobEre9Nasy4ueJxZyUYDoHo/N53EhFwaYkBdsXzQpvE X-Received: by 2002:a25:5384:: with SMTP id h126mr2993608ybb.374.1598625157941; Fri, 28 Aug 2020 07:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598625157; cv=none; d=google.com; s=arc-20160816; b=wliqwoYFWFEhf53Pr8eY9GfpaInGP/uhgPAS9CnmE+oatxBO2kpNT0Rcw95nMYMJ8v qja+xUfd0ysfC0j8QcAJStxbYdPBAu4d2mMoDMAcxS/HDRoVW6gxsa4+NAK0szlBVuqH 4G+8Sj5TD1MCZK2DdFJHee+crT9KDzrp5k1aYDxiPOEBm+ixHRGEo9+KkytBwxNnY/4f Vk70D6CphVww7XbuUxLCWo1JwlnDbIQAG5b34rhLsdvi/V4xVK6ZtiOipzmJNK+WBVgC C+ztXhuAG7CQD/eXnkWBQNstu+UfYg7vrekSCTVwqCzhc5Xfog0lZJ2Z5HKNANApS0di VXTw== 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=vRHfeWYe4t2JOdjOnGDnZu1tFFPEQawCvJ5AdLU8/XA=; b=TC8xGxsZLhHhWf34Tm8j9K6BB/2JUnyKezXLGnrwdJERBZg4jnAS+OOSJBxLYGbHZW kX6FUbRikGwcO1aYQneXwd3hQt4vGoTnOaePZZJ3N9Rr4tzpgFrqQ0K9Ri7r8iSeEMk8 mihJSnfZRdt6wu6FojoiK1u5szalI4g//QliTeR3GzL8bHB4PbPX0raPoVcgUb/sQrWp hAUAX8DzGN7QacQx02HNYrw0vwZkQv3PLGtJdaDmTtQ2mKCDtOFABXfnd3pcDPXy83/k zCov/mqH22zO7bLd66KLF5UZNKOgDYXs0gt4AiId0XFHRb0JsBnoICilZ4B5i06DPecc crtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rtuKips1; 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=pass (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 o7si993795ybg.411.2020.08.28.07.32.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Aug 2020 07:32:37 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=rtuKips1; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBfQj-0006nN-CS for patch@linaro.org; Fri, 28 Aug 2020 10:32:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBfEg-0000iC-Vm for qemu-devel@nongnu.org; Fri, 28 Aug 2020 10:20:10 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:40439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBfEe-00057Z-8Z for qemu-devel@nongnu.org; Fri, 28 Aug 2020 10:20:10 -0400 Received: by mail-pf1-x443.google.com with SMTP id c142so665981pfb.7 for ; Fri, 28 Aug 2020 07:20:07 -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 :mime-version:content-transfer-encoding; bh=vRHfeWYe4t2JOdjOnGDnZu1tFFPEQawCvJ5AdLU8/XA=; b=rtuKips1AicN7F+yu6Abird5Dw9NJ+XNSA6KmwmrE+vIxCpsLTksrjjv9CimaqhzeY pvMxWeA1jpIFogWa+/6sRqLmtuG1lFYXKfEOP7WxpZALHz1/EQwsC/epWwflNsQRqq49 C5CeIH6nP9fAwrQmVwWQaWczXI3FCx9tl+2U2UXVhhQ5Xba88KvdaHJ/Pu1xuyMKpPNR 9GdudkB1+FgkI+Yc++LTvN9Ph5Ajq4YbMpkFbYVvDIPK53mgczvWZclLvOrn+dYAe6DJ VXCqwQY/dMiW5k9XXrs1QTBDFaaU4z/9XvpH+HgzaXhD+ma7YjKqE3k932qz0SUtl5wT hQ2g== 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=vRHfeWYe4t2JOdjOnGDnZu1tFFPEQawCvJ5AdLU8/XA=; b=V86YnEaS9bJ0tPi5NCkaNRhclxXOP1jCdVBjUUBqUb+eSajuVHtzk13Z4iEHVdFI5T 3RPRVjNiqXRoB5FMfT1cfOef2o8VGyaSvwPdh6Evm99HZ5vwgUI67yT9fOMVyzFeuV6V xwFnjjwxBImy5HdcDAkJT2dM+2PMGSuYLcWxD8n59D1CFYeJMbqyyeAbBkGhUtLp4kru 9PTTygykbHFct3reu5YqMBra/G8hFY1VjaKDz2ueSXHOE02f4CyPiQPyqNSdishLnh9n 5eTvKvHTjcJaCsE9ivrOlTtE6WgxuUekYQl/PnOzkbNxL3vWNtxMWpLWTpzioeH/Is+v CQuQ== X-Gm-Message-State: AOAM530wdGFh+pCPWJ9h7R4NFStNjVfXGrPEpqZXgOt5SL1dtw7akAZO dBVm3/8kDFuWLeLXk6vFXDT244jg2rEMyA== X-Received: by 2002:aa7:810f:: with SMTP id b15mr1424581pfi.293.1598624406682; Fri, 28 Aug 2020 07:20:06 -0700 (PDT) Received: from localhost.localdomain ([71.212.141.89]) by smtp.gmail.com with ESMTPSA id j3sm1403080pjw.23.2020.08.28.07.20.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2020 07:20:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 27/76] target/microblaze: Check singlestep_enabled in gen_goto_tb Date: Fri, 28 Aug 2020 07:18:40 -0700 Message-Id: <20200828141929.77854-28-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200828141929.77854-1-richard.henderson@linaro.org> References: <20200828141929.77854-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::443; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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=ham 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: edgar.iglesias@xilinx.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Do not use goto_tb if we're single-stepping. Signed-off-by: Richard Henderson --- target/microblaze/translate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.25.1 Reviewed-by: Edgar E. Iglesias diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 53ca0bfb38..7d5b96c38b 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -140,7 +140,12 @@ static inline bool use_goto_tb(DisasContext *dc, target_ulong dest) static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest) { - if (use_goto_tb(dc, dest)) { + if (dc->singlestep_enabled) { + TCGv_i32 tmp = tcg_const_i32(EXCP_DEBUG); + tcg_gen_movi_i64(cpu_SR[SR_PC], dest); + gen_helper_raise_exception(cpu_env, tmp); + tcg_temp_free_i32(tmp); + } else if (use_goto_tb(dc, dest)) { tcg_gen_goto_tb(n); tcg_gen_movi_i32(cpu_pc, dest); tcg_gen_exit_tb(dc->tb, n);