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 10365 - missing support for %cc in inline asm
Summary: missing support for %cc in inline asm
Status: RESOLVED WONTFIX
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Rafael Ávila de Espíndola
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-14 18:42 PDT by Rafael Ávila de Espíndola
Modified: 2011-07-19 20:48 PDT (History)
4 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 Rafael Ávila de Espíndola 2011-07-14 18:42:43 PDT
gcc accepts

void f() {
  __asm__ ( "" : : : "%cc");
}

but clang rejects it with:

unknown register name '%cc' in asm
Comment 1 Rafael Ávila de Espíndola 2011-07-14 19:10:41 PDT
The problem is the '%'. It is not clear if it is intentional that gcc accepts %cc and %memory instead of just "cc" and "memory".
Comment 2 Eli Friedman 2011-07-14 19:58:36 PDT
Eww; nasty regression from r134016.
Comment 3 Eric Christopher 2011-07-14 20:08:07 PDT
Yeah, I don't know that it's intentional. I'm not even quite sure it should be fixed though it's not hard to do so.
Comment 4 Rafael Ávila de Espíndola 2011-07-14 20:22:10 PDT
Where I found this bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=671711

If they are ok with changing the code, I am more than happy to close this as wontfix :-)
Comment 5 Eric Christopher 2011-07-19 19:12:23 PDT
I responded to the mozilla bug since it seems you've been getting some pushback there.
Comment 6 Eric Christopher 2011-07-19 20:48:34 PDT
And it looks like mozilla has changed their code :)