aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/csky/t-csky-linux
diff options
context:
space:
mode:
authorGeng Qi <gengqi@linux.alibaba.com>2021-05-24 20:22:52 +0800
committerXianmiao Qu <xianmiao_qu@c-sky.com>2021-05-25 14:07:20 +0800
commitdb92bd223e3957ee58b5a0c0fffd8b7766f1def3 (patch)
tree9bab2521612c8753a40a2945c314392efc3541e3 /gcc/config/csky/t-csky-linux
parent637569df03507cfd603d0979652b0a936d9b122d (diff)
downloadgcc-db92bd223e3957ee58b5a0c0fffd8b7766f1def3.zip
gcc-db92bd223e3957ee58b5a0c0fffd8b7766f1def3.tar.gz
gcc-db92bd223e3957ee58b5a0c0fffd8b7766f1def3.tar.bz2
C-SKY: Add fpuv3 instructions and CK860 arch.
gcc/ChangeLog: * config/csky/constraints.md ("W"): New constriant for mem operand with base reg, index register. ("Q"): Renamed and modified "csky_valid_fpuv2_mem_operand" to "csky_valid_mem_constraint_operand" to deal with both "Q" and "W" constraint. ("Dv"): New constraint for const double value that can be used at fmovi instruction. * config/csky/csky-modes.def (HFmode): New mode. * config/csky/csky-protos.h (csky_valid_fpuv2_mem_operand): Rename to "csky_valid_mem_constraint_operand" and support new constraint "W". (csky_get_movedouble_length): New. (fpuv3_output_move): New. (fpuv3_const_double): New. * config/csky/csky.c (csky_option_override): New arch CK860 with fpv3. (decompose_csky_address): Refine. (csky_print_operand): New "CONST_DOUBLE" operand. (csky_output_move): Support fpv3 instructions. (csky_get_movedouble_length): New. (fpuv3_output_move): New. (fpuv3_const_double): New. (csky_emit_compare): Cover float comparsion. (csky_emit_compare_float): Refine. (csky_vaild_fpuv2_mem_operand): Rename to "csky_valid_mem_constraint_operand" and support new constraint "W". (ck860_rtx_costs): New. (csky_rtx_costs): Add the cost calculation of CK860. (regno_reg_class): New vregs for fpuv3. (csky_dbx_regno): Likewise. (csky_cpu_cpp_builtins): New builtin macro for fpuv3. (csky_conditional_register_usage): Suporrot fpuv3. (csky_dwarf_register_span): Suporrot fpuv3. (csky_init_builtins, csky_mangle_type): Support "__fp16" type. (ck810_legitimate_index_p): Support fp16. * config/csky/csky.h (TARGET_TLS): ADD CK860. (CSKY_VREG_P, CSKY_VREG_LO_P, CSKY_VREG_HI_P): Support fpuv3. (TARGET_SINGLE_FPU): Support fpuv3. (TARGET_SUPPORT_FPV3): New. (FIRST_PSEUDO_REGISTER): Change to 202 to hold the new fpuv3 registers. (FIXED_REGISTERS, CALL_REALLY_USED_REGISTERS, REGISTER_NAMES, REG_CLASS_CONTENTS): Support fpuv3. * config/csky/csky.md (movsf): Move to cksy_insn_fpu.md and refine. (csky_movsf_fpv2): Likewise. (ck801_movsf): Likewise. (csky_movsf): Likewise. (movdf): Likewise. (csky_movdf_fpv2): Likewise. (ck801_movdf): Likewise. (csky_movdf): Likewise. (movsicc): Refine. Use "comparison_operatior" instead of "ordered_comparison_operatior". (addsicc): Likewise. (CSKY_FIRST_VFP3_REGNUM, CSKY_LAST_VFP3_REGNUM): New constant. (call_value_internal_vh): New. * config/csky/csky_cores.def (CK860): New arch and cpu. (fpv3_hf): New. (fpv3_hsf): New. (fpv3_sdf): New. (fpv3): New. * config/csky/csky_insn_fpu.md: Refactor. Separate all float patterns into emit-patterns and match-patterns, remain the emit-patterns here, and move the match-patterns to csky_insn_fpuv2.md or csky_insn_fpuv3.md. * config/csky/csky_insn_fpuv2.md: New file for fpuv2 instructions. * config/csky/csky_insn_fpuv3.md: New file and new patterns for fpuv3 isntructions. * config/csky/csky_isa.def (fcr): New. (fpv3_hi): New. (fpv3_hf): New. (fpv3_sf): New. (fpv3_df): New. (CK860): New definition for ck860. * config/csky/csky_tables.opt (ck860): New processors ck860, ck860f. And new arch ck860. (fpv3_hf): New. (fpv3_hsf): New. (fpv3_hdf): New. (fpv3): New. * config/csky/predicates.md (csky_float_comparsion_operator): Delete "geu", "gtu", "leu", "ltu", which will never appear at float comparison. * config/csky/t-csky-elf: Support 860. * config/csky/t-csky-linux: Likewise. * doc/md.texi: Add "Q" and "W" constraints for C-SKY.
Diffstat (limited to 'gcc/config/csky/t-csky-linux')
-rw-r--r--gcc/config/csky/t-csky-linux11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/config/csky/t-csky-linux b/gcc/config/csky/t-csky-linux
index 9435b7a..0730c3a 100644
--- a/gcc/config/csky/t-csky-linux
+++ b/gcc/config/csky/t-csky-linux
@@ -21,11 +21,11 @@
MULTILIB_EXCEPTIONS =
-CSKY_MULTILIB_OSDIRNAMES = mfloat-abi.softfp=/soft-fp mfloat-abi.hard=/hard-fp mfloat-abi.soft=/. mcpu.ck810f=/. mcpu.ck807f=/ck807
+CSKY_MULTILIB_OSDIRNAMES = mfloat-abi.softfp=/soft-fp mfloat-abi.hard=/hard-fp mfloat-abi.soft=/. mcpu.ck810f=/. mcpu.ck807f=/ck807 mcpu.ck860f=/ck860
# Arch variants.
-MULTILIB_OPTIONS += mcpu=ck810f/mcpu=ck807f
-MULTILIB_DIRNAMES += ck810 ck807
+MULTILIB_OPTIONS += mcpu=ck810f/mcpu=ck807f/mcpu=ck860f
+MULTILIB_DIRNAMES += ck810 ck807 ck860
# For ck807.
MULTILIB_MATCHES += mcpu?ck807f=march?ck807
@@ -41,6 +41,11 @@ MULTILIB_MATCHES += mcpu?ck810f=mcpu?ck810vf
MULTILIB_MATCHES += mcpu?ck810f=mcpu?ck810ft
MULTILIB_MATCHES += mcpu?ck810f=mcpu?ck810vft
+# For ck860
+MULTILIB_MATCHES += mcpu?ck860f=march?ck860
+MULTILIB_MATCHES += mcpu?ck860f=mcpu?ck860
+MULTILIB_MATCHES += mcpu?ck860f=mcpu?c860
+
# For option -mfloat-abi=
MULTILIB_OPTIONS += mfloat-abi=soft/mfloat-abi=softfp/mfloat-abi=hard
MULTILIB_DIRNAMES += soft soft-fp hard-fp