New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can arm64 big endian support be added? #802
Comments
afaik, Arm64 does not have big-endian implementation. |
i mean there is no real hardware for Arm64 big-endian, so there is no reason to emulate it. |
Hm ok, i've seen various mentions of arm64be though not what hardware it was intended for. Perhaps it is just support that people have added for various things in case something uses arm64be in the future. I don't know how complex the additions were to add the armbe support, but if they were simple enough it might still be worth it for completeness. |
yes i dont mind to support that, as long as there is demand. |
yep, I have added ARM64 big endian support too. here is my code: Thanks. |
thanks @xizhizhang :) |
merged everything, thanks. i also updated CREDITS.TXT with 3c7e299. |
Ok so today I found some time to test arm64be support with a real ELF file and found that it is not working correctly, It seems that arm64 (aka ARMv8 in Aarch64 mode) only supports little endian instructions but can access data as little or big endian. You can get a PDF of the ARMv8 Architecture Reference Manual here: Section B2.6 is for Endian support (page 104 onwards). "Section B2.6.2 Instruction endianness" says: "Section B2.6.3 Data endianness" discusses how data endianess is handled As a test I used some of the prebuild library binaries inside these packs: So can we look at altering the arm64be support in unicorn to only deal with data accesses in big endian but instruction accesses in little endian? |
yes we need to fix the core of arm64 to handle big endian data. should we revert these arm64 bigendian commits? |
I think this is @xizhizhang 's call. |
Yes, we can swap the instructions by just setting dc->bswap_code = 1 at qemu/trarget-arm/translate.c line 11063. |
I see that recently ARM big endian support was added, nice work @xizhizhang !
I was wondering if you might be able to add the relevant changes for ARM64 big endian support too?
That would then cover pretty much all main cases for arm:
armle, armbe, arm64le and arm64be.
The text was updated successfully, but these errors were encountered: