getcontextx.c (230864) | getcontextx.c (238328) |
---|---|
1/* 2 * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/lib/libc/i386/gen/getcontextx.c 230864 2012-02-01 13:33:53Z kib $"); | 28__FBSDID("$FreeBSD: head/lib/libc/i386/gen/getcontextx.c 238328 2012-07-10 01:47:11Z davidxu $"); |
29 30#include <sys/types.h> 31#include <sys/ucontext.h> 32#include <errno.h> 33#include <stdarg.h> 34#include <stdlib.h> 35#include <machine/npx.h> 36#include <machine/specialreg.h> --- 26 unchanged lines hidden (view full) --- 63 : "=r" (cpuid_supported) : : "eax", "ecx"); 64 if (cpuid_supported) { 65 __asm __volatile( 66 " pushl %%ebx\n" 67 " cpuid\n" 68 " movl %%ebx,%1\n" 69 " popl %%ebx\n" 70 : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3]) | 29 30#include <sys/types.h> 31#include <sys/ucontext.h> 32#include <errno.h> 33#include <stdarg.h> 34#include <stdlib.h> 35#include <machine/npx.h> 36#include <machine/specialreg.h> --- 26 unchanged lines hidden (view full) --- 63 : "=r" (cpuid_supported) : : "eax", "ecx"); 64 if (cpuid_supported) { 65 __asm __volatile( 66 " pushl %%ebx\n" 67 " cpuid\n" 68 " movl %%ebx,%1\n" 69 " popl %%ebx\n" 70 : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3]) |
71 : "0" (0x0)); | 71 : "0" (0x1)); |
72 if ((p[2] & CPUID2_OSXSAVE) != 0) { 73 __asm __volatile( 74 " pushl %%ebx\n" 75 " cpuid\n" 76 " movl %%ebx,%1\n" 77 " popl %%ebx\n" 78 : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), 79 "=d" (p[3]) --- 54 unchanged lines hidden --- | 72 if ((p[2] & CPUID2_OSXSAVE) != 0) { 73 __asm __volatile( 74 " pushl %%ebx\n" 75 " cpuid\n" 76 " movl %%ebx,%1\n" 77 " popl %%ebx\n" 78 : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), 79 "=d" (p[3]) --- 54 unchanged lines hidden --- |