mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
core:ppc Add yield support
This commit is contained in:
parent
f57630d92b
commit
4e1d396ce1
@ -55,6 +55,8 @@ DECLARE_CV_PAUSE
|
||||
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("yield" ::: "memory"); } } while (0)
|
||||
# elif defined __GNUC__ && defined __arm__
|
||||
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("" ::: "memory"); } } while (0)
|
||||
# elif defined __GNUC__ && defined __PPC64__
|
||||
# define CV_PAUSE(v) do { for (int __delay = (v); __delay > 0; --__delay) { asm volatile("or 27,27,27" ::: "memory"); } } while (0)
|
||||
# else
|
||||
# warning "Can't detect 'pause' (CPU-yield) instruction on the target platform. Specify CV_PAUSE() definition via compiler flags."
|
||||
# define CV_PAUSE(...) do { /* no-op: works, but not effective */ } while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user