aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarish Mahendrakar <harish.mahendrakar@ittiam.com>2015-10-12 19:42:07 +0530
committerHarish Mahendrakar <harish.mahendrakar@ittiam.com>2016-06-10 16:07:41 +0530
commit73f5f5afd5a4378f16fd7e2e436e727faa6d0c3d (patch)
treeeb95df383da48c1ef5f1bcf02853600a30cde229
parent8c5bdca6781cc189312d1fc213fa854cb3c1de1f (diff)
downloadlibhevc-73f5f5afd5a4378f16fd7e2e436e727faa6d0c3d.tar.gz
Added nop inline assembly instruction to NOP() definition
Change-Id: Ic97c649fe88ef92de16899dfd22266d97cad98d5
-rw-r--r--common/arm/ihevc_platform_macros.h2
-rw-r--r--common/mips/ihevc_platform_macros.h2
-rw-r--r--common/x86/ihevc_platform_macros.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/common/arm/ihevc_platform_macros.h b/common/arm/ihevc_platform_macros.h
index 6d48cd9..71b2d2a 100644
--- a/common/arm/ihevc_platform_macros.h
+++ b/common/arm/ihevc_platform_macros.h
@@ -217,7 +217,7 @@ static INLINE UWORD32 CTZ(UWORD32 u4_word)
-#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = 0; nop_i < nop_cnt; nop_i++);}
+#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = (nop_cnt) ; nop_i > 0 ; nop_i--) asm("nop");}
diff --git a/common/mips/ihevc_platform_macros.h b/common/mips/ihevc_platform_macros.h
index b028624..0810c74 100644
--- a/common/mips/ihevc_platform_macros.h
+++ b/common/mips/ihevc_platform_macros.h
@@ -85,7 +85,7 @@ static inline UWORD32 CTZ(UWORD32 u4_word)
#define POPCNT_U32(x) __builtin_popcount(x)
-#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = 0; nop_i < nop_cnt; nop_i++);}
+#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = (nop_cnt) ; nop_i > 0 ; nop_i--) asm("nop");}
#define INLINE
diff --git a/common/x86/ihevc_platform_macros.h b/common/x86/ihevc_platform_macros.h
index 5752b89..f1121a2 100644
--- a/common/x86/ihevc_platform_macros.h
+++ b/common/x86/ihevc_platform_macros.h
@@ -66,7 +66,7 @@
((UWORD32)x >> 24);
-#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = 0; nop_i < nop_cnt; nop_i++);}
+#define NOP(nop_cnt) {UWORD32 nop_i; for (nop_i = (nop_cnt) ; nop_i > 0 ; nop_i--) asm("nop");}
#define POPCNT_U32(x) __builtin_popcount(x)