This is an archive of the discontinued LLVM Phabricator instance.

[asm] Allow block address operands in `asm inteldialect`
ClosedPublic

Authored by thakis on Nov 18 2021, 8:41 AM.

Details

Summary

This makes the following program build with -masm=intel:

int foo(int count) {
  asm goto ("dec %0; jb %l[stop]" : "+r" (count) : : : stop);
  return count;
stop:
  return 0;
}

It's also is another step towards merging EmitGCCInlineAsmStr() and
EmitMSInlineAsmStr().

Diff Detail

Event Timeline

thakis created this revision.Nov 18 2021, 8:41 AM
thakis requested review of this revision.Nov 18 2021, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2021, 8:41 AM
thakis added inline comments.Nov 18 2021, 8:41 AM
llvm/test/CodeGen/X86/callbr-asm.ll
61

(changes from here on down are just label renamings. output is generated by utils/update_llc_test_checks.py , so chances are they're right :) )

hans accepted this revision.Nov 19 2021, 6:05 AM

lgtm

This revision is now accepted and ready to land.Nov 19 2021, 6:05 AM
This revision was landed with ongoing or failed builds.Nov 19 2021, 6:27 AM
This revision was automatically updated to reflect the committed changes.