From patchwork Tue Nov 2 10:59:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 516622 Delivered-To: patch@linaro.org Received: by 2002:ad5:5208:0:0:0:0:0 with SMTP id p8csp4391164iml; Tue, 2 Nov 2021 04:07:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQmzTesKIe4OTlEkAmTJMhI87KCnbHlL7c/zwQMJig5e7XXlpFIN+VYoxv0vt4saHQlEMe X-Received: by 2002:a54:488b:: with SMTP id r11mr4505443oic.14.1635851263435; Tue, 02 Nov 2021 04:07:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635851263; cv=none; d=google.com; s=arc-20160816; b=oSgCw5X9VgJ/dQ7jig/q6QQsEMqQ1noCPYYPQ3LLSf9y8U3ZBpUM3g/zn5hc0KA39Z XlVOtQMyIvDlGOBjOI51L5OHE7+cs+D3PeLqse8tKTz4Ep25dVQS/Qvu7Wuy0dj7azwQ 8EE70JPMoa4ritwg1WUQGMWFSYMLmRlz7jpwst1KvLpkEZt2yCf+qH1l+v2c5C5vAwhn dIABm5HeRKLf0KezlbHDw7x5NN/TBt5LaTUsohryj5998HUgDXVh2PCOn93Cs85zodvv WkSr1ykn4evzw/X1+vBpPYOtoT/P99zVZ2Veog9FGKKJBMiTpRI4Y63K4/BWS7QHJvbN dH7A== 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=kgIAZfpBiG9Bp0aRLB9BDRfUW43JbXvDwVrmE2eY/v8=; b=IkmzhB15TAwY3VyUm0iVjkan05MwY4QAuKzF1kUiPXVzWUBeqC/Uw+kd99Q42RaYcE +qIVgcmWDXOG2YfWgmqzecuwYHhe2cdBoL/FF7ir+YOD158O1bx6V3OwzfHt0CTPFVdL UOQ7TaiPzuM/EFIWQXuL6oKPbq5sA8onMyL869QKKNt7YIsYnQhY75KhIuLrot1R11l7 +oBELritvZG6FbGk+mJpsA+AQgwzSJBZk3z4xtopV3KhXLzDRVvpcRmz75k1z/ZXqBJb h5fpUC3LTsvjeZ1yMcHgytfOFl/Kk2v7u2IqaYEdewHZBUkt4myUQ0E9mkkltUoHcITq g1mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Z/NV4hhK"; 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 q2si3665383otg.148.2021.11.02.04.07.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Nov 2021 04:07: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=pass header.i=@linaro.org header.s=google header.b="Z/NV4hhK"; 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]:42812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mhrdm-0001YI-R3 for patch@linaro.org; Tue, 02 Nov 2021 07:07:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40928) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mhrW3-0007Um-SC for qemu-devel@nongnu.org; Tue, 02 Nov 2021 06:59:43 -0400 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]:42772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mhrW2-0006ri-C7 for qemu-devel@nongnu.org; Tue, 02 Nov 2021 06:59:43 -0400 Received: by mail-qk1-x734.google.com with SMTP id bm28so4082989qkb.9 for ; Tue, 02 Nov 2021 03:59:42 -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=kgIAZfpBiG9Bp0aRLB9BDRfUW43JbXvDwVrmE2eY/v8=; b=Z/NV4hhKqW0tOWm77uZhklFGUZzngF+3cAH2rjx1O4hQQZNufFkaxuuSDCSekf/AuP 2XPE2NM1u6OZuMz/gaJ2SrTrO1Xo8ZHX9xw1ZWKHUS40Orgdl7CbiXdDSMcZagKK39Q5 X3h8vXBC6SvXu0GEwbZvxV4q4milYL4pgyah+00DgpXExStFcyu6qjWA+A667rcOFago dqbeC4J9OjD9Fbng4LIhbnQFTBF8VzLBuXx1d+dmZ0G0ZPO3O2z3oZJbj3b0prm/x2Jz 7EqZ66Yx1KJGGMKfj9RrzrLwsyIwjjDDCSv8n09mkW9FARVJPyKSDVLjtkx5nDQvx0jf OlDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kgIAZfpBiG9Bp0aRLB9BDRfUW43JbXvDwVrmE2eY/v8=; b=SDGc1xWkBjAeEkAfae6z3cbuXd+he+mov2oPbwaHLImbIzT+dcq3HVJKAmtrH0Df1F 3zTwsLxoC7wVTOVN9kZMTUKDii8Kem0Wa/54wxohfHRS/guALdGjRHaa1kOybd8OX+sd 0YTjvZ7c1tmkScI+OMlx4D+o3BX5XCqtUXAN0jmd8UPPnwfef8xniK0Y247JHFvfuGCb NYTUjlgSdzeTY1AhQri8kmM66HJ7ursBvVq3jdjACDEGK1yMqTY+Ts/C9sphGtKD6K5O JEHINe6TyucUxlovrp81Ex7O8giTRgTsdEfFOhjcop2sCtFKqNy2kG+/wtIxPUA40JO2 HSeg== X-Gm-Message-State: AOAM531ULP87tmEIpqe1qLFefSVYDGA8fBls/6E5AgjuB0EPH6pSZ+nu MzQ+oPyceU2OEQQbw9QaWwZ7b31jWWzVNQ== X-Received: by 2002:a05:620a:103c:: with SMTP id a28mr12149541qkk.271.1635850781549; Tue, 02 Nov 2021 03:59:41 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-57.nyc.biz.rr.com. [172.254.253.57]) by smtp.gmail.com with ESMTPSA id z26sm11789510qko.13.2021.11.02.03.59.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 03:59:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL 08/12] target/arm: Introduce store_cpu_field_constant() helper Date: Tue, 2 Nov 2021 06:59:30 -0400 Message-Id: <20211102105934.214596-9-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211102105934.214596-1-richard.henderson@linaro.org> References: <20211102105934.214596-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::734; envelope-from=richard.henderson@linaro.org; helo=mail-qk1-x734.google.com 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Similarly to the store_cpu_field() helper which takes a TCG temporary, store its value to the CPUState, introduce the store_cpu_field_constant() helper which store a constant to CPUState (without using any TCG temporary). Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20211029231834.2476117-3-f4bug@amsat.org> Signed-off-by: Richard Henderson --- target/arm/translate-a32.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.25.1 diff --git a/target/arm/translate-a32.h b/target/arm/translate-a32.h index 88f15df60e..17af8dc95a 100644 --- a/target/arm/translate-a32.h +++ b/target/arm/translate-a32.h @@ -70,6 +70,9 @@ static inline void store_cpu_offset(TCGv_i32 var, int offset) #define store_cpu_field(var, name) \ store_cpu_offset(var, offsetof(CPUARMState, name)) +#define store_cpu_field_constant(val, name) \ + tcg_gen_st_i32(tcg_constant_i32(val), cpu_env, offsetof(CPUARMState, name)) + /* Create a new temporary and set it to the value of a CPU register. */ static inline TCGv_i32 load_reg(DisasContext *s, int reg) {