Commit 6f5a64d6 authored by Rosen Penev's avatar Rosen Penev Committed by Facebook Github Bot

Asm: pause under MIPS as well (#1257)

Summary:
The instruction is identical to the x86 one. First introduced in MIPS32r2.
Signed-off-by: default avatarRosen Penev <rosenp@gmail.com>
Pull Request resolved: https://github.com/facebook/folly/pull/1257

Reviewed By: Orvid

Differential Revision: D18467031

Pulled By: yfeldblum

fbshipit-source-id: 04b695167184db8ef71df47e82e414793ddb0ab9
parent 808c845b
...@@ -36,7 +36,7 @@ inline void asm_volatile_memory() { ...@@ -36,7 +36,7 @@ inline void asm_volatile_memory() {
inline void asm_volatile_pause() { inline void asm_volatile_pause() {
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) #if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
::_mm_pause(); ::_mm_pause();
#elif defined(__i386__) || FOLLY_X64 #elif defined(__i386__) || FOLLY_X64 || (__mips_isa_rev > 1)
asm volatile("pause"); asm volatile("pause");
#elif FOLLY_AARCH64 || (defined(__arm__) && !(__ARM_ARCH < 7)) #elif FOLLY_AARCH64 || (defined(__arm__) && !(__ARM_ARCH < 7))
asm volatile("yield"); asm volatile("yield");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment