Message ID | 20250306154737.70886-30-philmd@linaro.org |
---|---|
State | Accepted |
Commit | 415aae543edad19eda8f66955dde386c7fd7c680 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:64c8:0:b0:38f:210b:807b with SMTP id f8csp335197wri; Thu, 6 Mar 2025 07:58:09 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXwKqiy6UOunsa949VGZrwXHX+prH5lVkHLPpbPyrpvIzwL3qvQhBITtWv5d8F9KEdsoiCZOg==@linaro.org X-Google-Smtp-Source: AGHT+IHxvVSw3jOH9ah3b4lkLRh3tVCDvhpY3qE/nSEuxB9qp6ZgTXf82XzoeAeB2GPbtlykIzQ6 X-Received: by 2002:a05:620a:6404:b0:7c0:a0fd:7b42 with SMTP id af79cd13be357-7c3d8ba8131mr1142809685a.0.1741276689430; Thu, 06 Mar 2025 07:58:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741276689; cv=none; d=google.com; s=arc-20240605; b=IUSUpDeRexjgbLpHxmnDZIe/fH4srYWVrTEeKcXc4UwMwTp3KNw9D4spzqzMvKkA7C aQYk2hG+IsWY7Yl8CI6CaitohSC9hny9uHDWva1uBpKPn4X4nmaGf3GLOpyzmr6TF+XG M+rrd/k5ivpmW/gjhxdORuwvByakIU9V1n/aTP8DSneodHuPjipEipbSmCyFUVD8At8e TTj3f+tr58lohhDwTrEGxC7vjjVFGCcYWTb1AxVl6JXYNb+vDz5tdFu7aSwc8hsnRn4y k5FTT2HyFsY032SJKcG4s1Iuf36tW2xYIPVfheXMsncaqAnIhtXzEXvY6ciViZ9GJ/OJ Vz9g== 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:to:from :dkim-signature; bh=tN8MUCR59yT1PPc6yhlXwubOk3u9382+22fqIhPwV6Q=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=bm78xVN9hfdOWJGsftX9QtebblITMz+eLdsciLnMzvl15RDHvETZTD0+Fg0Ys8u31r PcBK0irm+einpf0+gk3nYmCClP6Rvm4ZotIowpn54d1d8RDzlLOh5fTQ7z5dvL10lvMP Whl/563y9vPjQkxSNmOGaOCuoBqaU5aVKpFO4/RUJeouqsnJ1L1ASdRUN61qYDmjkO6y UjLSrEDn6/k339h2XvNaJzgVmC15KmwgkE03wJXmqEw4S+UAGoLTOYefcvol7W/bPsHs UF2p/VhxhrlrxhDrDS7769a8F1NG9Iri08ziLYPvGWqo0ewbKoQboUbZEKpkcLJvDIVh kiWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F1+dCZfx; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c3e54fca08si146126985a.312.2025.03.06.07.58.09 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 06 Mar 2025 07:58:09 -0800 (PST) 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=F1+dCZfx; 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 <qemu-devel-bounces@nongnu.org>) id 1tqDUT-0003iY-8T; Thu, 06 Mar 2025 10:50:29 -0500 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 <philmd@linaro.org>) id 1tqDTs-0001ff-0r for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:52 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tqDTq-0006Pv-AO for qemu-devel@nongnu.org; Thu, 06 Mar 2025 10:49:51 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-390f5f48eafso533535f8f.0 for <qemu-devel@nongnu.org>; Thu, 06 Mar 2025 07:49:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741276188; x=1741880988; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tN8MUCR59yT1PPc6yhlXwubOk3u9382+22fqIhPwV6Q=; b=F1+dCZfx9smevkYfX546qkYJuRQPls9DVG8+aPO+1MWnzHeNtdQZZT1uLKyfOF9joL to89XuqEcsPRanXi4FH3x/GFgm1tkj+ElYkSt1J5dHvJKNSyS9doWZvrWB8QJqnre1MT 1jCl4T6p+74C6aF4MS3lwPBfwewMKs4/qn7qpGqy3wbnUq+KknhNX24RR254yceb/QCm ogZBGHDeJA1TeKptwAe+MtSbb2HGfP47EgDx3LUBQPs/CvZukb7owEZQnIwQSx5ARDq+ W4C4DhyDIvSzgGi4j5TfAy1fCDug3RA12FGfQrljRdPK/m9MlAGKeyLiwjQjAKQYC+zx 0SnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741276188; x=1741880988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tN8MUCR59yT1PPc6yhlXwubOk3u9382+22fqIhPwV6Q=; b=sMH55rRV9jHX83kk/Z1cuEkF4y1kYLxuB1d1HDRMHuz88iFw19D89Zkmj81cZcOnL9 xUYHPNujG1kHL/MEX+VE9CAsfqVmAMe+dD9Qhi93HcwRc8Ev5oWe4pMsLGOOPyu78If3 ulA9VkiSpshH91dgNfqowIkaIuq6L6N/6w9F9me8alNhv41qElo2ziWhVw9WtmtdKqs8 O1dE+aiSC6ZeH9DXjP7hyAuBUIBwOn/TxgnBJaXFYUsW5kqCjGYcfY0sYZwN/qAl7kCE 5YgE5Y2z7/txxIooKT1xDmiB7A3pGg77T3/yotQhqk2G/sXQHPvGyxYqnj2NKAacDnLg nljw== X-Gm-Message-State: AOJu0Yxy+AgcZxqD3xRt9R6E7lT0QgPOXOs0dkGCG/XcV/lACFJIt/vJ 8wjaWyUSfztDkxPxzTr3MwOgn/KKI9yYBkxMFg5OQjdkgRDeAZIMunE3i5/o6b+UWLIndMcKUjc Iqgk= X-Gm-Gg: ASbGncu92On7+ug1EyNwknhtLxjiCa5nANN9jPxKww0DyopFRx49JSEPQq+esmWUy9y UA7k/aQOYvmQFW7Lwpva61nG4GJeKS/HbJDF/ou9KppKSWHCjhDqjonrG3g2oYjIL3yrO5+2Kf2 EFJiSgd7uzzTSeO1Ti8mEtVu/LaUlgGmzIjtRBLWCDyLjY4QHG/dhwmRRwaIgTJ5WgCmkbIKyIJ jfBFX9tKqmSLDKf5EbGieC5GpZ3O/NiKj3sNStPYmrjWmBCkmfsRHp0TgeXk/WHZy5yf2b2mQCs Po2pHoHiQ2fv7ZoHz6mVkpxwcGGhWSaqk1S/h9dfbNS4nxJQKWM0Ay/n/1/62xgzKmzF905ggCX zxcHoLSoKbSmTPzm/WRM= X-Received: by 2002:a5d:6da2:0:b0:38f:451b:653c with SMTP id ffacd0b85a97d-3911f72fe43mr5891315f8f.7.1741276188481; Thu, 06 Mar 2025 07:49:48 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3912c103035sm2380215f8f.88.2025.03.06.07.49.47 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 06 Mar 2025 07:49:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL 29/54] target/microblaze: Consider endianness while translating code Date: Thu, 6 Mar 2025 16:47:11 +0100 Message-ID: <20250306154737.70886-30-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250306154737.70886-1-philmd@linaro.org> References: <20250306154737.70886-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/54] qemu/compiler: Absorb 'clang-tsa.h'
|
expand
|
diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index f6879eee352..e44ddd53078 100644 --- a/target/microblaze/cpu.h +++ b/target/microblaze/cpu.h @@ -414,6 +414,13 @@ void mb_translate_code(CPUState *cs, TranslationBlock *tb, /* Ensure there is no overlap between the two masks. */ QEMU_BUILD_BUG_ON(MSR_TB_MASK & IFLAGS_TB_MASK); +static inline bool mb_cpu_is_big_endian(CPUState *cs) +{ + MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs); + + return !cpu->cfg.endi; +} + static inline void cpu_get_tb_cpu_state(CPUMBState *env, vaddr *pc, uint64_t *cs_base, uint32_t *flags) { diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index b5389d65b2e..b54e5ac4b2f 100644 --- a/target/microblaze/translate.c +++ b/target/microblaze/translate.c @@ -710,7 +710,7 @@ static void record_unaligned_ess(DisasContext *dc, int rd, static inline MemOp mo_endian(DisasContext *dc) { - return MO_TE; + return dc->cfg->endi ? MO_LE : MO_BE; } static bool do_load(DisasContext *dc, int rd, TCGv addr, MemOp mop, @@ -1647,7 +1647,8 @@ static void mb_tr_translate_insn(DisasContextBase *dcb, CPUState *cs) dc->tb_flags_to_set = 0; - ir = translator_ldl(cpu_env(cs), &dc->base, dc->base.pc_next); + ir = translator_ldl_swap(cpu_env(cs), &dc->base, dc->base.pc_next, + mb_cpu_is_big_endian(cs) != TARGET_BIG_ENDIAN); if (!decode(dc, ir)) { trap_illegal(dc, true); }