This is an archive of the discontinued LLVM Phabricator instance.

MS inline asm: remove obsolete code adding AOK_SizeDirective (e.g. dword ptr)
ClosedPublic

Authored by MaskRay on May 2 2023, 2:51 PM.

Details

Summary

The AOK_SizeDirective part from 5b37c181291210bedfbb7a6af5d51229f3652ef0
(2014-08) seems unneeded nowadays (the root cause has likely been fixed
elsewhere). The part abuses that call dword ptr foo assembles the same way as `call
foo` in Intel syntax, which is going to be fixed (changed) by D149579.

The generated object files for CodeGen/ms-inline-asm-functions.c,
CodeGen/ms-inline-asm-functions.c, and CodeGenCXX/ms-inline-asm-fields.cpp are
unchanged with just this patch.
When D149579 is subsequently applied, the FIXME part of kptr in
CodeGen/ms-inline-asm-functions.c will be fixed.

Diff Detail

Event Timeline

MaskRay created this revision.May 2 2023, 2:51 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 2 2023, 2:51 PM
MaskRay requested review of this revision.May 2 2023, 2:51 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 2 2023, 2:51 PM
hans added a comment.May 3 2023, 5:40 AM

The AOK_SizeDirective part from 5b37c181291210bedfbb7a6af5d51229f3652ef0
(2014-08) seems unneeded nowadays (the root cause has likely been fixed
elsewhere).

Would it be possible to confirm when/if the size directive here became unnecessary?

The AOK_SizeDirective part from 5b37c181291210bedfbb7a6af5d51229f3652ef0
(2014-08) seems unneeded nowadays (the root cause has likely been fixed
elsewhere).

Would it be possible to confirm when/if the size directive here became unnecessary?

I compared the assembled output from C test files. They are identical. (I know it would be best to prove this by fully understanding the logic, but that appears difficult...)

The generated object files for CodeGen/ms-inline-asm-functions.c, CodeGen/ms-inline-asm-functions.c, and CodeGenCXX/ms-inline-asm-fields.cpp are unchanged with just this patch.

When D149579 is subsequently applied, the FIXME part of kptr in CodeGen/ms-inline-asm-functions.c will be fixed.

hans accepted this revision.May 4 2023, 5:40 AM

lgtm

This revision is now accepted and ready to land.May 4 2023, 5:40 AM
This revision was landed with ongoing or failed builds.May 4 2023, 9:42 AM
This revision was automatically updated to reflect the committed changes.