From patchwork Fri Oct 4 16:21:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 832736 Delivered-To: patch@linaro.org Received: by 2002:adf:8b52:0:b0:367:895a:4699 with SMTP id v18csp864364wra; Fri, 4 Oct 2024 09:23:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXZIaNkzDuzlaof+2c5cqWuSi94kMfxTPKJ7KYd8/dFLUkoum4HnCrSxWi6drryAGxTx+aj/A==@linaro.org X-Google-Smtp-Source: AGHT+IHo+wkQAnxBQtjPm/UMdNxfUxujglBdPWKsKxhASceLLOzOef2vtI1iTusvd5iGu0eo7dhm X-Received: by 2002:a05:6214:2f06:b0:6c3:6e6f:794a with SMTP id 6a1803df08f44-6cb9a330b76mr42414096d6.20.1728059012288; Fri, 04 Oct 2024 09:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728059012; cv=none; d=google.com; s=arc-20240605; b=MG6l3D1lRxvDBkSIZqRJsaMWycwzXqGFE7eg4Ug/D6sQgGmcRQ9JDXK4YUdMfLrYcq Oox7llEsHasZuxNdSfqHIr9T2pmqgSrVa7SD8MKGwtecMSVjG/9jyr716Em/BkdLOcXe 0ydH7nCqGc4Bjs+oDbMdFUcD5FQ+/Y9PKN+GDy/oFB+kGmVTWJ/3qec6y3Bw7H7N4okO 2reShXS7OoplGA3jASRDyMhzmZh9lBUrB8rTzELn0oaNycEJTPwXKbkjMG+vz0fUj11H uT3khOffyC4xaEDJP4HwVCI7cerqUYtw4Q49UGN4YIlN7O0tdFSejdpOOppwB3dnU2bD 3fEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=8EXxbN9xNIe/fch86Xk2ysVTGoSQLunGFBZDl5pFX4s=; fh=IxtCl+9ZHUzZoUVl4S7ob8DSiOMwUZ6EKD3En8tt6Ik=; b=P9i+so/dRox+Q9HUEt0e4djT7tM9xJ6XIjRFKUZpAhNYycPZa02k6F6YqJl7JKWyOv E2Qa4nGgPqvK+dqXvD9jNbChUJGztJySCQdDqB0RyNNf3Rv7T8qW+iMeoJvG2HEhX1/v xtFaah0Q6d6BTwUtZ5PgxyKbaR1LLQ+m2a9zjCHevJEl8FhqX1PWoJ+Q1zU9MLmyA2+J pYrhRKaqhsctSO6GIRq4dj0eF5DFnYdMyoME9xZds2F7F9/aOLnL1e7slBs//uqHT4Bv IZmjKoXhTWTlmheGZNYq3DMcWo/5rMLog0KMWoqTAP6NLxrRxn07WQQlgl4xBlFZLRJZ RtHg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zABwxirR; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6cba478744esi1246136d6.436.2024.10.04.09.23.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Oct 2024 09:23:32 -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=zABwxirR; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swl5R-00070C-Vv; Fri, 04 Oct 2024 12:23:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1swl5O-0006sr-JB for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:23:22 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swl5M-0004TR-0V for qemu-devel@nongnu.org; Fri, 04 Oct 2024 12:23:22 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-537a399e06dso2649118e87.1 for ; Fri, 04 Oct 2024 09:23:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1728058998; x=1728663798; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8EXxbN9xNIe/fch86Xk2ysVTGoSQLunGFBZDl5pFX4s=; b=zABwxirR9zGdwUzNB/qmkeoWOcE3czRgqCE2MIUHprD3ravoGKBCjx5giPQ7RvDxH/ +7IKAzXLZi9pJ16MT3lXH0KcsqZmApWb6U/CdnCiZ9Den5F9HK+MwtGAY1YQxAlUK4H1 yt4UTmbdT4JNXlIZHHaIJquoiwaSg+yiHTDEh9Gy+P3ypCnYKA5aR7s98HvmNrz94UIw PUiz8xkyDZoFnnbBUpR4aq2/15PQOLmo5Ufhcr2zT5OMg4GYln1FPf2VDlpWYYwgsGl/ aMTwBLPaexHCXtwpDRakeYteYFjU1oqV8G4H/2A+MuFOM9oJIxnHclxJ/L02DL1pZYKA Ul8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728058998; x=1728663798; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8EXxbN9xNIe/fch86Xk2ysVTGoSQLunGFBZDl5pFX4s=; b=sYIwpqWIoQEawMjzgEDeDllyua54rDas9BVHIqv9QTheDcXXdHbMrpdMLQ3U4oj2eh ocAM6fnYf+OE027NzKmnn8kXcdJUTy7fKEnQ7Yyg74vgzgGmAFgTpmP9YjVaFoVSJKFl hAARZdMFbv8yDMoaBYIMT/EVL6APoj64uPSH6WtqNgxisJlCVYTwtdq+P5DAZwhoeouj RNE1hcJkW9pVlGGuD5mAhTeCPq2XN4L0ETKtIL/1/zSCv+zyH6eK3MZh+iZ8cKDt0wOz i31jKAeHxa68xmVbvDw2Jg4PrPzsjSy0mAgU8VyKOWGO+GeOEkU8Ohqp6cQz4XUysezb k4mQ== X-Gm-Message-State: AOJu0Yw/rftqwp6jJP48vcEptZYB+AMqPiDf3m1/A701aKg1Or7gJLau MJJS+UYLCszzJjJ7LBfYOQzjGCr6f9lChp6PPMgvvnbaQFScWwEep5nbQRo1mRzsTxAEVXwM+aX CGo/M6g== X-Received: by 2002:a05:6512:33d0:b0:533:cf5a:eb32 with SMTP id 2adb3069b0e04-539ab8741c0mr2171775e87.19.1728058997637; Fri, 04 Oct 2024 09:23:17 -0700 (PDT) Received: from localhost.localdomain ([91.223.100.208]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-539a82a4f83sm458713e87.236.2024.10.04.09.23.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Oct 2024 09:23:17 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Eduardo Habkost , Yanan Wang , "Edgar E. Iglesias" , qemu-ppc@nongnu.org, Marcel Apfelbaum , Aleksandar Rikalo , Daniel Henrique Barboza , =?utf-8?q?Philippe_Mathieu?= =?utf-8?q?-Daud=C3=A9?= , Nicholas Piggin , qemu-arm@nongnu.org, Zhao Liu , Peter Maydell , Jiaxun Yang Subject: [PATCH 6/8] target/mips: Implement CPUClass::is_big_endian Date: Fri, 4 Oct 2024 13:21:16 -0300 Message-ID: <20241004162118.84570-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241004162118.84570-1-philmd@linaro.org> References: <20241004162118.84570-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::133; envelope-from=philmd@linaro.org; helo=mail-lf1-x133.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=unavailable 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 89655b1900f..ad70ad802a7 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -132,6 +132,11 @@ static vaddr mips_cpu_get_pc(CPUState *cs) return cpu->env.active_tc.PC; } +static bool mips_cpu_is_big_endian(CPUState *cs) +{ + return mips_env_is_bigendian(cpu_env(cs)); +} + static bool mips_cpu_has_work(CPUState *cs) { CPUMIPSState *env = cpu_env(cs); @@ -577,6 +582,7 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = mips_cpu_class_by_name; + cc->is_big_endian = mips_cpu_is_big_endian; cc->has_work = mips_cpu_has_work; cc->mmu_index = mips_cpu_mmu_index; cc->dump_state = mips_cpu_dump_state;