From: Laurent Vivier <laurent@vivier.eu>
To: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: Michael Schmitz <schmitzmic@gmail.com>,
linux-m68k <linux-m68k@lists.linux-m68k.org>,
Debian m68k <debian-68k@lists.debian.org>
Subject: Re: Kernel crash on qemu-m68k-system while building r-cran packages
Date: Sat, 30 May 2020 18:19:17 +0200 [thread overview]
Message-ID: <3777125b-960d-9772-69e3-50bc5132e323@vivier.eu> (raw)
In-Reply-To: <aa55272a-74c9-0583-afce-5a315b7d5401@physik.fu-berlin.de>
Le 30/05/2020 à 17:27, John Paul Adrian Glaubitz a écrit :
> Hi Laurent!
>
> On 5/30/20 5:12 PM, Laurent Vivier wrote:
>> As the package is available, I've been able to reproduce the problem
>> with logs enabled. Apparently the instruction is not decoded correctly:
>>
>> ----------------
>> IN:
>> 0x00016a2c: fmovel #0,%fpsr
>> Disassembler disagrees with translator over instruction decoding
>> Please report this to qemu-devel@nongnu.org
>>
>> OP:
>> ld_i32 tmp0,env,$0xfffffffffffffff0
>> movi_i32 tmp1,$0x0
>> brcond_i32 tmp0,tmp1,lt,$L0
>>
>> ---- 00016a2c 00000000
>> movi_i32 PC,$0x16a2c
>> movi_i32 tmp0,$0x3
>> call raise_exception,$0x0,$0,env,tmp0
>> set_label $L0
>> exit_tb $0x7fc2a0da5643
>>
>> INT 49331: Address Error(0xc) pc=00016a2c sp=3cc91f30 sr=2004
>>
>> I try to fix that...
>
> Ah, cool. Thanks a lot. And sorry for not replying earlier, I missed your
> previous mail.
No problem.
I've investigated and the fmovel with immediate value is not implemented...
The following patch fixes the crash but then I have a soft lockup. IT
needs more investigation.
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 0f80888203d3..c093f6c683e8 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -4936,6 +4936,20 @@ static void gen_op_fmove_fcr(CPUM68KState *env,
DisasContext *s,
gen_store_fcr(s, AREG(insn, 0), mask);
}
return;
+ case 7: /* Immediate */
+ if (REG(insn, 0) == 4) {
+ if (is_write ||
+ (mask != M68K_FPIAR && mask != M68K_FPSR &&
+ mask != M68K_FPCR)) {
+ gen_exception(s, s->base.pc_next, EXCP_ILLEGAL);
+ return;
+ }
+ tmp = tcg_const_i32(read_im32(env, s));
+ gen_store_fcr(s, tmp, mask);
+ tcg_temp_free(tmp);
+ return;
+ }
+ break;
default:
break;
}
Thanks,
Laurent
prev parent reply other threads:[~2020-05-30 16:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-27 9:14 Kernel crash on qemu-m68k-system while building r-cran packages John Paul Adrian Glaubitz
2020-05-27 9:25 ` John Paul Adrian Glaubitz
2020-05-29 23:49 ` Michael Schmitz
2020-05-30 8:58 ` Laurent Vivier
2020-05-30 11:49 ` John Paul Adrian Glaubitz
2020-05-30 15:12 ` Laurent Vivier
2020-05-30 15:27 ` John Paul Adrian Glaubitz
2020-05-30 16:19 ` Laurent Vivier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3777125b-960d-9772-69e3-50bc5132e323@vivier.eu \
--to=laurent@vivier.eu \
--cc=debian-68k@lists.debian.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=schmitzmic@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).