search for: __cpuid

Displaying 20 results from an estimated 83 matches for "__cpuid".

2016 Jun 26
1
FLAC__SSE_OS change
lvqcl wrote: > No, MSVC 2015 is also affected. I renamed __cpuid() to __cpuid22(), I thought the original problem was with `___cpuidex`, not `__cpuid`! Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 02/17] paravirt_ops - msr
...".previous":"=&bDS" (*err), "=a"(a), "=d"(b) + :"c"(msr), "i"(-EIO), "0"(0)); + return a | (b << 32); +} + +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else + +#define __cpuid native_cpuid /* * Access to machine-specific registers (available on 586 and better only) * Note: the rd* operations modify the parameters directly (without using @@ -28,37 +84,18 @@ #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) -/* wrmsr with exceptio...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 02/17] paravirt_ops - msr
...".previous":"=&bDS" (*err), "=a"(a), "=d"(b) + :"c"(msr), "i"(-EIO), "0"(0)); + return a | (b << 32); +} + +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else + +#define __cpuid native_cpuid /* * Access to machine-specific registers (available on 586 and better only) * Note: the rd* operations modify the parameters directly (without using @@ -28,37 +84,18 @@ #define wrmsrl(msr,val) wrmsr(msr,(__u32)((__u64)(val)),((__u64)(val))>>32) -/* wrmsr with exceptio...
2009 Apr 24
1
[LLVMdev] [PATCH] CPUID for Win64
...rrently on Windows x86-64 the processor features are not detected because the inline assembly (which Visual C++ deprecated for x64) does not have an alternative that uses intrinsics. Later tests for x86-64 then only enable SSE2, leaving any more recent instruction set unused. The patch uses the __cpuid intrinsic that compile under 32-bit as well as 64-bit. I've only tested it with my own experimental project on Windows x64 but I see no potential issues for other platforms. A potential additional improvement would be to cause a compiler error when the GetCpuIDAndInfo does not compile to the in...
2016 Jun 26
2
FLAC__SSE_OS change
lvqcl wrote: > Sure. > > The question is, what to do with the debug configuration. <sigh/> Is this only a problem with MSVS2005? If so, I'd be inclined to jsut drop support for it. Its over 10 years old and aren't there free versions of more recent MSVCs available? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo
2017 Jan 02
2
FLAC 1.3.2 has been released
.../mailman/listinfo/flac-dev -------------- next part -------------- diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c index b9df19a..808d55d 100644 --- a/src/libFLAC/cpu.c +++ b/src/libFLAC/cpu.c @@ -269,9 +269,9 @@ void FLAC__cpu_info_x86(FLAC__uint32 level, FLAC__uint32 *eax, FLAC__uint32 *ebx __cpuid(cpuinfo, ext); if((unsigned)cpuinfo[0] >= level) { #if FLAC__AVX_SUPPORTED - __cpuidex(cpuinfo, ext, 0); /* for AVX2 detection */ + __cpuidex(cpuinfo, level, 0); /* for AVX2 detection */ #else - __cpuid(cpuinfo, ext); /* some old compilers don't support __cpuidex */ + __cpuid(cpuinfo...
2007 Apr 18
2
[PATCH] Fix CONFIG_PARAVIRT for 2.6.19-rc5-mm1
...000 +1100 +++ working-2.6.19-rc5-mm1-paravirt/include/asm-i386/processor.h 2006-11-09 11:48:37.000000000 +1100 @@ -22,13 +22,6 @@ #include <linux/cpumask.h> #include <linux/init.h> -#ifdef CONFIG_PARAVIRT -#include <asm/paravirt.h> -#else -#define paravirt_enabled() 0 -#define __cpuid native_cpuid -#endif - /* flag for disabling the tsc */ extern int tsc_disable; @@ -166,59 +159,6 @@ static inline fastcall void native_cpuid : "0" (*eax), "2" (*ecx)); } -/* - * Generic CPUID function - * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx...
2007 Apr 18
2
[PATCH] Fix CONFIG_PARAVIRT for 2.6.19-rc5-mm1
...000 +1100 +++ working-2.6.19-rc5-mm1-paravirt/include/asm-i386/processor.h 2006-11-09 11:48:37.000000000 +1100 @@ -22,13 +22,6 @@ #include <linux/cpumask.h> #include <linux/init.h> -#ifdef CONFIG_PARAVIRT -#include <asm/paravirt.h> -#else -#define paravirt_enabled() 0 -#define __cpuid native_cpuid -#endif - /* flag for disabling the tsc */ extern int tsc_disable; @@ -166,59 +159,6 @@ static inline fastcall void native_cpuid : "0" (*eax), "2" (*ecx)); } -/* - * Generic CPUID function - * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx...
2016 Jun 26
4
FLAC__SSE_OS change
...finition of cpu_xgetbv_x86() fails. > It can be fixed by adding "#include share/compat.h" to cpu.c (or by using > FLAC__uint32 from FLAC/ordinals.h). Ok, added share/compat.h. > When I fix this, the following problem occurs: > > error LNK2019: unresolved external symbol ___cpuidex referenced in function _FLAC__cpu_info_x86 libflac_static.lib > fatal error LNK1120: 1 unresolved externals flac.exe > > The code > > if (FLAC__AVX_SUPPORTED) > __cpuidex(cpuinfo, level, 0); /* for AVX2 detection */ > else > __cpuid(cpuinfo, l...
2017 Jan 01
12
FLAC 1.3.2 has been released
Hi all, The latest version of FLAC has been releases. See: https://xiph.org/flac/index.html https://xiph.org/flac/changelog.html The source tarball and Windows binaries are available (with md5 and sha256 checksums) at: http://downloads.xiph.org/releases/flac/ The source tarball is also available at: https://sourceforge.net/projects/flac/files/flac-src/ and similarly the
2007 Apr 18
3
New CPUID/MSR driver; virtualization hooks
I have finally gotten off the pot and finished writing up my new CPUID/MSR driver, which contains support for registers that need arbitrary GPRs touched. For i386 vs x86-64 compatibility, both use an x86-64 register image (16 64-bit register fields); this allows 32-bit userspace to access the full 64-bit image if the kernel is 64 bits. Anyway, this presumably requires new paravirtualization
2007 Apr 18
3
New CPUID/MSR driver; virtualization hooks
I have finally gotten off the pot and finished writing up my new CPUID/MSR driver, which contains support for registers that need arbitrary GPRs touched. For i386 vs x86-64 compatibility, both use an x86-64 register image (16 64-bit register fields); this allows 32-bit userspace to access the full 64-bit image if the kernel is 64 bits. Anyway, this presumably requires new paravirtualization
2007 Nov 02
0
[PATCH] PVWin: Fix warnings
This patch cleans up some 80-odd warnings I was seeing when compiling the xenpci driver, all completely trivial. It also replaces the use of asm for calling cpuid with the __cpuid compiler intrinsic, and modifies calling code accordingly. I''m pretty sure my mailer going to mangle the inline patch (below) so I''m attaching the pristine version. (will try to fix for next time) -- Andy --------- diff -r b26bdba50c41 common/include/evtchn_public.h --- a/commo...
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
...ude <asm/paravirt.h> /* flag for disabling the tsc */ extern int tsc_disable; @@ -143,18 +144,6 @@ static inline void detect_ht(struct cpui #define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */ #define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */ -static inline void __cpuid(unsigned int *eax, unsigned int *ebx, - unsigned int *ecx, unsigned int *edx) -{ - /* ecx is often an input as well as an output. */ - __asm__("cpuid" - : "=a" (*eax), - "=b" (*ebx), - "=c" (*ecx), - "=d" (*edx) - : "0" (*e...
2007 Apr 18
3
[PATCH 1/4] x86 paravirt_ops: create no_paravirt.h for native ops
...ude <asm/paravirt.h> /* flag for disabling the tsc */ extern int tsc_disable; @@ -143,18 +144,6 @@ static inline void detect_ht(struct cpui #define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */ #define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */ -static inline void __cpuid(unsigned int *eax, unsigned int *ebx, - unsigned int *ecx, unsigned int *edx) -{ - /* ecx is often an input as well as an output. */ - __asm__("cpuid" - : "=a" (*eax), - "=b" (*ebx), - "=c" (*ecx), - "=d" (*edx) - : "0" (*e...
2016 Jun 26
5
FLAC__SSE_OS change
First off, this code is horrible to read and work on. The recent commits are the first of what I hope is a massive clean up of this code. lvqcl wrote: > So if I understand things correctly, the current meaning of --(en|dis)able-sse is: > > on Linux: > --enable-sse: > add -msse2 to the compiler switches > do not test SSE OS support (assume that SSE is
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...), "=c" (aux)); \ - (val) = (__d << 32) | __a; \ -} while (0) - #define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) @@ -125,6 +116,7 @@ static inline void cpuid(unsigned int op *eax = op; __cpuid(eax, ebx, ecx, edx); } + /* Some CPUID calls want 'count' to be placed in ecx */ static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, int *edx) @@ -140,24 +132,28 @@ static inline void cpuid_count(int op, i static inline unsigned int cpuid_eax(unsigned in...
2007 Apr 18
0
[PATCH] paravirt_ops x86_64 , take 2
...), "=c" (aux)); \ - (val) = (__d << 32) | __a; \ -} while (0) - #define checking_wrmsrl(msr,val) wrmsr_safe(msr,(u32)(val),(u32)((val)>>32)) #define write_tsc(val1,val2) wrmsr(0x10, val1, val2) @@ -125,6 +116,7 @@ static inline void cpuid(unsigned int op *eax = op; __cpuid(eax, ebx, ecx, edx); } + /* Some CPUID calls want 'count' to be placed in ecx */ static inline void cpuid_count(int op, int count, int *eax, int *ebx, int *ecx, int *edx) @@ -140,24 +132,28 @@ static inline void cpuid_count(int op, i static inline unsigned int cpuid_eax(unsigned in...
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...+{ + return paravirt_ops.get_wallclock(); +} + +static inline void set_wallclock(unsigned long nowtime) +{ + paravirt_ops.set_wallclock(nowtime); +} + +static inline void do_time_init(void) +{ + return paravirt_ops.time_init(); +} + +/* The paravirtualized CPUID instruction. */ +static inline void __cpuid(unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) +{ + paravirt_ops.cpuid(eax, ebx, ecx, edx); +} + +/* + * These special macros can be used to get or set a debugging register + */ +#define get_debugreg(var, reg) var = paravirt_ops.get_debugreg(reg) +#define set_deb...
2007 Apr 18
2
[PATCH] x86_64 paravirt_ops port
...+{ + return paravirt_ops.get_wallclock(); +} + +static inline void set_wallclock(unsigned long nowtime) +{ + paravirt_ops.set_wallclock(nowtime); +} + +static inline void do_time_init(void) +{ + return paravirt_ops.time_init(); +} + +/* The paravirtualized CPUID instruction. */ +static inline void __cpuid(unsigned int *eax, unsigned int *ebx, + unsigned int *ecx, unsigned int *edx) +{ + paravirt_ops.cpuid(eax, ebx, ecx, edx); +} + +/* + * These special macros can be used to get or set a debugging register + */ +#define get_debugreg(var, reg) var = paravirt_ops.get_debugreg(reg) +#define set_deb...