<div dir="ltr"><div>Hey guys,</div><div><br></div>I am trying to compile <b style="text-decoration-line:underline">x86 assembly code</b> with clang, which gets compiled successfully with -O1 flag but fails with -O0 flag with below-mentioned error:<div><div><font color="#ff0000"><br></font></div><div><font color="#ff0000">inline assembly requires more registers than available</font></div><div><font color="#ff0000">                  "pushl       %%ebx           \n\t"</font></div></div><div><br></div><div><b><u><br></u></b></div><div><b><u>The code snippet is something like:</u></b></div><div><div><br></div><div>__asm__ (</div><div>           "pushl       %%ebx           \n\t"</div><div>             ... // more assembly code </div><div><br></div><div>          : // No Input</div><div><br></div><div>          : // 6 output fields</div><div><br></div><div>          : "%eax", "%ecx", "%esi", "%edi", "memory" // all these clobbers </div><div> );</div></div><div><br></div><div><br></div><div>Does anyone have a clue on how should I debug this issue? </div><div><br></div><div>Note: This assembly code works fine with gcc.</div><div><br></div><div>Thanks. </div><div>Rohit</div></div>