r256462 - in /trunk/gcc: ChangeLog config/riscv...

wilson@gcc.gnu.org wilson@gcc.gnu.org
Wed Jan 10 23:00:00 GMT 2018


Author: wilson
Date: Wed Jan 10 23:00:38 2018
New Revision: 256462

URL: https://gcc.gnu.org/viewcvs?rev=256462&root=gcc&view=rev
Log:
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.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/riscv/riscv-protos.h
    trunk/gcc/config/riscv/riscv.c
    trunk/gcc/config/riscv/riscv.md
    trunk/gcc/doc/extend.texi



More information about the Gcc-cvs mailing list