X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=ndk%2Fandroid-ndk-r4%2Fdarwin%2Fplatforms%2Fandroid-5%2Farch-x86%2Fusr%2Finclude%2Fasm%2Falternative_32.h;fp=ndk%2Fandroid-ndk-r4%2Fdarwin%2Fplatforms%2Fandroid-5%2Farch-x86%2Fusr%2Finclude%2Fasm%2Falternative_32.h;h=ef13111349577327ed4ad4019ea0ac7462e6e888;hb=72eddb87bfc38a2f6fae40566ec6380eb838489a;hp=0000000000000000000000000000000000000000;hpb=e19e12d257815bef7bfe4f3d81056a5b2464c464;p=android-x86%2Fprebuilt.git diff --git a/ndk/android-ndk-r4/darwin/platforms/android-5/arch-x86/usr/include/asm/alternative_32.h b/ndk/android-ndk-r4/darwin/platforms/android-5/arch-x86/usr/include/asm/alternative_32.h new file mode 100644 index 0000000..ef13111 --- /dev/null +++ b/ndk/android-ndk-r4/darwin/platforms/android-5/arch-x86/usr/include/asm/alternative_32.h @@ -0,0 +1,38 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _I386_ALTERNATIVE_H +#define _I386_ALTERNATIVE_H + +#include +#include +#include + +struct alt_instr { + u8 *instr; + u8 *replacement; + u8 cpuid; + u8 instrlen; + u8 replacementlen; + u8 pad; +}; + +struct module; +#define alternative(oldinstr, newinstr, feature) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" :: "i" (feature) : "memory") +#define alternative_input(oldinstr, newinstr, feature, input...) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c0\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" :: "i" (feature), ##input) +#define alternative_io(oldinstr, newinstr, feature, output, input...) asm volatile ("661:\n\t" oldinstr "\n662:\n" ".section .altinstructions,\"a\"\n" " .align 4\n" " .long 661b\n" " .long 663f\n" " .byte %c[feat]\n" " .byte 662b-661b\n" " .byte 664f-663f\n" ".previous\n" ".section .altinstr_replacement,\"ax\"\n" "663:\n\t" newinstr "\n664:\n" ".previous" : output : [feat] "i" (feature), ##input) +#define ASM_OUTPUT2(a, b) a, b +#define LOCK_PREFIX "" + +#define __parainstructions NULL +#define __parainstructions_end NULL + +#endif