diff options
| -rw-r--r-- | target/arm/helper.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/target/arm/helper.c b/target/arm/helper.c index 4063c8a0b6..18066b0c5d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -7438,15 +7438,22 @@ static void add_cpreg_to_hashtable(ARMCPU *cpu, ARMCPRegInfo *r, */ r->type |= ARM_CP_ALIAS; } - - if (HOST_BIG_ENDIAN && - r->state == ARM_CP_STATE_BOTH && r->fieldoffset) { - r->fieldoffset += sizeof(uint32_t); - } } } /* + * For 32-bit AArch32 regs shared with 64-bit AArch64 regs, + * adjust the field offset for endianness. This had to be + * delayed until banked registers were resolved. + */ + if (HOST_BIG_ENDIAN && + state == ARM_CP_STATE_AA32 && + r->state == ARM_CP_STATE_BOTH && + r->fieldoffset) { + r->fieldoffset += sizeof(uint32_t); + } + + /* * Special registers (ie NOP/WFI) are never migratable and * are not even raw-accessible. */ |