<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hi,<div><br></div><div>I encountered an issue with inline assembly in my c files compiled with llvmc.</div><div><br></div><div>When I have a push instruction in the inline assembly like:</div><div><br></div><div><span style="font-family: 'Times New Roman'; font-size: 12pt; background-color: rgb(255, 255, 255); "> </span><span style="font-size: 10pt; ">__asm__ volatile (</span></div><div> "push {r4}\n\t"</div><div> );</div><div><br></div><div>the compiler will drop the curly braces and leave it in the generated assembly file as:</div><div><div> push r4</div></div><div><br></div><div>And this is non-conformant with the ARM assembly <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0204j/Babefbce.html">synta!
x</a> for push and pop.</div><div><br></div><div>Is there any ways to resolve or overcome that? I need to keep the assembly inline, and not move it to the .s files.</div><div><br></div><div>I used the following llvmc:</div><div><div> llvm version 2.9</div><div> Optimized build.</div><div> Built Sep 8 2011 (11:43:28).</div><div> Host: i386-pc-linux-gnu</div><div> Host CPU: core2</div></div><div><br></div><div>Using the following flags:</div><div>-Wllc,="-mtriple=arm-linux-eabi" -fmessage-length=0 -std=c99 -Wno-trigraphs -O3 -fpic -Wreturn-type -Wunused-variable -fvisibility=hidden -D__ARM_EABI__ -DANDROID -isysroot/usr/local/android/android-ndk-r6b/platforms/android-8/arch-arm </div><div><br></div><div>Thanks a lot,</div><div>Moshe</div> </div></body>
</html>