Re: Constraint for inline assembly with one register used for both an input variable and an output variable

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

 



在 2025-6-6 17:11, Xi Ruoyao 写道:
<source>:7:41: error: invalid input constraint '0' in asm
     7 |     __asm__ volatile ("nop" : "+r"(t) : "0"(old));
       |

This is equivalent to

   __asm__ volatile ("nop" : "=r"(t) : "0"(t), "0"(old));

 where the error is obvious.   ---------^-------^


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[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