Skip to content
Snippets Groups Projects
Commit ed1e45b3 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by David Brownell
Browse files

fix pass_condition() LE condition code check


The LE check is obviously buggy (as easily triggered during some
testing), but I didn't audit the rest of the cases.

Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
parent 5535399a
No related branches found
No related tags found
No related merge requests found
...@@ -243,9 +243,9 @@ int pass_condition(uint32_t cpsr, uint32_t opcode) ...@@ -243,9 +243,9 @@ int pass_condition(uint32_t cpsr, uint32_t opcode)
else else
return 0; return 0;
case 0xd: /* LE */ case 0xd: /* LE */
if ((cpsr & 0x40000000) && if ((cpsr & 0x40000000) ||
(((cpsr & 0x80000000) && !(cpsr & 0x10000000)) ((cpsr & 0x80000000) && !(cpsr & 0x10000000))
|| (!(cpsr & 0x80000000) && (cpsr & 0x10000000)))) || (!(cpsr & 0x80000000) && (cpsr & 0x10000000)))
return 1; return 1;
else else
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment