Skip to content

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

Open
@kittennbfive

Description

@kittennbfive

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions