This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Handle generating SEH unwind info for t2STR_PRE/t2LDR_POST
ClosedPublic

Authored by mstorsjo on Mar 30 2023, 3:36 AM.

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 30 2023, 3:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 3:36 AM
mstorsjo requested review of this revision.Mar 30 2023, 3:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 3:36 AM
efriedma accepted this revision.Mar 30 2023, 10:47 AM

Can you stick the testcase into wineh-opcodes.ll?

I'm assuming the load/store ops are getting generated by expanding a PUSH/POP, and not some other transform? (So the offset will actually reliably be 4, in practice?)

Otherwise LGTM.

This revision is now accepted and ready to land.Mar 30 2023, 10:47 AM

Can you stick the testcase into wineh-opcodes.ll?

Oh, right - sure.

I'm assuming the load/store ops are getting generated by expanding a PUSH/POP, and not some other transform? (So the offset will actually reliably be 4, in practice?)

Not sure actually - if looking at the output of -print-after-all here, the t2STR_PRE appears as such directly, not as a transformation of something else - I don't directly see where it comes from (other than printf instrumenting the code in Target/ARM to see which reference to t2STR_PRE gets hit).

I'm assuming the load/store ops are getting generated by expanding a PUSH/POP, and not some other transform? (So the offset will actually reliably be 4, in practice?)

Not sure actually - if looking at the output of -print-after-all here, the t2STR_PRE appears as such directly, not as a transformation of something else - I don't directly see where it comes from (other than printf instrumenting the code in Target/ARM to see which reference to t2STR_PRE gets hit).

Skimming the code, it looks like it's coming out of ARMFrameLowering::emitPushInst... which should be safe in that respect.

I'm assuming the load/store ops are getting generated by expanding a PUSH/POP, and not some other transform? (So the offset will actually reliably be 4, in practice?)

Not sure actually - if looking at the output of -print-after-all here, the t2STR_PRE appears as such directly, not as a transformation of something else - I don't directly see where it comes from (other than printf instrumenting the code in Target/ARM to see which reference to t2STR_PRE gets hit).

Skimming the code, it looks like it's coming out of ARMFrameLowering::emitPushInst... which should be safe in that respect.

Oh, indeed. Thanks for looking into it!

This revision was landed with ongoing or failed builds.Mar 31 2023, 12:27 AM
This revision was automatically updated to reflect the committed changes.