Hi
I am using the 6.1.12 compiler on a DM648 and noticed that my pass-by-reference function was no getting compiled (no assembly) when Optimizations -o1, -o2, or -o3 were used. When I looked at mixed mode, I can see the "C" code and function call assembly for before and after these functions, but none for the two pass-by-reference functions below.
The strange thing is if I uncomment the UTIL_waitloop(), the call by reference functions will now have assembly. Any ideas?
Cheers
--------calls to functions ------------
int sx = 0;
int sy = 0;
int dsx = 0;
int dsy = 0;
//UTIL_waitLoop(1000000); // 1,000,000 = 5 msec
vps->GetStamper().GetIntegratedMotion( info_out_cur.stamp, info_out_cur.prevStamp, sx, sy ); // no assembly
//UTIL_waitLoop(1000000); // 1,000,000 = 5 msec
vps->GetStamper().GetDisplayShift( info_out_cur.prevStamp, dsx, dsy ); // no assembly
VideoFormat::PreShiftFrame( &info_out_cur, sx+dsx, sy+dsy );
VideoFormat::ShiftFrameEven( &info_out_cur );
---------definition ----------------------
void GetDisplayShift( u8 inStamp, int& outX, int& outY ) const;
protected:
void GetIntegratedSceneMotion( u8 inStamp, int& sceneX, int& sceneY ) const;
---------function -----------------------
void FrameStamper::GetIntegratedMotion( u8 curStamp, u8 prevStamp, int& outX, int& outY ) const
{
outX = 0;
outY = 0;
int i = (prevStamp + 1) % (MAX_STAMP+1);
for(;;)
{
outX += m_FrameX[i];
outY += m_FrameY[i];
if( i == curStamp )
break;
i = (i+1)%(MAX_STAMP+1);
}
}
void FrameStamper::GetDisplayShift( u8 inStamp, int& outX, int& outY ) const
{
if( inStamp > MAX_STAMP )
{
outX = 0;
outY = 0;
}
else
{
outX = m_DisplayX[inStamp];
outY = m_DisplayY[inStamp];
}
}