DSPRelated.com
Forums

Load/store 32bit value

Started by rani thayammal June 27, 2003
Hi All,

I am working on optimization of G.726 codec on C54x processor .
I am facing problem while loading long value (32 bit)from memory
.
DLD instruction need even adrress to load it correctly.
my code of laoding this value is given below LD *sp(3),16,A
OR *sp(4),A
but for laoding negative value
for example *sp(3)=>FFFF
*sp(4)=>FD40
It is saturating to 0x7fffffff.

It is not possible to keep all Long variables in even address .

can anybody help me solving this problem .

Thanks in advance .

Best regards
Rani

___________________________________________________
Click below to experience Sooraj Barjatya's latest offering
'Main Prem Ki Diwani Hoon' starring Hrithik Roshan,
Abhishek Bachchan & Kareena Kapoor http://www.mpkdh.com



Rani Thayammal-

> I am working on optimization of G.726 codec on C54x processor .
> I am facing problem while loading long value (32 bit)from memory
> .
> DLD instruction need even adrress to load it correctly.
> my code of laoding this value is given below
>
> LD *sp(3),16,A
> OR *sp(4),A
> but for laoding negative value
> for example *sp(3)=>FFFF
> *sp(4)=>FD40
> It is saturating to 0x7fffffff.
>
> It is not possible to keep all Long variables in even address .

Why not? The C5xxx C compiler does this. It ANDs the stack pointer with 0xFFFE
whenever necessary prior to placing long data on the stack.

Jeff Brower
system engineer
Signalogic