Messages in this thread Patch in this message | | | Subject | Re: optimised rw-semaphores for MIPS/MIPS64 | Date | Wed, 11 Jul 2001 15:18:14 +0100 | From | David Howells <> |
| |
You'll also need the asm-mips*/compiler.h patch.
David
diff -uNr -x CVS -x TAGS linux-2.4-mips/include/asm-mips/compiler.h linux-mips-rwsem/include/asm-mips/compiler.h --- linux-2.4-mips/include/asm-mips/compiler.h Thu Jan 1 01:00:00 1970 +++ linux-mips-rwsem/include/asm-mips/compiler.h Wed Jul 11 15:12:33 2001 @@ -0,0 +1,13 @@ +#ifndef __ASM_COMPILER_H +#define __ASM_COMPILER_H + +/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented + a mechanism by which the user can annotate likely branch directions and + expect the blocks to be reordered appropriately. Define __builtin_expect + to nothing for earlier compilers. */ + +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#define __builtin_expect(x, expected_value) (x) +#endif + +#endif /* __ASM_COMPILER_H */ diff -uNr -x CVS -x TAGS linux-2.4-mips/include/asm-mips64/compiler.h linux-mips-rwsem/include/asm-mips64/compiler.h --- linux-2.4-mips/include/asm-mips64/compiler.h Thu Jan 1 01:00:00 1970 +++ linux-mips-rwsem/include/asm-mips64/compiler.h Wed Jul 11 15:12:05 2001 @@ -0,0 +1,13 @@ +#ifndef __ASM_COMPILER_H +#define __ASM_COMPILER_H + +/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented + a mechanism by which the user can annotate likely branch directions and + expect the blocks to be reordered appropriately. Define __builtin_expect + to nothing for earlier compilers. */ + +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#define __builtin_expect(x, expected_value) (x) +#endif + +#endif /* __ASM_COMPILER_H */ | |