0004-define-__riscv_vector-macro.patch 838 B

1234567891011121314151617181920212223242526
  1. From ab6d30861b9f6571d10ac978066c45b96e060cce Mon Sep 17 00:00:00 2001
  2. From: "max.ma" <max.ma@starfivetech.com>
  3. Date: Sun, 26 Dec 2021 21:28:53 -0800
  4. Subject: [PATCH 04/11] define __riscv_vector macro
  5. ---
  6. gcc/config/riscv/riscv-c.cc | 3 +++
  7. 1 file changed, 3 insertions(+)
  8. diff --git a/gcc/config/riscv/riscv-c.cc b/gcc/config/riscv/riscv-c.cc
  9. index eb7ef09297e..e38746b7ff8 100644
  10. --- a/gcc/config/riscv/riscv-c.cc
  11. +++ b/gcc/config/riscv/riscv-c.cc
  12. @@ -54,6 +54,9 @@ riscv_cpu_cpp_builtins (cpp_reader *pfile)
  13. if (TARGET_DIV && TARGET_MUL)
  14. builtin_define ("__riscv_muldiv");
  15. + if (TARGET_VECTOR)
  16. + builtin_define ("__riscv_vector");
  17. +
  18. builtin_define_with_int_value ("__riscv_xlen", UNITS_PER_WORD * 8);
  19. if (TARGET_HARD_FLOAT)
  20. builtin_define_with_int_value ("__riscv_flen", UNITS_PER_FP_REG * 8);
  21. --
  22. 2.25.1