This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

long long multiplication issue msp430 ti compiler v4.0.0

Other Parts Discussed in Thread: MSP430F5529

Hi !

I have three global variables :

 unsigned long long ullPresTime_g;
 unsigned long long ullTmp1_g,ullTmp2_g=0x186A0ULL;

Somewhere in my code I have :

{

....

ullPresTime_g=38500;
ullTmp1_g=ullPresTime_g*ullTmp2_g;

which compiles into :

4218 30C6 MOV.W &ullPresTime_g,R8
00485e: 4219 30C8 MOV.W &0x30c8,R9
004862: 421A 30CA MOV.W &0x30ca,R10
004866: 421B 30CC MOV.W &0x30cc,R11
00486a: 421C 30E6 MOV.W &ullTmp2_g,R12
00486e: 421D 30E8 MOV.W &0x30e8,R13
004872: 421E 30EA MOV.W &0x30ea,R14
004876: 421F 30EC MOV.W &0x30ec,R15
00487a: 13B0 984A CALLA #__mpyll_hw32
00487e: 4C82 30DE MOV.W R12,&ullTmp1_g
004882: 4D82 30E0 MOV.W R13,&0x30e0
004886: 4E82 30E2 MOV.W R14,&0x30e2
00488a: 4F82 30E4 MOV.W R15,&0x30e4

before the call to  #__mpyll_hw32 I have

ullTmp2_g (LSB first)
A0 86 01 00 00 00 00 00

and 

ullPresTime_g (LSB first)
64 96 00 00 00 00 00 00

the call to #__mpyll_hw32 returns 

ullTmp1_g (LSB first)
64 96 80 56 16 4F 01 00

instead of 0xE57A5680

I am running on an MSP430F5529.

What am I missing ?

Thanks a lot for your help .

Jean Michel