draperlaboratory / fracture

an architecture-independent decompiler to LLVM IR
Other
385 stars 47 forks source link

visit ARM::CMP #17

Open skintigh opened 10 years ago

skintigh commented 10 years ago

The compare type isn't determined by the cmp instruction in ARM, so need to peek at the user(s) of the function before doing anything. This is going to cause havoc in weird code like:

cmp x, y
ldrne ...
ldrgt ...
ldrlt ...

We need some sort of global state where the last cmp instruction gets pointed to. We also have to figure out how to handle CopyToReg?'s into the %CPSR register when this happens.