Refs #187. Use binary code for xgetbv, which is compatible with old compiler.
This commit is contained in:
parent
4db6660de4
commit
8cdb795438
|
@ -116,8 +116,9 @@ static inline int have_excpuid(void){
|
||||||
|
|
||||||
#ifndef NO_AVX
|
#ifndef NO_AVX
|
||||||
static inline void xgetbv(int op, int * eax, int * edx){
|
static inline void xgetbv(int op, int * eax, int * edx){
|
||||||
|
//Use binary code for xgetbv
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
("xgetbv": "=a" (*eax), "=d" (*edx) : "c" (op) : "cc");
|
(".byte 0x0f, 0x01, 0xd0": "=a" (*eax), "=d" (*edx) : "c" (op) : "cc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -78,8 +78,9 @@ extern gotoblas_t gotoblas_SANDYBRIDGE;
|
||||||
|
|
||||||
#ifndef NO_AVX
|
#ifndef NO_AVX
|
||||||
static inline void xgetbv(int op, int * eax, int * edx){
|
static inline void xgetbv(int op, int * eax, int * edx){
|
||||||
|
//Use binary code for xgetbv
|
||||||
__asm__ __volatile__
|
__asm__ __volatile__
|
||||||
("xgetbv": "=a" (*eax), "=d" (*edx) : "c" (op) : "cc");
|
(".byte 0x0f, 0x01, 0xd0": "=a" (*eax), "=d" (*edx) : "c" (op) : "cc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue