Ok, I tried to translate it to :
define mad_f_mul(x, y) \
({ mad_fixed64hi_t __hi; \
mad_fixed64lo_t __lo; \
mad_fixed_t __result; \
smull (__lo), (__hi), (__result), (x); \
movs (__lo), (__lo), lsr (MAD_F_SCALEBITS); \
adc (__result), (__lo), (__hi), lsl (32 - MAD_F_SCALEBITS); } \
__result; \
})
But doesn't seems to works.
Any idea ?
Thanks
----- Original Message -----
From: "Chris Apers" <[EMAIL PROTECTED]>
To: "PACE Native Object Forum" <[EMAIL PROTECTED]>
Sent: Wednesday, November 09, 2005 12:40 PM
Subject: Assembler help needed
> Hi,
>
> I'm trying to convert some GCC asm to CW asm.
> It seems that GCC has many optimization options. Does CW compiler
> do them implicitely ?
>
> for example :
>
> # define mad_f_mul(x, y) \
> ({ mad_fixed64hi_t __hi; \
> mad_fixed64lo_t __lo; \
> mad_fixed_t __result; \
> asm ("smull %0, %1, %3, %4\n\t" \
> "movs %0, %0, lsr %5\n\t" \
> "adc %2, %0, %1, lsl %6" \
> : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \
> : "%r" (x), "r" (y), \
> "M" (MAD_F_SCALEBITS), "M" (32 - MAD_F_SCALEBITS) \
> : "cc"); \
> __result; \
> })
>
> Can this be converted easily ?
>
> Thanks
> Chris
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/