c34ad45992
The test in tests/avocado/machine_loongarch.py is currently failing on big endian hosts like s390x. By comparing the traces between running the QEMU_EFI.fd bios on a s390x and on a x86 host, it's quickly obvious that the CSRRD instruction for the CPUID is behaving differently. And indeed: The code currently does a long read (i.e. 64 bit) from the address that points to the CPUState->cpu_index field (with tcg_gen_ld_tl() in the trans_csrrd() function). But this cpu_index field is only an "int" (i.e. 32 bit). While this dirty pointer magic works on little endian hosts, it of course fails on big endian hosts. Fix it by using a proper helper function instead. Message-Id: <20230720175307.854460-1-thuth@redhat.com> Reviewed-by: Song Gao <gaosong@loongson.cn> Signed-off-by: Thomas Huth <thuth@redhat.com> |
||
---|---|---|
.. | ||
trans_arith.c.inc | ||
trans_atomic.c.inc | ||
trans_bit.c.inc | ||
trans_branch.c.inc | ||
trans_extra.c.inc | ||
trans_farith.c.inc | ||
trans_fcmp.c.inc | ||
trans_fcnv.c.inc | ||
trans_fmemory.c.inc | ||
trans_fmov.c.inc | ||
trans_lsx.c.inc | ||
trans_memory.c.inc | ||
trans_privileged.c.inc | ||
trans_shift.c.inc |