PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Anybody use linux gcc for ARM PDA/phone?

I'm working on some things and the build target is an ARM based ppc running linux.

I've got no documentation for the compiler that was provided to me, and was curious if arm/linux-gcc is a common compiler or what. Mostly hoping to find documentation on any inline assembly functionality this specific version of GCC might have.

If it doesnt support inlining, how do you guys go about writing assembly code and still having it be an inline function?
GCC happily supports inlining. The syntax is kind of strange, but it works well.

A made-up-on-the-spot example:
Code:

int MyFunction(int x, int y, int z)
{
asm volatile("
add %0,%0,%1 ;/* Comments are like this */
add %0,%0,%2 ;/* */
"
:
: "r" (x), "r" (y), "r" (z));

return x; // =(x+y+z)
}


If you want me to dig through my stuff to find a syntax guide, let me know.

Addendum:
<a href="http://www.geocities.com/dylan_cuthbert/asmrules.html">GCC Inline Assembly Rules of Engagement</a>
Thanks, I'll give it a readthrough and try it out.