0003-pdfium.patch 1.1 KB

1234567891011121314151617181920212223242526
  1. From 460f12789136fd73f28f82be25ba8887d5a3ed2b Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Fri, 22 Jul 2022 10:04:49 +0800
  4. Subject: [PATCH] base: partition_allocator: add asm instruction sfor riscv64
  5. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  6. ---
  7. third_party/base/allocator/partition_allocator/spin_lock.cc | 2 ++
  8. 1 file changed, 2 insertions(+)
  9. diff --git a/third_party/base/allocator/partition_allocator/spin_lock.cc b/third_party/base/allocator/partition_allocator/spin_lock.cc
  10. index d7cdd15e2..ab9182608 100644
  11. --- a/third_party/base/allocator/partition_allocator/spin_lock.cc
  12. +++ b/third_party/base/allocator/partition_allocator/spin_lock.cc
  13. @@ -45,6 +45,8 @@
  14. #define YIELD_PROCESSOR __asm__ __volatile__("pause")
  15. #elif defined(ARCH_CPU_PPC64_FAMILY)
  16. #define YIELD_PROCESSOR __asm__ __volatile__("or 31,31,31")
  17. +#elif defined(ARCH_CPU_RISCV_FAMILY)
  18. +#define YIELD_PROCESSOR __asm__ __volatile__("FENCE")
  19. #elif defined(ARCH_CPU_S390_FAMILY)
  20. // just do nothing
  21. #define YIELD_PROCESSOR ((void)0)
  22. --
  23. 2.30.2