On 04/04/2016 08:55 AM, Umesh Kalappa wrote:
We are in process of changing the gcc compiler for aarch64 abi ,w.r.t
varargs function arguments handling.
default(LP64) ,where 1,2,4 bytes args are promoted to word size i.e 4
bytes ,we need to change these behaviour to 8 bytes (double word).
we are looking both hooks like PROMOTE_MODE and
TARGET_PROMOTE_FUNCTION_MODE to make the changes.
I think this would work. You just need to promote all modes less than 8
bytes to DImode, instead of the current code that promotes modes smaller
than 4 bytes to SImode. You would do this for the default LP64 type
system, but not for the ILP32 type system.
This would affect all function arguments and locals, which may cause
code size and/or performance issues. You would have to check for that.
Also, this may prevent linking with any 3rd party code compiled by
unmodified gcc, or code compiled with other compilers (e.g. LLVM),
because changing TARGET_PROMOTE_FUNCTION_MODE can cause ABI changes. You
may need to check that also.
Jim