Re: asm operand requires impossible reload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lars Poeschel <larsi@xxxxxxxxxxxxxxxxx> writes:

> I have the following #define:
> 
> #define HAL_DISABLE_INTERRUPTS(_old_)           \
>     register int x ;                            \
>     asm volatile ("st   r1, @-r15 ;\n"          \
>          "mov   ps,     r1 ;\n"                 \
>          "ldi:8 #0x10,  %0 ;\n"                 \
>          "and   r1,     %0 ;\n"                 \
>          "lsr   #1,     %0 ;\n"                 \
>          "ld    @r15+,  r1 ;\n"                 \
>          "andccr #0xef \n"                      \
>          :      "=r" (x)                        \
>         );                                      \
>     (_old_) = (x);
> 
> and then a c-File using this macro.
> When I compile this c-File I get this error in the line, where the macro is 
> used:
> 
> asm operand requires impossible reload
> 
> What does this error message mean ?

It means that the compiler was unable to find a register to use.  It's
a strange error to get for an asm like this.  You may need to put
together a complete small test case.

> If I compile using the -S switch, the generated assembler file looks fine and 
> the inline assembler is inserted right.

That doesn't make sense.  If you get the error without -S, you should
get the error with -S.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux