mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
Remove medium/large code model-specific inline asm
Initially added to workaround gcc implementation issues that clang does not have. (gcc hardcodes rbx as the PIC register, clang uses a virtual register) Change-Id: I1a3277abf02b1ff437b4aea4d28f4cb1c0176b80
This commit is contained in:
parent
deadc339d5
commit
307071f144
@ -36,18 +36,6 @@ static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
|
|||||||
: "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3])
|
: "=a"(cpu_info[0]), "=D"(cpu_info[1]), "=c"(cpu_info[2]), "=d"(cpu_info[3])
|
||||||
: "a"(info_type), "c"(0));
|
: "a"(info_type), "c"(0));
|
||||||
}
|
}
|
||||||
#elif defined(__x86_64__) && \
|
|
||||||
(defined(__code_model_medium__) || defined(__code_model_large__)) && \
|
|
||||||
defined(__PIC__)
|
|
||||||
static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
|
|
||||||
__asm__ volatile (
|
|
||||||
"xchg{q}\t{%%rbx}, %q1\n"
|
|
||||||
"cpuid\n"
|
|
||||||
"xchg{q}\t{%%rbx}, %q1\n"
|
|
||||||
: "=a"(cpu_info[0]), "=&r"(cpu_info[1]), "=c"(cpu_info[2]),
|
|
||||||
"=d"(cpu_info[3])
|
|
||||||
: "a"(info_type), "c"(0));
|
|
||||||
}
|
|
||||||
#elif defined(__i386__) || defined(__x86_64__)
|
#elif defined(__i386__) || defined(__x86_64__)
|
||||||
static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
|
static WEBP_INLINE void GetCPUInfo(int cpu_info[4], int info_type) {
|
||||||
__asm__ volatile (
|
__asm__ volatile (
|
||||||
|
Loading…
Reference in New Issue
Block a user