Thank you, my mistake as I have not read specifications in detail. I did some solution in assembly (inline function mul16 which multiplies two 16bit integers and returns 32bit integer and uses hw multiplier).
-- Miloslav > On 02/19/2012 01:43 PM, Miloslav Semler wrote: > >> Which is wrong for me as it discards high word from result (RESHI is not >> copied, instead it is used an sign extension). Routine div32768 accepts >> 32bit signed integer. >> >> > You seem to be complaining that a 16X16 multiply returns only a 16 bit > result. This is standard across all C compilers. > > > If you need a 32 bit result you have two options: > > 1) Promote one or both arguments to 32 bits to force a 32X32 multiply > with a 32 bit result. > 2) Roll your own code if you need something faster. > > It is possible that buried somewhere in the standard library is a > function that does this but I have never seen one. > > > ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users