LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 833 - valid inline asm rejected
Summary: valid inline asm rejected
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llvm-gcc (show other bugs)
Version: 1.7
Hardware: All All
: P normal
Assignee: Chris Lattner
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2006-07-18 11:26 PDT by Chris Lattner
Modified: 2019-04-01 13:42 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lattner 2006-07-18 11:26:50 PDT
This:

int G;
int foo(int X) {
        __asm__ __volatile__ ("xchg{l} {%0,%1|%1,%0}"
                              : "=m" (G), "+r" (X) : "m" (G));
  return X;
}

Is rejected with:

asm.c:4: error: Invalid or unsupported inline assembly!

-Chris
Comment 1 Chris Lattner 2006-07-20 12:49:06 PDT
Patch applied to llvm-gcc, but now it crashes in the code generator.
Comment 2 Chris Lattner 2006-07-20 14:04:46 PDT
Fixed.  Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060717/036098.html

Testcase here: CodeGen/X86/2006-07-20-InlineAsm.ll

-Chris