C-SKY: Support -mfloat-abi=hard.
authorJojo R <jiejie_rong@c-sky.com>
Tue, 15 Sep 2020 08:08:01 +0000 (16:08 +0800)
committerXianmiao Qu <xianmiao_qu@c-sky.com>
Wed, 16 Sep 2020 02:13:49 +0000 (10:13 +0800)
commit01d56aeaffa11959278dd6f6f2c1085cac25a345
tree985e7fdf9c0ce505c28a3903d688376f082bcd1c
parent3f3f28de3f62ce6d3b1454d54c4da7569a60e2c6
C-SKY: Support -mfloat-abi=hard.

gcc/ChangeLog:

* config/csky/csky.md (CSKY_NPARM_FREGS): New.
(call_value_internal_vs/d): New.
(untyped_call): New.
* config/csky/csky.h (TARGET_SINGLE_FPU): New.
(TARGET_DOUBLE_FPU): New.
(FUNCTION_VARG_REGNO_P): New.
(CSKY_VREG_MODE_P): New.
(FUNCTION_VARG_MODE_P): New.
(CUMULATIVE_ARGS): Add extra regs info.
(INIT_CUMULATIVE_ARGS): Use csky_init_cumulative_args.
(FUNCTION_ARG_REGNO_P): Use FUNCTION_VARG_REGNO_P.
* config/csky/csky-protos.h (csky_init_cumulative_args): Extern.
* config/csky/csky.c (csky_cpu_cpp_builtins): Support TARGET_HARD_FLOAT_ABI.
(csky_function_arg): Likewise.
(csky_num_arg_regs): Likewise.
(csky_function_arg_advance): Likewise.
(csky_function_value): Likewise.
(csky_libcall_value): Likewise.
(csky_function_value_regno_p): Likewise.
(csky_arg_partial_bytes): Likewise.
(csky_setup_incoming_varargs): Likewise.
(csky_init_cumulative_args): New.

gcc/testsuite/ChangeLog:

* gcc.dg/builtin-apply2.c : Skip if CSKY.
* gcc.dg/torture/stackalign/builtin-apply-2.c : Likewise.
gcc/config/csky/csky-protos.h
gcc/config/csky/csky.c
gcc/config/csky/csky.h
gcc/config/csky/csky.md
gcc/testsuite/gcc.dg/builtin-apply2.c
gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c