[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Move cmpi to decodetree causing regression

From: BALATON Zoltan
Subject: Move cmpi to decodetree causing regression
Date: Fri, 18 Jun 2021 02:46:59 +0200 (CEST)


Commit 8f0a4b6a9 (target/ppc: Move cmp/cmpi/cmpl/cmpli to decodetree) breaks AROS on sam460ex (see http://zero.eik.bme.hu/~balaton/qemu/amiga/#aros ) as it seems to have a cmpi instruction with the L bit set that real hardware apparently ignores. Now I'm getting an exception (can be seen on serial when selecting Debug option from AROS boot menu):

[KRN] Exception 6 handler. Context @ ff7fb628, SysBase @ 00a60420, KernelBase @ 
[KRN] SRR0=0124b6c0, SRR1=000af000 DEAR=00000000 ESR=08000000
[KRN] CTR=ff850a24 LR=0124c3dc XER=00000007 CCR=44022844
[KRN] DAR=00000000 DSISR=00000000
[KRN] GPR00=0124f9ec GPR01=012e0f40 GPR02=00a60420 GPR03=0123bd80
[KRN] GPR04=00000001 GPR05=00000000 GPR06=012e0f33 GPR07=00000008
[KRN] GPR08=0123beb0 GPR09=0123274c GPR10=00000004 GPR11=012aa7d8
[KRN] GPR12=01230000 GPR13=00000000 GPR14=0000001e GPR15=01230000
[KRN] GPR16=01232560 GPR17=0123272c GPR18=00000000 GPR19=80000a55
[KRN] GPR20=0123df2c GPR21=0123df3c GPR22=0123df34 GPR23=01232778
[KRN] GPR24=0123de6c GPR25=010f9998 GPR26=01230000 GPR27=00000000
[KRN] GPR28=0105e0b0 GPR29=00000000 GPR30=00000001 GPR31=0123bc60
[KRN] Instruction dump:
[KRN] 0124b6c0: 2c240000 40820008 38800001 80230004

This -----------^^^^^^^^ seems to be cmpi with L bit set.

The commit message mentions this and we've found before that some guests rely on invalid bits being ignored by real hardware, such as 27a3ea7e and 0123d3cb. I think IBM cores generally ignore reserved bits while some other implementations (e.g. from Motorola) may raise exceptions. It would be better to do what hardware does so guest code running on real hardware would also run on QEMU, then have an option for enforcing reserved bits if this is useful for debugging (but just logging with -d guest_errors might be enough for that). However since e500 for example seems to raise exceptions for invalid bits then there should be a switch so that could be connected to a debug option as well.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]