Skip to main content
xaviooo
Associate III
June 7, 2007
Question

STR750 and long long 64 bits

  • June 7, 2007
  • 4 replies
  • 1037 views
Posted on June 07, 2007 at 05:08

STR750 and long long 64 bits

This topic has been closed for replies.

4 replies

xaviooo
xavioooAuthor
Associate III
June 6, 2007
Posted on June 06, 2007 at 14:41

Hello,

My question is simple.

Does the STR750 support this :

typedef long long u64 ?

I'm trying to do this :

u32 a;

u32 b;

long long c ;

c = (u32)a * (u32)b;

but it dosen't work...

Thank you for your help.

-Xavier

I'm trying to

[ This message was edited by: Xavio on 07-06-2007 08:32 ]

sjo
Associate III
June 6, 2007
Posted on June 06, 2007 at 16:47

This is down to to compiler not the device, works fine on all the tools i have tried.

What tools are you using ?

It would not help that you are casting your result to 32bits.

Regards

sjo

kleshov
Associate
June 7, 2007
Posted on June 07, 2007 at 03:39

I think what you are trying to do is this:

u32 a, b;

u64 c;

c = (u64)a * (u64)b;

In C, it is assumed that the result of u32*u32 is u32, unless you tell the compiler otherwise.

- mike

xaviooo
xavioooAuthor
Associate III
June 7, 2007
Posted on June 07, 2007 at 05:08

Thank you so much for your answers, it works.