public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* In m68k, FUNCTION_VALUE macro don't work???
@ 2000-06-09  3:06 Peng-Sheng Chen
  0 siblings, 0 replies; only message in thread
From: Peng-Sheng Chen @ 2000-06-09  3:06 UTC (permalink / raw)
  To: gcc, gcc-help


Hello:

    I am working on modifing gcc for 68000.
    I want to change return value of function =>
           if return value size  > 4bytes , then put return value in memory and put address in A1.
           if return value size < 4bytes , then put return value in D0.
    
    Ok. I use two macro=> RETURN_IN_MEMORY and FUNCTION_VALUE
     #undef RETURN_IN_MEMORY
     #define RETURN_IN_MEMORY(type)                                  \
                  ((TYPE_MODE (type) == BLKmode)                      \
                    || AGGREGATE_TYPE_P (type)                            \
                    || (int_size_in_bytes (type) > 4))

     #undef FUNCTION_VALUE
     #define FUNCTION_VALUE (VALTYPE, FUNC)		\
           gen_rtx (REG, TYPE_MODE (VALTYPE),		\
                         (int_size_in_bytes (type) > 4) ? 9 : 0)

     Now, PROBLEMS comes.
     It doesn't work.
     I check FUNCTION_VALUE's VALTYPE, it is always 4-bytes and SImode.
     I can't fininsh the work.
     What is worng during the modification?
     How to do it?
     Thanks very much. Thanks your help.

							Ps. Chen

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-06-09  3:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-09  3:06 In m68k, FUNCTION_VALUE macro don't work??? Peng-Sheng Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).