In m68k, FUNCTION_VALUE macro don't work???
Peng-Sheng Chen
pschen@puma.cs.nthu.edu.tw
Fri Jun 9 03:06:00 GMT 2000
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
More information about the Gcc
mailing list