This is an archive of the discontinued LLVM Phabricator instance.

[ms] [llvm-ml] Add support for nested PROC/ENDP pairs
ClosedPublic

Authored by epastor on Aug 9 2022, 2:14 PM.

Details

Summary

This is believed to match behavior by ML.EXE and ML64.EXE.

Diff Detail

Event Timeline

epastor created this revision.Aug 9 2022, 2:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2022, 2:14 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
epastor requested review of this revision.Aug 9 2022, 2:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2022, 2:14 PM
epastor updated this revision to Diff 451601.Aug 10 2022, 12:29 PM

Add tests

epastor updated this revision to Diff 451603.Aug 10 2022, 12:33 PM

Add support for case-insensitive PROC/ENDP matching

thakis accepted this revision.Aug 10 2022, 12:55 PM

Thanks!

I wonder if ml allows nested procs to refer to the parameters of the outer proc – then we'd have to handle activation records like gcc creates them for its nested functions.

But we don't even implement parameters for proc at all, so that's moot for now :)

This revision is now accepted and ready to land.Aug 10 2022, 12:55 PM

Thanks!

I wonder if ml allows nested procs to refer to the parameters of the outer proc – then we'd have to handle activation records like gcc creates them for its nested functions.

But we don't even implement parameters for proc at all, so that's moot for now :)

"Good" news - if you provide arguments to PROC that would require prologue/epilogue support (even if prologues and epilogues are disabled), nesting is suddenly disallowed. This is true if the arguments are provided to the inner PROC, the outer PROC, or both. So this will never come up... when we add parameter support, we'll just need to block nesting when parameters are provided.

epastor updated this revision to Diff 451608.Aug 10 2022, 1:02 PM

Fix a missing negation

This revision was landed with ongoing or failed builds.Aug 11 2022, 7:19 AM
This revision was automatically updated to reflect the committed changes.