- detect athlon/duron with CMOV (PLD).
authorjbj <devnull@localhost>
Tue, 30 Jul 2002 16:39:08 +0000 (16:39 +0000)
committerjbj <devnull@localhost>
Tue, 30 Jul 2002 16:39:08 +0000 (16:39 +0000)
CVS patchset: 5581
CVS date: 2002/07/30 16:39:08

CHANGES
db3/configure
lib/rpmrc.c

diff --git a/CHANGES b/CHANGES
index 783ac74..c642a9b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
        - update trpm.
        - factor all mode-specific options into mode-specific tables.
        - treat an unspecified epoch as Epoch: 0 everywhere.
+       - detect athlon/duron with CMOV (PLD).
 
 4.0.3 -> 4.0.4:
        - solaris: translate i86pc to i386 (#57182).
index eea649b..a252b2a 100755 (executable)
@@ -12,7 +12,7 @@ rm -f config.cache
 ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`"
 
 CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
-       --enable-shared --enable-static --enable-debug --enable-rpc \
+       --enable-shared --enable-static --enable-rpc \
        --with-uniquename=_rpmdb --srcdir=$db_dist
 
 # XXX hack to get db-3.3.4 to configure properly
index 4225656..d5c3646 100644 (file)
@@ -990,24 +990,30 @@ static inline int RPMClass(void)
        /*@modifies internalState @*/
 {
        int cpu;
-       unsigned int tfms, junk, cap;
+       unsigned int tfms, junk, cap, capamd;
        
        signal(SIGILL, model3);
        
-       if(sigsetjmp(jenv, 1))
+       if (sigsetjmp(jenv, 1))
                return 3;
                
-       if(cpuid_eax(0x000000000)==0)
+       if (cpuid_eax(0x000000000)==0)
                return 4;
+
        cpuid(0x000000001, &tfms, &junk, &junk, &cap);
+       cpuid(0x800000001, &junk, &junk, &junk, &capamd);
        
        cpu = (tfms>>8)&15;
        
-       if(cpu < 6)
+       if (cpu < 6)
                return cpu;
                
-       if(cap & (1<<15))
+       if (cap & (1<<15)) {
+               /* CMOV supported? */
+               if (capamd & (1<<30))
+                       return 7;       /* 3DNOWEXT supported */
                return 6;
+       }
                
        return 5;
 }