From patchwork Fri Oct 11 15:55:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 176002 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp979154ill; Fri, 11 Oct 2019 09:26:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyNl+ZRmhuWv7Db51M5hmh+MsZZzDPaOwlKjnE2rYF/1yQ4RGujlM9sCvjMhEH0+ox0JMsd X-Received: by 2002:a17:906:2319:: with SMTP id l25mr14735281eja.309.1570811216230; Fri, 11 Oct 2019 09:26:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570811216; cv=none; d=google.com; s=arc-20160816; b=F9JwZfHDlM4ns8WKIKLA0LC8bADI+BF6ejbL0x1JMEUihmCL/59UXPDMjoq7C6NLWl Ddobw7zfkw2j/Fg7vemZvLX+Z0PPi8qsCShh0fUrxgHb2ik6FhKOqSYTQw1P9FeHMsOt Y9EQ93Hm0/hjZPjAXJfYWeLI2fG4ZN4vLszh5ifFAt6FgxLu2FFWEDRj7Vf7+4OPHksy yjPl1tiwjhEO8xyRvSzfld6KVht7kO8AvhmC9uvYf1DX99yisnSGPj/lxcsWBQ6X0Mgp q/yLkHYEqYxOq1w1fO/zyKvwUm/l8xvbdg+uilzUmHw6n/tsqcPTsqoZryenPE4XBBh2 Q6tg== 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=0kUXqC720LILsCV2g+/0quuhAdJiaFyOvoOqO9J/BUY=; b=RWkIdP/dwqIUq9EiSt/k0NVmdTmaw412e7BzO3GLwBcKWI9bcHHjLCx2I4FnDsCV6t 38ckHZK6hf/1N1EnuxzYlHZnKb2lO7LuwyEZ29y2mdSJgqMaQobyqY6gEdptkOpY/G87 dtDFkGK+bkqOBvZbsX3xI5VcfzOMEY5xlRT8dyjhiXI2TnWm7ocSaY9w5pJ5VhXf6ZEh IEHHlWPVcVgB8tZ7PdjBL8cFrDvlCiIFNl5dln3WOcxZFroxij561xk5e+YKzkhYRno6 DYco9kQyT0+wrRcdVhAB1m1CBt8MyO+/B5+pynEWFzYSaUZNNChOaVLlmR6ZHIYyaXqt gIVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=qU3xCe+r; 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 l21si5197513eje.331.2019.10.11.09.26.56 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2019 09:26:56 -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=qU3xCe+r; 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]:53784 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxkk-0004fx-Jq for patch@linaro.org; Fri, 11 Oct 2019 12:26:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33970) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxH1-0002jl-2A for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIxH0-0007qu-29 for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:10 -0400 Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]:36711) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIxGz-0007qT-Ul for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:10 -0400 Received: by mail-yw1-xc43.google.com with SMTP id x64so3651906ywg.3 for ; Fri, 11 Oct 2019 08:56:09 -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=0kUXqC720LILsCV2g+/0quuhAdJiaFyOvoOqO9J/BUY=; b=qU3xCe+rTvxtcdUGZdLBjsDDrxtB0ERic7bACzJDH3nvPWQCgZ8IPfp3NJjpuHnjGS z9irNej9DIL1eMEMbJNRvVgDZFygYAAw4rKA6yP72Ku40VmNgLBEOsimqRLauFKI6icg 1540DitB4QwfHSRdu5294JNAWRg0aHJzbwZvnwcE+iWPovstFudWJ/GusjkHJ9kQeZ4Q l4oYB+CjGlbCgD3XaZb8v8UfsFyz6429JfK+1U6Q/nWWkT9Ptc/tMfvnOquEhbfrP5cP x45f4Cznm8KjDPFV/8p/7Ee4/KN36IDHkY3P+BbE03+EcPVM6r/Fx3LZZ2+BxsSaFenC 74fA== 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=0kUXqC720LILsCV2g+/0quuhAdJiaFyOvoOqO9J/BUY=; b=cqLQMgkR1jV/ObjnqpDyi2TypaKL5/iDmFL27vFJ3mmiTiyDNTCbHp6vMYn7+cqBsg dhyjYeuiuAAxuakd4dQvHfBDveClhflO0bJdm5O5WwlpuwpIghyli//sLpkVk55+BOLm Ate+j6yMMr6b7u8LHoZAgQI6ERcfPaUHeGkFTGXDAmHRiPwbR5HGBFbCxDqOsQBHBNGy a6fvyRVgifjnWUmRU5ugTzaCQ+et6uVva4e1CzQaOS2+yNOoE+ijPQXo7FcPCnPxmsGl rBubtqG4P9/0IgBdeGGmqNeSblP64scCpCwKy8Er8VBbOaViiejjS4sroyVe6wAv42rq z9nw== X-Gm-Message-State: APjAAAUqubeuqToTha9ozUnQnm++2AthaX0d0zNk5eL+GC/i7BrWNF0P /wDQWrMGFe10IxSaondfD2CJ2Kf7DeE= X-Received: by 2002:a0d:c646:: with SMTP id i67mr2985197ywd.499.1570809369038; Fri, 11 Oct 2019 08:56:09 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 08:56:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 18/20] target/arm: Rebuild hflags at CPSR writes Date: Fri, 11 Oct 2019 11:55:44 -0400 Message-Id: <20191011155546.14342-19-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::c43 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" Continue setting, but not relying upon, env->hflags. Signed-off-by: Richard Henderson --- target/arm/op_helper.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 Reviewed-by: Alex Bennée 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 */