From patchwork Wed Sep 6 16:06:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 111834 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1161019qge; Wed, 6 Sep 2017 09:38:30 -0700 (PDT) X-Received: by 10.55.31.211 with SMTP id n80mr4026045qkh.179.1504715910115; Wed, 06 Sep 2017 09:38:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504715910; cv=none; d=google.com; s=arc-20160816; b=UbdnThCzo1mFhNnT43iF7m4ejlTKPqy/wKG6DME04++eMm97++PZItJ0LPEsflZ8Df /QJV1knRGznigpnrAf3Jzcy0Qa4rmZOk4rpAtTvIpIkdE6eCKY6sxzuHjMG8n+1i8Gks YmOqLaa8uxjtyb67HYapiGi47nytDZdEvLt2cKwTED/kf9yqBm2aAINU1bTcFK3g4E5m sWAIY1wuJpy6me+iAfWvd5FGE1bb3DHDDkypVJMohzpDDd0AwdSz1pNG4dHhyWEDHxvh x56iLQy7iU/LUkHHkk3c+hOWBvKHhzHNmbfSxPdl2hlc9vbQUW8rQwiU6KQdyP+Q63PY 6uIw== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=FaKvXHHGiYR75jbxerCmzlpe42rCvutIo5e8u1b0PMw=; b=1A04MeZ8EDwunpVwBVKFOKdOcBbT69rM1g9z4BhYu4pL+Zz5waV+Ds0/qTjQ0Np5OH 44kTrPfU1pGu7r0ismn5Ee+C9BLQr8orCqgVpMFnmolNGl9sKf41wwZw8jMosN7kGBY+ c7zI6d+EdT3dmu9Dvr91iXaEF4vlCI7kfmlX6/Kr5onq/rxgQMTd/Z5OoqogFoItm0gQ xStvpOmdEDDHJ14ZbJlmjcq9n1mSRUCjUOY/EV/rLdLPmTgjRx+TS80miQfOmjeL17cb UOnHH1uEDwegWscGQ9xbMj/k/If0XqA/SQiZp0VL9uzHGw3eMgC+giLy2JFTAv4e+A3v 1mfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Kic5+E7N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p23si262276qkh.251.2017.09.06.09.38.29 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 06 Sep 2017 09:38:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Kic5+E7N; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:37104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpdLP-0001He-Qy for patch@linaro.org; Wed, 06 Sep 2017 12:38:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dpcqy-0000bM-Oq for qemu-devel@nongnu.org; Wed, 06 Sep 2017 12:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dpcqu-00037Y-02 for qemu-devel@nongnu.org; Wed, 06 Sep 2017 12:07:00 -0400 Received: from mail-pf0-x22a.google.com ([2607:f8b0:400e:c00::22a]:34785) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dpcqt-00032z-Pc for qemu-devel@nongnu.org; Wed, 06 Sep 2017 12:06:55 -0400 Received: by mail-pf0-x22a.google.com with SMTP id m1so13486478pfk.1 for ; Wed, 06 Sep 2017 09:06:55 -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=FaKvXHHGiYR75jbxerCmzlpe42rCvutIo5e8u1b0PMw=; b=Kic5+E7N7vpQER4GVCBTf0GZvBmRq4YrkTVLov5upn1+R2IyNEMYA2Qyt0gGn/FYtz fkAxmJRyD4gs66YqfqIIyTz9wA2L7yeZ5OtxhjqThbUpxzLbt1etouzaBL1wMIMm7nxJ ehk8NJ3EW93uxweCixsp4BNSG0Dnt+jaidMdI= 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=FaKvXHHGiYR75jbxerCmzlpe42rCvutIo5e8u1b0PMw=; b=qXjxI+EHWbDDwDjbxe9xWKPxj1NzTqyTia0spSEVxjNOsFB1ZNO/TB7x/S0x+Vx7/9 evKSmwFeDuw25A6zV78LhprsvZbj+jhRg0QRktAi3fYPKwrMPL/wfD4SFH6MDAcwFpHb 1K3YPMZUmvXAEzSc5hSuOcYBUY8DbFFQc0fhMbyZb/BdLGgotjLtybZtRPi201/nQ74U j7XERSH2unn4uV41C6pQUMbM5vBr0lH3DnDF+mI1PhWTp2YQ+2UaT8HWGtPYHnFelZKK lDjcmKsWBG3zMmZNVrr4EUsTq+4KbeRjefqFbffKfEC2xaLasItGwBpjSvZoHISeb90z /MKA== X-Gm-Message-State: AHPjjUhePp3Pr5CL4IRkqA9tuYbSVvNgAUs4pRQnuHY5loXC3+tQ2n4A muG9xLhsFjgxTjCa3RiFJw== X-Google-Smtp-Source: ADKCNb5Lorwg+INXciyLUKwAJQXs4kg+VoBPUlKNKso5xHoQ/Of9fIsDxEsBqtX0y+XKbr5Oc+hzPA== X-Received: by 10.84.210.45 with SMTP id z42mr8814641plh.178.1504714014598; Wed, 06 Sep 2017 09:06:54 -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 t65sm262863pfk.59.2017.09.06.09.06.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Sep 2017 09:06:53 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 6 Sep 2017 09:06:10 -0700 Message-Id: <20170906160612.22769-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170906160612.22769-1-richard.henderson@linaro.org> References: <20170906160612.22769-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22a Subject: [Qemu-devel] [PULL 30/32] target/arm: Move ss check to init_disas_context 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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson We can check for single-step just once. Reviewed-by: Emilio G. Cota Reviewed-by: LluĂ­s Vilanova Signed-off-by: Richard Henderson --- target/arm/translate.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) -- 2.13.5 diff --git a/target/arm/translate.c b/target/arm/translate.c index dabd5eb89a..0dd24aad90 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -11883,6 +11883,11 @@ static int arm_tr_init_disas_context(DisasContextBase *dcbase, dc->next_page_start = (dc->base.pc_first & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE; + /* If architectural single step active, limit to 1. */ + if (is_singlestepping(dc)) { + max_insns = 1; + } + cpu_F0s = tcg_temp_new_i32(); cpu_F1s = tcg_temp_new_i32(); cpu_F0d = tcg_temp_new_i64(); @@ -12037,11 +12042,9 @@ static void arm_tr_translate_insn(DisasContextBase *dcbase, CPUState *cpu) * Also stop translation when a page boundary is reached. This * ensures prefetch aborts occur at the right place. */ - if (is_singlestepping(dc)) { - dc->base.is_jmp = DISAS_TOO_MANY; - } else if ((dc->pc >= dc->next_page_start) || - ((dc->pc >= dc->next_page_start - 3) && - insn_crosses_page(env, dc))) { + if (dc->pc >= dc->next_page_start || + (dc->pc >= dc->next_page_start - 3 && + insn_crosses_page(env, dc))) { /* We want to stop the TB if the next insn starts in a new page, * or if it spans between this page and the next. This means that * if we're looking at the last halfword in the page we need to