Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177893290
D60693.1795532863.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D60693.1795532863.diff
View Options
diff --git a/lib/libc/csu/i386/reloc.c b/lib/libc/csu/i386/reloc.c
--- a/lib/libc/csu/i386/reloc.c
+++ b/lib/libc/csu/i386/reloc.c
@@ -34,40 +34,17 @@
static void
ifunc_init(const Elf_Auxinfo *aux __unused)
{
- u_int cpuid_supported, p[4];
+ u_int p[4];
- __asm __volatile(
- " pushfl\n"
- " popl %%eax\n"
- " movl %%eax,%%ecx\n"
- " xorl $0x200000,%%eax\n"
- " pushl %%eax\n"
- " popfl\n"
- " pushfl\n"
- " popl %%eax\n"
- " xorl %%eax,%%ecx\n"
- " je 1f\n"
- " movl $1,%0\n"
- " jmp 2f\n"
- "1: movl $0,%0\n"
- "2:\n"
- : "=r" (cpuid_supported) : : "eax", "ecx", "cc");
- if (cpuid_supported) {
- do_cpuid(1, p);
- cpu_feature = p[3];
- cpu_feature2 = p[2];
- do_cpuid(0, p);
- if (p[0] >= 7) {
- cpuid_count(7, 0, p);
- cpu_stdext_feature = p[1];
- cpu_stdext_feature2 = p[2];
- } else {
- cpu_stdext_feature = 0;
- cpu_stdext_feature2 = 0;
- }
+ do_cpuid(1, p);
+ cpu_feature = p[3];
+ cpu_feature2 = p[2];
+ do_cpuid(0, p);
+ if (p[0] >= 7) {
+ cpuid_count(7, 0, p);
+ cpu_stdext_feature = p[1];
+ cpu_stdext_feature2 = p[2];
} else {
- cpu_feature = 0;
- cpu_feature2 = 0;
cpu_stdext_feature = 0;
cpu_stdext_feature2 = 0;
}
diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c
--- a/libexec/rtld-elf/i386/reloc.c
+++ b/libexec/rtld-elf/i386/reloc.c
@@ -548,28 +548,6 @@
ifunc_init(Elf_Auxinfo *aux_info[__min_size(AT_COUNT)] __unused)
{
u_int p[4], cpu_high;
- int cpuid_supported;
-
- __asm __volatile(
- " pushfl\n"
- " popl %%eax\n"
- " movl %%eax,%%ecx\n"
- " xorl $0x200000,%%eax\n"
- " pushl %%eax\n"
- " popfl\n"
- " pushfl\n"
- " popl %%eax\n"
- " xorl %%eax,%%ecx\n"
- " je 1f\n"
- " movl $1,%0\n"
- " jmp 2f\n"
- "1: movl $0,%0\n"
- "2:\n"
- : "=r"(cpuid_supported)
- :
- : "eax", "ecx");
- if (!cpuid_supported)
- return;
rtld_cpuid_count(1, 0, p);
cpu_feature = p[3];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 24, 3:07 PM (17 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41957278
Default Alt Text
D60693.1795532863.diff (1 KB)
Attached To
Mode
D60693: libc/csu/i386, rtld-elf/i386: assume CPUID is always present
Attached
Detach File
Event Timeline