diff options
author | Olof Johansson <olof@lixom.net> | 2007-03-22 15:34:13 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-12 19:55:13 +0200 |
commit | 3467bfd340f9ad48f3732415533a2e9c18240b62 (patch) | |
tree | 91f57918199d9508868aa0889a5b2aca4cc1da13 /include/asm-powerpc/asm-compat.h | |
parent | [POWERPC] DMA 4GB boundary protection (diff) | |
download | linux-3467bfd340f9ad48f3732415533a2e9c18240b62.tar.xz linux-3467bfd340f9ad48f3732415533a2e9c18240b62.zip |
[POWERPC] Use mtocrf instruction in asm when CONFIG_POWER4_ONLY=y
mtocrf is a faster single-field mtcrf (move to condition register
fields) instruction available in POWER4 and later processors. It can
make quite a difference in performance on some implementations, so use
it for CONFIG_POWER4_ONLY builds.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to '')
-rw-r--r-- | include/asm-powerpc/asm-compat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-powerpc/asm-compat.h b/include/asm-powerpc/asm-compat.h index c89bd58ee283..c19e7367fce6 100644 --- a/include/asm-powerpc/asm-compat.h +++ b/include/asm-powerpc/asm-compat.h @@ -78,6 +78,15 @@ #define PPC_STLCX stringify_in_c(stdcx.) #define PPC_CNTLZL stringify_in_c(cntlzd) +/* Move to CR, single-entry optimized version. Only available + * on POWER4 and later. + */ +#ifdef CONFIG_POWER4_ONLY +#define PPC_MTOCRF stringify_in_c(mtocrf) +#else +#define PPC_MTOCRF stringify_in_c(mtcrf) +#endif + #else /* 32-bit */ /* operations for longs and pointers */ @@ -89,6 +98,7 @@ #define PPC_LLARX stringify_in_c(lwarx) #define PPC_STLCX stringify_in_c(stwcx.) #define PPC_CNTLZL stringify_in_c(cntlzw) +#define PPC_MTOCRF stringify_in_c(mtcrf) #endif |