Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't allocate output reg for contraint 'r' (AMD64) #1401

Closed
llvmbot opened this issue Dec 1, 2006 · 3 comments
Closed

Couldn't allocate output reg for contraint 'r' (AMD64) #1401

llvmbot opened this issue Dec 1, 2006 · 3 comments
Labels
backend:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 1, 2006

Bugzilla Link 1029
Resolution FIXED
Resolved on Feb 22, 2010 12:54
Version 1.9
OS Linux
Attachments test.ll
Reporter LLVM Bugzilla Contributor

Extended Description

the code

void
frame_dummy (void)
{

    void (*register_classes) (void *) = 0;
  __asm ("" : "+r" (register_classes));

}

produces the following error:

Couldn't allocate output reg for contraint 'r'!

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 4, 2006

setting a breakpoint in SelectionDAGLowering::GetRegistersForValue shows that
ConstrCode is "r". The code seems to expect that a constraint is braced
with "{}"....

@llvmbot
Copy link
Collaborator Author

llvmbot commented Dec 4, 2006

@lattner
Copy link
Collaborator

lattner commented Dec 5, 2006

Patch applied, thanks Rafael!

Patch here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20061204/040773.html

Testcase here: Regression/CodeGen/X86/x86-64-asm.ll

-Chris

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
clementval added a commit to clementval/llvm-project that referenced this issue Jan 26, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:X86 bugzilla Issues migrated from bugzilla compile-fail Use [accepts-invalid] and [rejects-valid] instead
Projects
None yet
Development

No branches or pull requests

2 participants