# gcc inline assembler syntax



## substrate (Jan 29, 2003)

I'm working on getting transcode (http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/) working under MacOS X. It's a tool for transcoding one video or audio format to another, so for instance you could transcode raw DV from your video camera to MPEG2 or a DVD to DIVX or whatever. It's very feature rich, it was the best solution I found under linux.

It looks like some effort has been put into porting it to MacOS X but it still doesn't work. In addition there seem to be some modules that are optimized for the SIMD extensions on Pentiums or AMD processor but not Altivec.

A lot of modules seem to compile as is, but some of the important ones don't. One thing I noticed is that the assembler syntax (not just the mnemonics or opcodes) is different between Intel and Motorola processers when using inline gcc assembly.

So, if the underlying syntax were the same as gcc on my linux box I'd expect something like:

  vxor %v0, %v0, %v0

but the syntax required on the Apple gcc compiler is:

  vxor v0, v0, v0

If everything were that simple I wouldn't be concerned, but I'd like to see documentation for the syntax used for both gcc (I guess really as) versions.

Does anybody know where I can find this or example code? I'd like to be able to get through these minor details quickly so I can do the important stuff.

Thanks


----------

