mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-27 07:31:35 +00:00
make functions return pointers in D0 on 68K. See issue #35. *RECOMPILE STRONGLY RECOMMENDED*
This is compatible with MPW and incompatible with Codewarrior.
This commit is contained in:
parent
d7e89e2fd5
commit
c47772e62f
@ -5491,6 +5491,9 @@ m68k_function_value (const_tree valtype, const_tree func_decl_or_type, bool outg
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 1 /* POINTERS_IN_D0 */
|
||||||
|
return gen_rtx_REG (mode, D0_REG);
|
||||||
|
#else
|
||||||
/* If the function returns a pointer, push that into %a0. */
|
/* If the function returns a pointer, push that into %a0. */
|
||||||
if (type && POINTER_TYPE_P (TREE_TYPE (type)) && !outgoing)
|
if (type && POINTER_TYPE_P (TREE_TYPE (type)) && !outgoing)
|
||||||
/* For compatibility with the large body of existing code which
|
/* For compatibility with the large body of existing code which
|
||||||
@ -5513,6 +5516,7 @@ m68k_function_value (const_tree valtype, const_tree func_decl_or_type, bool outg
|
|||||||
return gen_rtx_REG (mode, A0_REG);
|
return gen_rtx_REG (mode, A0_REG);
|
||||||
else
|
else
|
||||||
return gen_rtx_REG (mode, D0_REG);
|
return gen_rtx_REG (mode, D0_REG);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Worker function for TARGET_RETURN_IN_MEMORY. */
|
/* Worker function for TARGET_RETURN_IN_MEMORY. */
|
||||||
|
Loading…
Reference in New Issue
Block a user