aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/riscv/riscv-protos.h
diff options
context:
space:
mode:
authorLehua Ding <lehua.ding@rivai.ai>2023-09-05 15:44:52 +0800
committerKito Cheng <kito.cheng@sifive.com>2023-09-06 16:11:12 +0800
commit4abcc5009c1ad852e235f368f535c0bf6bfa7697 (patch)
tree68c083f2f1935fa5fe13d2238ba4a8eee356a64f /gcc/config/riscv/riscv-protos.h
parentfdd59c0f73e9e681cd5f4d0eee2dd58d60d8dbe1 (diff)
downloadgcc-4abcc5009c1ad852e235f368f535c0bf6bfa7697.zip
gcc-4abcc5009c1ad852e235f368f535c0bf6bfa7697.tar.gz
gcc-4abcc5009c1ad852e235f368f535c0bf6bfa7697.tar.bz2
RISC-V: Part-3: Output .variant_cc directive for vector function
Functions which follow vector calling convention variant need be annotated by .variant_cc directive according the RISC-V Assembly Programmer's Manual[1] and RISC-V ELF Specification[2]. [1] https://github.com/riscv-non-isa/riscv-asm-manual/blob/master/riscv-asm.md#pseudo-ops [2] https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#dynamic-linking gcc/ChangeLog: * config/riscv/riscv-protos.h (riscv_declare_function_name): Add protos. (riscv_asm_output_alias): Ditto. (riscv_asm_output_external): Ditto. * config/riscv/riscv.cc (riscv_asm_output_variant_cc): Output .variant_cc directive for vector function. (riscv_declare_function_name): Ditto. (riscv_asm_output_alias): Ditto. (riscv_asm_output_external): Ditto. * config/riscv/riscv.h (ASM_DECLARE_FUNCTION_NAME): Implement ASM_DECLARE_FUNCTION_NAME. (ASM_OUTPUT_DEF_FROM_DECLS): Implement ASM_OUTPUT_DEF_FROM_DECLS. (ASM_OUTPUT_EXTERNAL): Implement ASM_OUTPUT_EXTERNAL. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/abi-call-variant_cc.c: New test.
Diffstat (limited to 'gcc/config/riscv/riscv-protos.h')
-rw-r--r--gcc/config/riscv/riscv-protos.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/config/riscv/riscv-protos.h b/gcc/config/riscv/riscv-protos.h
index 7c2bbd9..6dbf6b9 100644
--- a/gcc/config/riscv/riscv-protos.h
+++ b/gcc/config/riscv/riscv-protos.h
@@ -102,6 +102,9 @@ extern bool riscv_split_64bit_move_p (rtx, rtx);
extern void riscv_split_doubleword_move (rtx, rtx);
extern const char *riscv_output_move (rtx, rtx);
extern const char *riscv_output_return ();
+extern void riscv_declare_function_name (FILE *, const char *, tree);
+extern void riscv_asm_output_alias (FILE *, const tree, const tree);
+extern void riscv_asm_output_external (FILE *, const tree, const char *);
extern bool
riscv_zcmp_valid_stack_adj_bytes_p (HOST_WIDE_INT, int);