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 1029 - Couldn't allocate output reg for contraint 'r' (AMD64)
Summary: Couldn't allocate output reg for contraint 'r' (AMD64)
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Backend: X86 (show other bugs)
Version: 1.9
Hardware: Other Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords: compile-fail
Depends on:
Blocks:
 
Reported: 2006-12-01 11:50 PST by Rafael Ávila de Espíndola
Modified: 2010-02-22 12:54 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments
test.ll (365 bytes, text/plain)
2006-12-04 06:18 PST, Rafael Ávila de Espíndola
Details
add the 64bit registers for the "r" constraint (1007 bytes, patch)
2006-12-04 07:34 PST, Rafael Ávila de Espíndola
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Ávila de Espíndola 2006-12-01 11:50:00 PST
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'!
---------------------------------------------
Comment 1 Rafael Ávila de Espíndola 2006-12-04 06:18:05 PST
Created attachment 498 [details]
test.ll
Comment 2 Rafael Ávila de Espíndola 2006-12-04 07:05:33 PST
setting a breakpoint in SelectionDAGLowering::GetRegistersForValue shows that 
ConstrCode is "r". The code seems to expect that a constraint is braced 
with "{}"....
Comment 3 Rafael Ávila de Espíndola 2006-12-04 07:34:16 PST
Created attachment 499 [details]
add the 64bit registers for the "r" constraint
Comment 4 Chris Lattner 2006-12-04 16:39:22 PST
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