]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-athlon-identify.patch
- more ru translations
[packages/rpm.git] / rpm-athlon-identify.patch
CommitLineData
8ff0c36d 1diff -ur rpm-4.0.2/lib/rpmrc.c rpm-4.0.2-new/lib/rpmrc.c
2--- rpm-4.0.2/lib/rpmrc.c Tue Mar 13 13:55:25 2001
3+++ rpm-4.0.2-new/lib/rpmrc.c Fri Jan 25 01:02:59 2002
4@@ -897,7 +897,7 @@
5 static inline int RPMClass(void)
6 {
7 int cpu;
8- unsigned int tfms, junk, cap;
9+ unsigned int tfms, junk, cap, capamd;
10
11 signal(SIGILL, model3);
12
13@@ -906,16 +906,24 @@
14
15 if(cpuid_eax(0x000000000)==0)
16 return 4;
17- cpuid(0x000000001, &tfms, &junk, &junk, &cap);
18+
19+ cpuid(0x00000001, &tfms, &junk, &junk, &cap);
20+ cpuid(0x80000001, &junk, &junk, &junk, &capamd);
21
22 cpu = (tfms>>8)&15;
23
24 if(cpu < 6)
25 return cpu;
26
27- if(cap & (1<<15))
28- return 6;
29-
30+ if(cap & (1<<15)) {
31+ // it supports CMOV instruction
32+ if (capamd & (1<<30))
33+ // it supports 3DNOWEXT
34+ return 7;
35+ else
36+ return 6;
37+ }
38+
39 return 5;
40 }
41
42@@ -1112,6 +1116,8 @@
43
44 if (strchr("3456", un.machine[1]) && un.machine[1] != class)
45 un.machine[1] = class;
46+ if (class == '7')
47+ strcpy(un.machine,"athlon");
48 }
49 # endif
50
This page took 0.055122 seconds and 4 git commands to generate.