]>
git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/riscv/riscv-protos.h
RISC-V: Support -mcmodel=large.
gcc/ChangeLog:
* config/riscv/predicates.md (move_operand): Reject symbolic operands
with a type SYMBOL_FORCE_TO_MEM.
(call_insn_operand): Support for CM_Large.
(pcrel_symbol_operand): New.
* config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Add builtin_define
"__riscv_cmodel_large".
* config/riscv/riscv-opts.h (riscv_code_model): Add CM_LARGE.
* config/riscv/riscv-protos.h (riscv_symbol_type): Add
SYMBOL_FORCE_TO_MEM.
* config/riscv/riscv.cc (riscv_classify_symbol) Support CM_LARGE model.
(riscv_symbol_insns) Add SYMBOL_FORCE_TO_MEM.
(riscv_cannot_force_const_mem): Ditto.
(riscv_split_symbol): Ditto.
(riscv_force_address): Check pseudo reg available before force_reg.
(riscv_size_ok_for_small_data_p): Disable in CM_LARGE model.
(riscv_can_use_per_function_literal_pools_p): New.
(riscv_elf_select_rtx_section): Handle per-function literal pools.
(riscv_output_mi_thunk): Add riscv_in_thunk_func.
(riscv_option_override): Support CM_LARGE model.
(riscv_function_ok_for_sibcall): Disable sibcalls in CM_LARGE model.
(riscv_in_thunk_func): New static.
* config/riscv/riscv.md (unspec): Define UNSPEC_FORCE_FOR_MEM.
(*large_load_address): New.
* config/riscv/riscv.opt (code_model): New.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/large-model.c: New test.