Thanks for your patch! this is generally in good shape, just a few
minor comments :)


> diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
> index 2135dfde9c8..afe486ba47b 100644
> --- a/gcc/doc/extend.texi
> +++ b/gcc/doc/extend.texi
> @@ -6314,6 +6314,18 @@ Permissible values for this parameter are @code{user}, 
> @code{supervisor},
>  and @code{machine}.  If there is no parameter, then it defaults to
>  @code{machine}.
>
> +@cindex @code{riscv_vector_cc} function attribute, RISC-V
> +@item riscv_vector_cc
> +Use this attribute to force the function to use the vector calling
> +convention variant.
> +For more information on riscv_vector_cc, please see
> +@uref{https://github.com/riscv-non-isa/riscv-c-api-doc/pull/67}

Please remove above two line, I guess it's not good idea to reference
a pull request link here :P

> +
> +@smallexample
> +void foo() __attribute__((riscv_vector_cc));
> +[[riscv::vector_cc]] void foo(); // For C++11 and C23
> +@end smallexample
> +
>  @end table
>
>  The following target-specific function attributes are available for the

> diff --git 
> a/gcc/testsuite/gcc.target/riscv/rvv/base/attribute-riscv_vector_cc-callee-saved.c
>  
> b/gcc/testsuite/gcc.target/riscv/rvv/base/attribute-riscv_vector_cc-callee-saved.c
> new file mode 100644
> index 00000000000..7db9d874bcd
> --- /dev/null
> +++ 
> b/gcc/testsuite/gcc.target/riscv/rvv/base/attribute-riscv_vector_cc-callee-saved.c
> @@ -0,0 +1,117 @@
> +/* { dg-do compile } */
> +/* { dg-options "-march=rv64gcv -mabi=lp64d -O1" } */
> +/* { dg-final { check-function-bodies "**" "" } } */

I would like to prevent scanning the asm body if possible, since it
might cause problem when we improving code gen, so could you try to
scan .variant_cc\t<funcname> like
gcc/testsuite/gcc.target/aarch64/pcs_attribute-3.c?

Then we can also drop -O1 in the option :)

> +
> +#include <stdint.h>

Drop this.


> +void __attribute__((riscv_vector_cc))
> +foo2 (int a)
> +{
> +  int8_t data[1024];

Just char rather than int8_t, I would like to remove unnecessary
header including if possible :)

Reply via email to