This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
In m68k, FUNCTION_VALUE macro don't work???
- To: <gcc at gcc dot gnu dot org>, <gcc-help at gcc dot gnu dot org>
- Subject: In m68k, FUNCTION_VALUE macro don't work???
- From: "Peng-Sheng Chen" <pschen at puma dot cs dot nthu dot edu dot tw>
- Date: Fri, 9 Jun 2000 18:09:22 +0800
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