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 Veripool API Bot
Victor Besyakov Victor Besyakov
Wilson Snyder Wilson Snyder
Xi Zhang
Yossi Nivin Yossi Nivin
Yuri Victorovich Yuri Victorovich
Yutetsu TAKATSUKASA 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") # define VL_CPU_RELAX() asm volatile("yield" ::: "memory")
# elif defined(__powerpc64__) # elif defined(__powerpc64__)
# define VL_CPU_RELAX() asm volatile("or 1, 1, 1; or 2, 2, 2;" ::: "memory") # 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 # else
# error "Missing VL_CPU_RELAX() definition. Or, don't use VL_THREADED" # error "Missing VL_CPU_RELAX() definition. Or, don't use VL_THREADED"
# endif # endif