cancel
Showing results for 
Search instead for 
Did you mean: 

How to get 64bit result from 32 x 32 multiply

jdmallett
Associate II
Posted on May 02, 2009 at 00:36

How to get 64bit result from 32 x 32 multiply

10 REPLIES 10
brunoalltest
Associate II
Posted on May 17, 2011 at 13:10

Quote:

On 01-05-2009 at 14:54, Anonymous wrote:

I have tried the typedef as in brunoalltest's post, however I get a 32 bit result with Ride7. Does the UMULL and SMULL work with inline assembler in Ride7? If so how do I do this?

I´ve just tested the code with crossworks(it uses gcc, just like ride) and the arm7 simulator and it worked just like expected. My cortex-m3 board isn´t with me right now, but I´ve worked with long long casts and cortex-m3 before and it worked just fine.

How are you checking the result? Hope you´re not using printf, it probably won´t support a long long variable. Use a breakpoint and check with the debuger interface instead.