diff options
author | Kito Cheng <kito.cheng@gmail.com> | 2018-01-10 23:00:38 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2018-01-10 15:00:38 -0800 |
commit | 8cad5b143e23668e4b59596972b2249ce2d2d637 (patch) | |
tree | 25f9cc56191853d6733003431c1a581d6d5f80fa /gcc/tree-ssa.c | |
parent | 3ec62f54062b50d0c9e0ed55f4d83147df56fc92 (diff) | |
download | gcc-8cad5b143e23668e4b59596972b2249ce2d2d637.zip gcc-8cad5b143e23668e4b59596972b2249ce2d2d637.tar.gz gcc-8cad5b143e23668e4b59596972b2249ce2d2d637.tar.bz2 |
RISC-V: Add naked function support.
2018-01-10 Kito Cheng <kito.cheng@gmail.com>
gcc/
* config/riscv/riscv-protos.h (riscv_output_return): New.
* config/riscv/riscv.c (struct machine_function): New naked_p field.
(riscv_attribute_table, riscv_output_return),
(riscv_handle_fndecl_attribute, riscv_naked_function_p),
(riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
(riscv_compute_frame_info): Only compute frame->mask if not a naked
function.
(riscv_expand_prologue): Add early return for naked function.
(riscv_expand_epilogue): Likewise.
(riscv_function_ok_for_sibcall): Return false for naked function.
(riscv_set_current_function): New.
(TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
(TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
* config/riscv/riscv.md (simple_return): Call riscv_output_return.
* doc/extend.texi (RISC-V Function Attributes): New.
Co-Authored-By: Jim Wilson <jimw@sifive.com>
From-SVN: r256462
Diffstat (limited to 'gcc/tree-ssa.c')
0 files changed, 0 insertions, 0 deletions