]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-athlon-identify.patch
- workaround over static markers for the .. operator
[packages/rpm.git] / rpm-athlon-identify.patch
1 diff -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.033488 seconds and 3 git commands to generate.