16 #ifdef V8_BASE_ATOMICOPS_INTERNALS_X86_GCC_H_
22 #define cpuid(a, b, c, d, inp) \
23 asm("mov %%ebx, %%edi\n" \
25 "xchg %%edi, %%ebx\n" \
26 : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
27 #elif defined(__x86_64__)
28 #define cpuid(a, b, c, d, inp) \
29 asm("mov %%rbx, %%rdi\n" \
31 "xchg %%rdi, %%rbx\n" \
32 : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
45 #if !defined(__SSE2__)
55 void AtomicOps_Internalx86CPUFeaturesInit() {
66 memcpy(vendor, &
ebx, 4);
67 memcpy(vendor + 4, &
edx, 4);
68 memcpy(vendor + 8, &
ecx, 4);
74 int family = (
eax >> 8) & 0xf;
75 int model = (
eax >> 4) & 0xf;
77 family += (
eax >> 20) & 0xff;
78 model += ((
eax >> 16) & 0xf) << 4;
86 if (strcmp(vendor,
"AuthenticAMD") == 0 &&
88 32 <= model && model <= 63) {
94 #if !defined(__SSE2__)
100 class AtomicOpsx86Initializer {
102 AtomicOpsx86Initializer() {
103 AtomicOps_Internalx86CPUFeaturesInit();
109 AtomicOpsx86Initializer g_initer;
struct AtomicOps_x86CPUFeatureStruct AtomicOps_Internalx86CPUFeatures
Debugger support for the V8 JavaScript engine.