diff options
author | Kuan-Lin Chen <rufus@andestech.com> | 2023-12-20 10:43:17 -0700 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2023-12-20 10:53:15 -0700 |
commit | d07d0e992232d668ba6c27e15433f7616a69e5b5 (patch) | |
tree | c5d0e648470314adf8d77b68ac13fea855dd3c28 /gcc/cse.cc | |
parent | eef65d60a8bb2e9328fd9d2b6cd869618be4f08e (diff) | |
download | gcc-d07d0e992232d668ba6c27e15433f7616a69e5b5.zip gcc-d07d0e992232d668ba6c27e15433f7616a69e5b5.tar.gz gcc-d07d0e992232d668ba6c27e15433f7616a69e5b5.tar.bz2 |
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.
Diffstat (limited to 'gcc/cse.cc')
0 files changed, 0 insertions, 0 deletions