asm operand requires impossible reload

Lars Poeschel larsi@wh2.tu-dresden.de
Wed Jan 31 09:41:00 GMT 2007


Hello!

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 ?

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

Thanks,

Lars
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20070131/e462470a/attachment.sig>


More information about the Gcc-help mailing list