From patchwork Fri Oct 11 15:55:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 175998 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp963021ill; Fri, 11 Oct 2019 09:13:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyE0kOUxERP5x2FFr9n530ZsQf4pJJ7Ss+hzJGuiCpj87IoovsD5zDXsKMjP+8HKrzLWYaO X-Received: by 2002:a17:906:2d49:: with SMTP id e9mr14545583eji.240.1570810423749; Fri, 11 Oct 2019 09:13:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570810423; cv=none; d=google.com; s=arc-20160816; b=WThkwd9tPsyL4on5oIqKnJ9lomz/C06cfdkYKFDd9Y1WjGTMkG6vCIGmaHwVA7KnZL UXoenW+vtyHpQpBKWOXeBI1NEFyQmuv2QGf6FQ2sTpTfifumRt0Cb6eutiMKEYHhKKen LnzvHVxRUjn7U+mH7U/qmwzJNeON7Cc8AdR18r6IDjZMuAQLP8tPzN+TzvOXB2fcuXre 5D71wdEbO2c0QwiY0E6/4vC4zo6VaWbTlmWkSY7AJ40E3WlmCUHIAxBb3Kv7J0NUbM0q 6tJ4LHYvFDLKP+tbwGtK+0k7n95DD5TFMrh0Hv5Up/KF+6MkgLh1IybzkcAWNLITdXDe vu/g== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=ReDLvA+WR/T82Ne1Z6mUqgY0iX8aRnhgEWdNBPA2eNw=; b=AXrUN3l54lab/MMHlJMeGAk9/11Sqty4+Qoqky1OgtA1Z8JY1P6tHFoQsHJfK6B+V+ hvOb0vZ1BiPnTMBuvR5W9y3HVD0lUGy4Vq9eBZZJ8YGzF9zKhofeQIIq3K5TrBf1q+2A R7aYcSM5qSwMkW9YARko7yyQQTmsKAGWiXXAh91NSqOnQJ68eB70+8f5kd+6iEFrhH4g MMJts1O17hIP/zx7MTEjanqbr2/NLR/Tv9XSCbCEOrCrmbONPWp0GhJYZzLgCvAzFZoR TLBiK1Qbol9QrSIUM4rVbed8vLZ9SpmKSavA6Fw8CEIzmCq2/fcSCXicQl4XZUOZpC3y JQHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=wswCKfzZ; 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=fail (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 d48si6008358eda.383.2019.10.11.09.13.43 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2019 09:13:43 -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=fail header.i=@linaro.org header.s=google header.b=wswCKfzZ; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:53504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxXy-000778-05 for patch@linaro.org; Fri, 11 Oct 2019 12:13:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33868) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxGw-0002bX-8n for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIxGv-0007lZ-7N for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:06 -0400 Received: from mail-yb1-xb44.google.com ([2607:f8b0:4864:20::b44]:37867) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIxGv-0007lB-3c for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:05 -0400 Received: by mail-yb1-xb44.google.com with SMTP id z125so3257532ybc.4 for ; Fri, 11 Oct 2019 08:56:05 -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=ReDLvA+WR/T82Ne1Z6mUqgY0iX8aRnhgEWdNBPA2eNw=; b=wswCKfzZ6ZGMe3YYDoaISuVaqu0ShmUFqHtawTQxD6dxDG6iPuTssqczv+YrA9s6Mp u6fq4eIgOF1k20SRumbKrjDvmQQJPtU3CXf48TBNADU5zY4gSLZZvk94IJsACbmgKgXO alE0vPdweclCXnEGNWkuE5gqhp+R3Sa48tl0lWotAhebsNMjgw2hp8uLifNQNmj06Q1q Ixf75bivWH6cFM3ioQyysonDMftMFv/fKzqmZ6LI3kjGWdk9Gi9NcdVUkCx7Qi7c4AAt SwVn7GCirvYX2UyGVPQSDkiuwuV6+7cqkcb864jpkTSWj5L4H4FPlEX3l/MDuYVdamox QLmQ== 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=ReDLvA+WR/T82Ne1Z6mUqgY0iX8aRnhgEWdNBPA2eNw=; b=gi0pQnV7JjuQrk+7zLVIXHnvHzGVYiVi5+y2rB7+QHY80ggJKq/ckHXkHWUFEUhAco dvda9bJuJAB5uy367IGCEyc9jDVmwlzRwnyIZZUkrumupY6n4y9ARp9BACBbgGMKn4/X Xvm252rroUTXGRAqDjyp21PmPH9GJ7vUW++Bf8LCQTTj6PW5KRViXXIu8SJr3K3vaLCJ WRu5tD7bFDkcX7VasbCvJFieQPqbAil74I7PgZp2I2r1TD0KoLFfbD5dfi+xjE28Xe3c s6hHTuiplX8BpWcwHz0/52Nw2l2hFNMSe1Fo88txbumUTfT5Gm2GwfJhDkavd8hN1QcR XKYg== X-Gm-Message-State: APjAAAVo4zZzuAOf4fP7H9+3viDaX3q8GhLWdgBI4l6+Ir6EthQhhQcD rqCLjzek+mVtLRHj+ve/eHcV1B5SPdQ= X-Received: by 2002:a5b:30d:: with SMTP id j13mr10598348ybp.308.1570809364235; Fri, 11 Oct 2019 08:56:04 -0700 (PDT) Received: from cloudburst.gateway.pace.com (67.216.151.25.pool.hargray.net. [67.216.151.25]) by smtp.gmail.com with ESMTPSA id d17sm2473139ywb.95.2019.10.11.08.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 08:56:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 14/20] target/arm: Hoist store to cs_base in cpu_get_tb_cpu_state Date: Fri, 11 Oct 2019 11:55:40 -0400 Message-Id: <20191011155546.14342-15-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011155546.14342-1-richard.henderson@linaro.org> References: <20191011155546.14342-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::b44 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: laurent.desnogues@gmail.com, peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" By performing this store early, we avoid having to save and restore the register holding the address around any function calls. Signed-off-by: Richard Henderson --- target/arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: Alex Bennée diff --git a/target/arm/helper.c b/target/arm/helper.c index 3f7d3f257d..37424e3d4d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -11225,6 +11225,7 @@ void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc, { uint32_t flags, pstate_for_ss; + *cs_base = 0; flags = rebuild_hflags_internal(env); if (is_a64(env)) { @@ -11298,7 +11299,6 @@ void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc, } *pflags = flags; - *cs_base = 0; } #ifdef TARGET_AARCH64