[LLVMdev] inline asm constraints examples/tests

John Thompson john.thompson.jtsoftware at gmail.com
Tue Sep 21 15:24:07 PDT 2010


Thanks, Dale.  I guess this also means I should be running the gcc tests in
x86-64 mode.  I'm giving that a spin on my Linux box.

Is Daniel going to package it up with a configure and so forth and make it
part of the Clang tests, or like the llvm test-suite?

Also, it would be really nice if the gcc tests could run on Windows, and
especially also the LLVM regression tests and projects/test-suite.  At
present, I develop on Windows and then copy a patch over to Linux, as using
command-line GDB is very painful for me

How do you guys debug on your systems?  Is there something comparible to the
Visual Studio debugger?  I've tried a few GDB GUI wrappers I found from
googling a while ago, but I couldn't get any of them to work well enough to
use.
-John
On Tue, Sep 21, 2010 at 2:58 PM, Dale Johannesen <dalej at apple.com> wrote:

>
> On Sep 21, 2010, at 2:45 PMPDT, John Thompson wrote:
>
> > fatal error: error in backend: Ran out of registers during register
> allocation!
> > Please check your inline asm statement for invalid constraints:
> > INLINEASM <es:>, 0, 10, %reg16396<def>, 10, %reg16397<def>, 10,
> %reg16398<def>, 10, %reg16399<def>, 10, %reg16400<def>, 10,
> %reg16401<def>,10, %reg16402<def>, 10, %reg16403<def>, 10, %reg16404<def>,
> 10, %reg16405<def>, 10, %reg16406<def>, 10, %reg16407<def>, 2147483657,
> %EAX, 2147549193, %ECX, 2147614729, %EDX, 2147680265, %ESI, 2147745801,
> %EDI, 2147811337, %EBX, 2147876873, %EBP, 2147942409, %reg16403, 2148007945,
> %reg16404, 2148073481, %reg16405, 2148139017, %reg16406, 2148204553,
> %reg16407, 14, %EFLAGS<earlyclobber,imp-def>, <<badref>>;
> GR32:%reg16396,16397,16398,16399,16400,16401,16402,16403,16404,16405,16406,16407,16403,16404,16405,16406,16407
> > For the code:
> >
> > int a, b, c, d, e, f, g, h, i, j, k, l;
> > void
> > f1 (void)
> > {
> >   __asm__ volatile (""
> >       : [a] "+r" (a), [b] "+r" (b), [c] "+r" (c), [d] "+r" (d),
> >         [e] "+r" (e), [f] "+r" (f), [g] "+r" (g), [h] "+r" (h),
> >         [i] "+r" (i), [j] "+r" (j), [k] "+r" (k), [l] "+r" (l));
> > }
> > This confused me since it doesn't use multiple-alternative constraints,
> meaning it should fall back to the original logic.  I'm thinking this
> problem probably isn't related to my code.  To try to confirm this, I built
> an LLVM tree I had checked out on August 24 (rev 111968) and I see the same
> error.
>
> Yes, this test asks for 12 different registers, so there's no way it could
> pass on x86-32, which has only 6 (at most).
>
>


-- 
John Thompson
John.Thompson.JTSoftware at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100921/b28eae1e/attachment.html>


More information about the llvm-dev mailing list