Is there a way to set option for pointer values return from functions, such as in DIAB compiler: X36=1, which allows pointer values to be returned in both register d0 and register a0? The value in a0 is used by the caller. I am using CodeWarrior for ColdFire version 6.4. and my target is MCF5307. My current command line for CodeWarrior compiler is:
set Output_Dir=%SOME_DIR%\Output\
set PEGDEFS=-DPEG_UNICODE=1 -DPEGDOS=1
set TARGET=-proc MCF5307
set CFLAGS=-c -g -inline smart opt l=0 -model far %SOME_INCLUDE_SOURCES% %PEGDEFS%
mwccmcf -o %Output_Dir% %CFLAGS% %TARGET% %1.cpp >> build.err
The reason behind returning pointer values from functions in both register d0 and register a0 is compatibility with third-party tools and libraries. It is available in DIAB compiler and works well with the 3rd party tool that we are using (PEG library and TCP/IP library). Could you please suggest how can I accomplish that?