Support LoongArch ISA multithreading (#3353) (#3354)

This commit is contained in:
Xi Zhang 2022-03-17 21:04:47 +08:00 committed by GitHub
parent c61258c0d0
commit 14d24213a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -111,6 +111,7 @@ Vassilis Papaefstathiou
Veripool API Bot
Victor Besyakov
Wilson Snyder
Xi Zhang
Yossi Nivin
Yuri Victorovich
Yutetsu TAKATSUKASA

View File

@ -475,6 +475,9 @@ using ssize_t = uint32_t; ///< signed size_t; returned from read()
# define VL_CPU_RELAX() asm volatile("yield" ::: "memory")
# elif defined(__powerpc64__)
# define VL_CPU_RELAX() asm volatile("or 1, 1, 1; or 2, 2, 2;" ::: "memory")
# elif defined(__loongarch__)
// LoongArch does not currently have a yield/pause instruction
# define VL_CPU_RELAX() asm volatile("nop" ::: "memory")
# else
# error "Missing VL_CPU_RELAX() definition. Or, don't use VL_THREADED"
# endif