[XviD-devel] invalid assembler instruction

Christoph Nägeli chn at kbw.ch
Sun Oct 26 17:16:57 CET 2003


Hi all,

I got a question about some assembler instructions.
In simple_idct.c there are those macros defined:


#if defined(ARCH_IS_PPC)

/* signed 16x16 -> 32 multiply add accumulate */
#define MAC16(rt, ra, rb) \
     asm ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" 
(rb));

/* signed 16x16 -> 32 multiply */
#define MUL16(rt, ra, rb) \
     asm ("mullhw %0, %1, %2" : "=r" (rt) : "r" (ra), "r" (rb));

#else

/* signed 16x16 -> 32 multiply add accumulate */
#define MAC16(rt, ra, rb) rt += (ra) * (rb)

/* signed 16x16 -> 32 multiply */
#define MUL16(rt, ra, rb) rt = (ra) * (rb)

#endif

I never seen the instructions 'maclhw' or 'mullhw' before.
My assembler didn't recognize it and I didn't find those instructions 
in Motorola's 'Programming Environments Manual for 32-Bit 
Implementations of the PowerPC Architecture'.

The second one 'mullhw' looks like a mix of 'mullw' and 'mulhw'...
Could anyone with a ppc compile that?

Regards
Christoph



More information about the XviD-devel mailing list