From patchwork Wed Oct 23 15:00:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 177318 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp902859ill; Wed, 23 Oct 2019 08:44:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZM+DZMvyWZs3LdXhtx0ngY7YEVNvktmbI1wgxPizyKmQBiy8+azGoEabjvaFOQSwoufac X-Received: by 2002:ac8:70ce:: with SMTP id g14mr9614933qtp.215.1571845471566; Wed, 23 Oct 2019 08:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571845471; cv=none; d=google.com; s=arc-20160816; b=PBy7YjjANU2Kt2oD5rs2cVy4vnV2u0y872wyKIgeHW4zdPyqfsXcpHtbbHJ0pCGT1a h4BkI0zFCU5l4D/8Kf+cMSG/5muj8jyvTgjrnT4br2J9nv1voKu7/0qRLNo6PLuAlTZy 4H9I2/reXITCP1YlnlUDyxVNris0pBpqEnM9deV8UKv5Se5jTlvh6AjbKewBlI+K4n52 2kk4kPm/sIsTPmGtAMzL8mRmz+yJwyfqP6OJM86qJH955XDk3DM1eilMYsTbI5QazZ+D B0ShNPwASMTXBksZGXmw9SHUhb+rV+WD5x3VsYcUHXbU4eV+3p0Ltb5+PjPyhFlyhxtf UGzA== 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=Iym+ywFHjEBpwuu12wdHsU0gouX4jDUf3/+DDNH9pyk=; b=gXQozQBRCxCQU4mW8qMfEyhWp1s2JIwXCzLn2BkOsPG7VbLU0rlLGj6fj+gTFABDZE GbjKoeURudDKLlNJ8INF9+WJ0gHbCd5uvFe82eLr/5siEflopyRwAsVEqiGz5evXQwKB /FYb8o/nzP/1rstruk5skrvHpsyQFVERb3lcCV1SL50vpxxDJrsokcvM+bzIYYO6QBbL yPhdktFDgrOoMXDkbBWYc4T711+i8wgd7CONMpr5U68GVEub4+2VrZpGNQ7NvRgX4CBT 6+zIVpLBnik8Bvf6hAmRG2e2fCGInkwQjmwly9Bv9JYnz9m+iTw0hGhgHsIs2Q/1/pOa m5NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JBY+uoi/"; 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 s10si6411778qtk.250.2019.10.23.08.44.31 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Oct 2019 08:44:31 -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="JBY+uoi/"; 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]:39826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNIoI-0003H4-Ig for patch@linaro.org; Wed, 23 Oct 2019 11:44:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35246) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNI8u-00089H-AU for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:01:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNI8r-0001Fi-Cf for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:01:43 -0400 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]:37710) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNI8r-00019G-5g for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:01:41 -0400 Received: by mail-qk1-x742.google.com with SMTP id u184so20055030qkd.4 for ; Wed, 23 Oct 2019 08:01:27 -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=Iym+ywFHjEBpwuu12wdHsU0gouX4jDUf3/+DDNH9pyk=; b=JBY+uoi/+fsxKtaVdEUfo1r3jJJ5rjOraTo2FNLPBuEm++0n3Useh7V3OBM7lNWtVl BwFFrYx2/65n8V4wsrimWFSkDg9Rx0yhIz1U7FMqv10Faud1dPXihm+aY02nZEUx0li7 YLYjtbsHzXvhKxikF+MJnDRIz888rOYaPOaAgFn+afBbHBEtzY+hORHnaIT/IeXFuE9Q WYVHfnlckqHzjRAJ948RWqES6iMm5PEUob0LAYQukgTP8flk3E1bZPMTquIaSSWBQb5+ p2JZStIJfYpkIaR39moIqnwOQO0Ve9CJUuLvdN0p5Et8aCCFiixR0g21GcXhIveVA3EP 3VeA== 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=Iym+ywFHjEBpwuu12wdHsU0gouX4jDUf3/+DDNH9pyk=; b=fDfArEoMbuOpMPHO3yZ1LmciQC7OcA/gIALOEnzOnnzHHymCPEZLGD5/uT4OLfZJ0z MB7HNMACr3QGtxb1/PYBXsH1fBRG1CaQedLZ2sBhn2se7Y7055+CzJG6OBLHvpk2QCjo NBtjcA5om8aYiuL9P8kFbnJDQxNqcdjgW4RSRU36Qib72BJM7JxE41aGNuhdkHZ5hwkK siyrQ9+MzNdIu8GoheE525EtuA0ovHfe4B7zkj/oOelJVUaoxxVi/Z90Jk7W4JZ2/rAh PxLv3k3OWhpxBUFTTIdlf7Edys5L77AqJ76u0YzlkLTEMkBcHWbA5Jkrqa/LFPMj1rbY zCVA== X-Gm-Message-State: APjAAAWFCZT7JN4mrGB1nF2dQLSSyAUp6YIioDMVaIODhzR8u0pO7Epo LILovL4nIiw1jY54a5PuQPNBBX5P+W8= X-Received: by 2002:a05:620a:20d2:: with SMTP id f18mr8909266qka.474.1571842886526; Wed, 23 Oct 2019 08:01:26 -0700 (PDT) Received: from localhost.localdomain (198-4-20-64.static.cosmoweb.net. [64.20.4.198]) by smtp.gmail.com with ESMTPSA id l189sm11030168qke.69.2019.10.23.08.01.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 08:01:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v9 18/24] target/arm: Rebuild hflags at CPSR writes Date: Wed, 23 Oct 2019 11:00:51 -0400 Message-Id: <20191023150057.25731-19-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191023150057.25731-1-richard.henderson@linaro.org> References: <20191023150057.25731-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:4864:20::742 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: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Continue setting, but not relying upon, env->hflags. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/target/arm/op_helper.c b/target/arm/op_helper.c index ccc2cecb46..b529d6c1bf 100644 --- a/target/arm/op_helper.c +++ b/target/arm/op_helper.c @@ -224,6 +224,7 @@ uint32_t HELPER(usat16)(CPUARMState *env, uint32_t x, uint32_t shift) void HELPER(setend)(CPUARMState *env) { env->uncached_cpsr ^= CPSR_E; + arm_rebuild_hflags(env); } /* Function checks whether WFx (WFI/WFE) instructions are set up to be trapped. @@ -387,6 +388,8 @@ uint32_t HELPER(cpsr_read)(CPUARMState *env) void HELPER(cpsr_write)(CPUARMState *env, uint32_t val, uint32_t mask) { cpsr_write(env, val, mask, CPSRWriteByInstr); + /* TODO: Not all cpsr bits are relevant to hflags. */ + arm_rebuild_hflags(env); } /* Write the CPSR for a 32-bit exception return */