Skip to content

[ARM32] Unicorn switches endianess / clears CPSR.E when updating flags #2157

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

Open
kittennbfive opened this issue Apr 12, 2025 · 0 comments · May be fixed by #2158
Open

[ARM32] Unicorn switches endianess / clears CPSR.E when updating flags #2157

kittennbfive opened this issue Apr 12, 2025 · 0 comments · May be fixed by #2158

Comments

@kittennbfive
Copy link

Hello again,

i think i have found another bug for ARM32 BIG endian.

Unicorn switches to LITTLE endian when executing subs, ie sub with updating the flags (like carry, zero, ...). This should not happen in my opinon.

Please consider the attached testcase.

Real output:

start test1
before: CPSR 0x400003d3 (E: 1 == BIG endian)
after: CPSR 0x400003d3 (E: 1 == BIG endian)
test1 done

----------

start test2
before: CPSR 0x400003d3 (E: 1 == BIG endian)
after: CPSR 0x00000153 (E: 0 == LITTLE endian) <--------
test2 done

A PR will follow. Please run all the CI tests before merging.

Thank you.

testcase.c.txt

@kittennbfive kittennbfive linked a pull request Apr 12, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant