Conversation
rssor
left a comment
There was a problem hiding this comment.
I think there are actually issues that need fixing here, will need to dig a bit deeper. I don't think we can mark BLRL FunctionReturn that aggressively.
The TEMP thing makes me suspect this might warrant something in the core to help with conditional return analysis
Lift lswi and stswi with word-sized memory accesses and exact partial-word handling. Support register wrapping, byte ordering, and PPC64 zero-extension. Combine matching lswi/stswi pairs into a memory-copy intrinsic while preserving loaded registers and respecting basic-block boundaries. Preserve the original LR target and link-register update for blrl. Recognize GOT helpers as contextual returns without decoding trailing data as code, while retaining ordinary indirect calls and fallthrough. Add lifting regression tests for 32/64-bit PowerPC in both endiannesses.
c8406f3 to
609c2e8
Compare
The The core initially treats it as a return, then checks the target through dataflow. If the target is anything other than I get what you're saying in that there is no architectural guarantee that the callee can't branch back through the updated LR and take the fallthrough path, but I don't think that's likely in the case where the call target is |

Adds PowerPC
lswiandstswilifting as memory intrinsics. Fixesblrlhandling so GOT helpers return without decoding trailing data as code, while preserving ordinary indirect calls. I also started a PPCtest_lift.pywith regression tests for these instructions.blrlfix before / after:lswiandstswilifting before / after: