From nobody Sat Nov 29 10:46:34 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1764193631; cv=none; d=zohomail.com; s=zohoarc; b=HV8sLof6DXuK08sciseV1RDVme3Jen2frSPXlwmAMPJ6klzNjG/qRlb9/VlFpJ+YIsmw+iwvUfje9EqujvueukgzYo6/BlLI6Cx2Ov6cOKOSMGppQlQNwgtDTtR5llqtR5UNs46jORL9vx00OeI2jglhDVJ+RVQH99Kyd+Eep5M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1764193631; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OWYkx3YUV2r5XP/TpYmiIMZC5Qw2jmeZIu0kQf7aT+g=; b=eoyg8AjTUENSmpkX01+7Fekom9yvvOqz6m6OfBt/NxrEzUqISjx+OfyNldLHoAOSDDcbl4GDtmUajuhf7k1mExZgJX+Vy0KgXLSPFQ9K6pLO5zeYeqSJNEFb4V9jRvvko/NgTQ+7HIFQ8lO3P4IU2AhpnR04ajijq1pgjAjAPVc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1764193631901279.5848860709617; Wed, 26 Nov 2025 13:47:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vOM2W-0002uf-4A; Wed, 26 Nov 2025 15:23:00 -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 ) id 1vOM2T-0002tW-IS for qemu-devel@nongnu.org; Wed, 26 Nov 2025 15:22:57 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vOM2Q-0002OR-8c for qemu-devel@nongnu.org; Wed, 26 Nov 2025 15:22:57 -0500 Received: by mail-wm1-x342.google.com with SMTP id 5b1f17b1804b1-4777771ed1aso573275e9.2 for ; Wed, 26 Nov 2025 12:22:53 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4790b0cc39csm63570975e9.14.2025.11.26.12.22.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 26 Nov 2025 12:22:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764188572; x=1764793372; 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=OWYkx3YUV2r5XP/TpYmiIMZC5Qw2jmeZIu0kQf7aT+g=; b=sFE/wuBE0+rot1Ck1NqnfHdA/fxxz1UyvfCIH8Ql3C85WTImablNFcaZ5fgu5NVcCD Xbjwg1Q3Om3GktL6R5EPnkaRmzNmf3TPofWPuNfO8VbyIJZ0FDHPocYTSANChAHdiBmA svc6cGilIKcRpOwVJ+GvjyBZztVvQwYI49lhbjSYd7H8Pcp/42j6bSZfJM1Np6pAuz6n 5vPC1a4vDIoPaPi7nxvVSjYFCQHplkweIATubz5Vik+A1haWkEaO7ri8c3T0v7BsxGp0 Ss58HwvzHKY3v74Qq/gJVYt1l75xG3ubOsLS76kczEDsJOLwwoxNgabyd+R278Klyy5T b4mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764188572; x=1764793372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=OWYkx3YUV2r5XP/TpYmiIMZC5Qw2jmeZIu0kQf7aT+g=; b=i1GLvTLFovj4n9yhsnG5+4vEvPYDiPlZstUdr4bSyVQnsH7ns46ERHVXqpCbe5dC86 +QNcvZY39KepLazC49eXoBaMemj4CWqiOEnE8N2mwM1dYR1APcWVtErphCzX3s99x+Wu TWeo/sRkMB3eNfORbbuy3jBCLbaQfAKy+LElA3gMde8L7Yqk6Sc5HQ7aFJz590LPoRL8 +ucnpN/90xBhZP4aOZ30mgJ1X3s8vqiEh1iV8/YCOEvuV5nzuqWsLTSv048H5U14cZ82 Chlgrk0tIXcB0CaZRqwPk4U3i9PY5fK/XVeBuSJkeeyKU9cjsaMnnFKr3TadPvwYjyFo QVPg== X-Gm-Message-State: AOJu0YwS85Gd83T7iHccmLIsaKWdKla+l4fD55cxpp/R8L64ccB1J8yn LNVpBeVAAwz4k9lDq8caWQxodk5Ipowk+rnduKCMIsCUqr1kF3SFKRPxnlrnhV57UJ7rWbbECni quop/YE8rKX92pxI= X-Gm-Gg: ASbGncteBWlkdSD+N9DZTpJ3a7IJH+2ZczY8RgCNtz9aZrLVPvkaXIht1TA7Aagej1s i0DJP4l7d2e0CpGldIPp8ECjyYUKORoj+L0oOzMz6Esr4QsGA4VYBB892hvhlPdgLVBC2azsJ1d 0EkvBduldPhEJgNLQnyOyryM/bgpBX5/iev2lpoYuM4G+4zPk5zxeRkiyj6j65P+bBRqJw5Le7F tvnGE/9oP3wZxhvilVOojAMcafc21lZ6z+kgFv0aijyK5gQlveTmoAitRjweyc0VAuZvJGQcnAh XG/vnruQUPwsXcSZfmG5wPc1qMtIIlAWQ7+lZWF8EfSWfGLxHK8DETm+Hq8tqCA/CB588lOsyFh lcl4fJR+4VXU7P/AFc8vuqI8h/ptLSq8Gz/OAvPsUhB0X/rJJ1C7rPP0FJpLJRU5/bvps7OIKMO x/IRYrVH7EpZ3XXOjbDBUW/TLDcI1fnw+3i7LOw/3+W7VUkVtowE7u7f6Hq/kK X-Google-Smtp-Source: AGHT+IE/7wGYmgKgkdMa2z7T7ptr7EW7DFy49I3i+RyWw0nOPexic4pYWI/hRSYj5cNDF4eEU8q1WQ== X-Received: by 2002:a05:600c:1f0f:b0:456:1a69:94fa with SMTP id 5b1f17b1804b1-477c017ba5amr200908905e9.13.1764188572329; Wed, 26 Nov 2025 12:22:52 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Subject: [PATCH-for-11.0 v3 07/22] target/m68k: Use big-endian variant of cpu_ld/st_data*() Date: Wed, 26 Nov 2025 21:21:43 +0100 Message-ID: <20251126202200.23100-8-philmd@linaro.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251126202200.23100-1-philmd@linaro.org> References: <20251126202200.23100-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=philmd@linaro.org; helo=mail-wm1-x342.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1764193632732019200 We only build the M68k target using big endianness order, therefore the cpu_ld/st_data*() definitions expand to the big endian declarations. Use the explicit big-endian variants. Mechanical change running: $ tgt=3Dm68k; \ end=3Dbe; \ for op in data mmuidx_ra; do \ for ac in uw sw l q; do \ sed -i -e "s/cpu_ld${ac}_${op}/cpu_ld${ac}_${end}_${op}/" \ $(git grep -l cpu_ target/${tgt}/); \ done; for ac in w l q; do \ sed -i -e "s/cpu_st${ac}_${op}/cpu_st${ac}_${end}_${op}/" \ $(git grep -l cpu_ target/${tgt}/); \ done; done Then adapting indentation in do_stack_frame() to pass checkpatch.pl. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/m68k/fpu_helper.c | 12 +++--- target/m68k/op_helper.c | 91 ++++++++++++++++++++-------------------- 2 files changed, 52 insertions(+), 51 deletions(-) diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index 56012863c85..f49f841d489 100644 --- a/target/m68k/fpu_helper.c +++ b/target/m68k/fpu_helper.c @@ -510,8 +510,8 @@ static int cpu_ld_floatx80_ra(CPUM68KState *env, uint32= _t addr, FPReg *fp, uint32_t high; uint64_t low; =20 - high =3D cpu_ldl_data_ra(env, addr, ra); - low =3D cpu_ldq_data_ra(env, addr + 4, ra); + high =3D cpu_ldl_be_data_ra(env, addr, ra); + low =3D cpu_ldq_be_data_ra(env, addr + 4, ra); =20 fp->l.upper =3D high >> 16; fp->l.lower =3D low; @@ -522,8 +522,8 @@ static int cpu_ld_floatx80_ra(CPUM68KState *env, uint32= _t addr, FPReg *fp, static int cpu_st_floatx80_ra(CPUM68KState *env, uint32_t addr, FPReg *fp, uintptr_t ra) { - cpu_stl_data_ra(env, addr, fp->l.upper << 16, ra); - cpu_stq_data_ra(env, addr + 4, fp->l.lower, ra); + cpu_stl_be_data_ra(env, addr, fp->l.upper << 16, ra); + cpu_stq_be_data_ra(env, addr + 4, fp->l.lower, ra); =20 return 12; } @@ -533,7 +533,7 @@ static int cpu_ld_float64_ra(CPUM68KState *env, uint32_= t addr, FPReg *fp, { uint64_t val; =20 - val =3D cpu_ldq_data_ra(env, addr, ra); + val =3D cpu_ldq_be_data_ra(env, addr, ra); fp->d =3D float64_to_floatx80(*(float64 *)&val, &env->fp_status); =20 return 8; @@ -545,7 +545,7 @@ static int cpu_st_float64_ra(CPUM68KState *env, uint32_= t addr, FPReg *fp, float64 val; =20 val =3D floatx80_to_float64(fp->d, &env->fp_status); - cpu_stq_data_ra(env, addr, *(uint64_t *)&val, ra); + cpu_stq_be_data_ra(env, addr, *(uint64_t *)&val, ra); =20 return 8; } diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index e9c20a8e032..7139a8445d4 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -32,8 +32,8 @@ static void cf_rte(CPUM68KState *env) uint32_t fmt; =20 sp =3D env->aregs[7]; - fmt =3D cpu_ldl_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); - env->pc =3D cpu_ldl_mmuidx_ra(env, sp + 4, MMU_KERNEL_IDX, 0); + fmt =3D cpu_ldl_be_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); + env->pc =3D cpu_ldl_be_mmuidx_ra(env, sp + 4, MMU_KERNEL_IDX, 0); sp |=3D (fmt >> 28) & 3; env->aregs[7] =3D sp + 8; =20 @@ -48,13 +48,13 @@ static void m68k_rte(CPUM68KState *env) =20 sp =3D env->aregs[7]; throwaway: - sr =3D cpu_lduw_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); + sr =3D cpu_lduw_be_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp +=3D 2; - env->pc =3D cpu_ldl_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); + env->pc =3D cpu_ldl_be_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp +=3D 4; if (m68k_feature(env, M68K_FEATURE_EXCEPTION_FORMAT_VEC)) { /* all except 68000 */ - fmt =3D cpu_lduw_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); + fmt =3D cpu_lduw_be_mmuidx_ra(env, sp, MMU_KERNEL_IDX, 0); sp +=3D 2; switch (fmt >> 12) { case 0: @@ -250,12 +250,12 @@ static void cf_interrupt_all(CPUM68KState *env, int i= s_hw) /* ??? This could cause MMU faults. */ sp &=3D ~3; sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, retaddr, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, retaddr, MMU_KERNEL_IDX, 0); sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, fmt, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, fmt, MMU_KERNEL_IDX, 0); env->aregs[7] =3D sp; /* Jump to vector. */ - env->pc =3D cpu_ldl_mmuidx_ra(env, env->vbr + vector, MMU_KERNEL_IDX, = 0); + env->pc =3D cpu_ldl_be_mmuidx_ra(env, env->vbr + vector, MMU_KERNEL_ID= X, 0); =20 do_plugin_vcpu_interrupt_cb(cs, retaddr); } @@ -270,24 +270,25 @@ static inline void do_stack_frame(CPUM68KState *env, = uint32_t *sp, switch (format) { case 4: *sp -=3D 4; - cpu_stl_mmuidx_ra(env, *sp, env->pc, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, *sp, env->pc, MMU_KERNEL_IDX, 0); *sp -=3D 4; - cpu_stl_mmuidx_ra(env, *sp, addr, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, *sp, addr, MMU_KERNEL_IDX, 0); break; case 3: case 2: *sp -=3D 4; - cpu_stl_mmuidx_ra(env, *sp, addr, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, *sp, addr, MMU_KERNEL_IDX, 0); break; } *sp -=3D 2; - cpu_stw_mmuidx_ra(env, *sp, (format << 12) + (cs->exception_index = << 2), - MMU_KERNEL_IDX, 0); + cpu_stw_be_mmuidx_ra(env, *sp, + (format << 12) + (cs->exception_index << 2), + MMU_KERNEL_IDX, 0); } *sp -=3D 4; - cpu_stl_mmuidx_ra(env, *sp, retaddr, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, *sp, retaddr, MMU_KERNEL_IDX, 0); *sp -=3D 2; - cpu_stw_mmuidx_ra(env, *sp, sr, MMU_KERNEL_IDX, 0); + cpu_stw_be_mmuidx_ra(env, *sp, sr, MMU_KERNEL_IDX, 0); } =20 static void m68k_interrupt_all(CPUM68KState *env, int is_hw) @@ -346,49 +347,49 @@ static void m68k_interrupt_all(CPUM68KState *env, int= is_hw) env->mmu.fault =3D true; /* push data 3 */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* push data 2 */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* push data 1 */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 1 / push data 0 */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 1 address */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 2 data */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 2 address */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 3 data */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 3 address */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); /* fault address */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); /* write back 1 status */ sp -=3D 2; - cpu_stw_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stw_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 2 status */ sp -=3D 2; - cpu_stw_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stw_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* write back 3 status */ sp -=3D 2; - cpu_stw_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); + cpu_stw_be_mmuidx_ra(env, sp, 0, MMU_KERNEL_IDX, 0); /* special status word */ sp -=3D 2; - cpu_stw_mmuidx_ra(env, sp, env->mmu.ssw, MMU_KERNEL_IDX, 0); + cpu_stw_be_mmuidx_ra(env, sp, env->mmu.ssw, MMU_KERNEL_IDX, 0); /* effective address */ sp -=3D 4; - cpu_stl_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); + cpu_stl_be_mmuidx_ra(env, sp, env->mmu.ar, MMU_KERNEL_IDX, 0); =20 do_stack_frame(env, &sp, 7, oldsr, 0, env->pc); env->mmu.fault =3D false; @@ -436,7 +437,7 @@ static void m68k_interrupt_all(CPUM68KState *env, int i= s_hw) =20 env->aregs[7] =3D sp; /* Jump to vector. */ - env->pc =3D cpu_ldl_mmuidx_ra(env, env->vbr + vector, MMU_KERNEL_IDX, = 0); + env->pc =3D cpu_ldl_be_mmuidx_ra(env, env->vbr + vector, MMU_KERNEL_ID= X, 0); =20 do_plugin_vcpu_interrupt_cb(cs, last_pc); } @@ -784,11 +785,11 @@ void HELPER(cas2w)(CPUM68KState *env, uint32_t regs, = uint32_t a1, uint32_t a2) int16_t l1, l2; uintptr_t ra =3D GETPC(); =20 - l1 =3D cpu_lduw_data_ra(env, a1, ra); - l2 =3D cpu_lduw_data_ra(env, a2, ra); + l1 =3D cpu_lduw_be_data_ra(env, a1, ra); + l2 =3D cpu_lduw_be_data_ra(env, a2, ra); if (l1 =3D=3D c1 && l2 =3D=3D c2) { - cpu_stw_data_ra(env, a1, u1, ra); - cpu_stw_data_ra(env, a2, u2, ra); + cpu_stw_be_data_ra(env, a1, u1, ra); + cpu_stw_be_data_ra(env, a2, u2, ra); } =20 if (c1 !=3D l1) { @@ -845,11 +846,11 @@ static void do_cas2l(CPUM68KState *env, uint32_t regs= , uint32_t a1, uint32_t a2, } } else { /* We're executing in a serial context -- no need to be atomic. */ - l1 =3D cpu_ldl_data_ra(env, a1, ra); - l2 =3D cpu_ldl_data_ra(env, a2, ra); + l1 =3D cpu_ldl_be_data_ra(env, a1, ra); + l2 =3D cpu_ldl_be_data_ra(env, a2, ra); if (l1 =3D=3D c1 && l2 =3D=3D c2) { - cpu_stl_data_ra(env, a1, u1, ra); - cpu_stl_data_ra(env, a2, u2, ra); + cpu_stl_be_data_ra(env, a1, u1, ra); + cpu_stl_be_data_ra(env, a2, u2, ra); } } =20 @@ -951,12 +952,12 @@ static uint64_t bf_load(CPUM68KState *env, uint32_t a= ddr, int blen, case 0: return cpu_ldub_data_ra(env, addr, ra); case 1: - return cpu_lduw_data_ra(env, addr, ra); + return cpu_lduw_be_data_ra(env, addr, ra); case 2: case 3: - return cpu_ldl_data_ra(env, addr, ra); + return cpu_ldl_be_data_ra(env, addr, ra); case 4: - return cpu_ldq_data_ra(env, addr, ra); + return cpu_ldq_be_data_ra(env, addr, ra); default: g_assert_not_reached(); } @@ -970,14 +971,14 @@ static void bf_store(CPUM68KState *env, uint32_t addr= , int blen, cpu_stb_data_ra(env, addr, data, ra); break; case 1: - cpu_stw_data_ra(env, addr, data, ra); + cpu_stw_be_data_ra(env, addr, data, ra); break; case 2: case 3: - cpu_stl_data_ra(env, addr, data, ra); + cpu_stl_be_data_ra(env, addr, data, ra); break; case 4: - cpu_stq_data_ra(env, addr, data, ra); + cpu_stq_be_data_ra(env, addr, data, ra); break; default: g_assert_not_reached(); --=20 2.51.0