This is an archive of the discontinued LLVM Phabricator instance.

[Inline asm][1/3] Fix mangle problem when variable used in inline asm (Revert 2 history bugfix patch)
ClosedPublic

Authored by xiangzhangllvm on Mar 3 2022, 3:02 AM.

Details

Summary

The [1/3] Patch (Current Patch) revert 2 history commits:

[InlineAsm] Connect InlineAsm Memory Operand with its real value not just name

    Revert "[X86][MS-InlineAsm] Make the constraint *m to be simple place holder"
    This patch revert https://reviews.llvm.org/D115225 which mainly
    fix problems intrduced by https://reviews.llvm.org/D113096

    This reverts commit d7c07f60b35f901f5bd9153b11807124a9bdde60.

    Revert "Reland "[X86][MS-InlineAsm] Use exact conditions to recognize MS global variables""
    This patch revert https://reviews.llvm.org/D116090 which fix problem
    intrduced by https://reviews.llvm.org/D115225

    This reverts commit 24c68ea1eb4fc0d0e782424ddb02da9e8c53ddf5.

Back Ground
I encounter serval problems about using Global Value (GV) in inline asm. ( both today and before)
I think it is may be a right time to discuss/fix it.

Simply speaking:
We encounter a mangle problem in inlineasm when it directly use Global Value's name.
D113096 once fix the mangle problem. But it cause some other problems.
D115225 and D116090 reverted the D113096 to fix the new fails.
But it didn't fix the mangle problem in inline asm.

So I create 2 patches to fix it.
One is current patch (only do revert). The other is D120887

More details and Back Ground please refer [2/3] Patch at D120887
The [3/3] Patch will mainly fix some PIC problem

Diff Detail

Event Timeline

xiangzhangllvm created this revision.Mar 3 2022, 3:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 3:02 AM
xiangzhangllvm requested review of this revision.Mar 3 2022, 3:02 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 3 2022, 3:02 AM
xiangzhangllvm retitled this revision from [Inline asm][1/2] Fix mangle problem when variable used in inline asm to [Inline asm][1/2] Fix mangle problem when variable used in inline asm (Revert 2 history bugfix patch).Mar 3 2022, 5:47 PM
xiangzhangllvm edited the summary of this revision. (Show Details)
xiangzhangllvm retitled this revision from [Inline asm][1/2] Fix mangle problem when variable used in inline asm (Revert 2 history bugfix patch) to [Inline asm][1/3] Fix mangle problem when variable used in inline asm (Revert 2 history bugfix patch).Mar 14 2022, 6:05 PM
xiangzhangllvm edited the summary of this revision. (Show Details)
skan accepted this revision.Mar 16 2022, 8:44 PM

LGTM

This revision is now accepted and ready to land.Mar 16 2022, 8:44 PM
This revision was landed with ongoing or failed builds.Mar 23 2022, 6:41 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2022, 6:41 PM