DSP Dilemma and assembly code
Login to reply to this topic.
Thu, 2006-09-28 13:46
Joined: 2006-08-31
Forum posts: 21
Is it possible to use assembly-language programming in gcc?  I have an application I would like to port from the Pocket PC to Symbian phones.  This application requires a highly-optimized integer Fast Fourier Transform, the heart of which is a multiplication of two 32-bit integers, keeping the high-order 32 bits of the 64-bit results.  Normally when you do a TInt * TInt the C compiler emits code that multiplies the two 32-bit integers and keeps the low-order 32 bits of the 64-bit hardware result.  What I did with the Pocket PC version of my program was to run the compile to emit intermediate assembly language code.  In that assemble code I found my multiply and changed one register designation so that the result would be saved from the high-order register of  the product register pair.  Then I ran the assembler to assemble the edited intermediate code.  Is anything like this possible in gcc?  I know I could use Tint64 data types, but that would adversely affect the running time of my Fast Fourier Transform because each 32-bit operand would be promoted to 64-bits and then a full 64-bit by 64-bit multiplication would take place in software, rather than the native 32 x 32 hardware multiply.  My only other choice is to use 16-bit instead of 32-bit values and accept the poorer resolution that comes with using these smaller numbers.

Robert Scott
Ypsilanti, Michigan

Thu, 2006-09-28 14:59
Joined: 2005-11-20
Forum posts: 1321
I think this NewLC article might be interesting for you:
http://www.newlc.com/article.php3?id_article=683

René Brunner

Thu, 2006-09-28 20:34
Joined: 2006-08-31
Forum posts: 21
Wow! Thanks rbrunner.  That is exactly what I needed.  You get an applaud for that.

Robert Scott
Ypsialnti, Michigan
Thu, 2006-09-28 20:50
Joined: 2005-11-20
Forum posts: 1321
Oh, thanks! You're welcome Smiley

René Brunner


copyright 2003-2009 NewLC SARL