/[hurd]/gnumach/i386/i386/locore.S
ViewVC logotype

Diff of /gnumach/i386/i386/locore.S

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by roland, Sun Oct 7 19:47:15 2001 UTC revision 1.6.2.1 by ams, Sun Nov 28 17:29:35 2004 UTC
# Line 1144  syscall_addr: Line 1144  syscall_addr:
1144          jmp     _take_trap              /* treat as a trap */          jmp     _take_trap              /* treat as a trap */
1145    
1146    
 #if 0  
1147  /* Discover what kind of cpu we have; return the family number  /* Discover what kind of cpu we have; return the family number
1148     (3, 4, 5, 6, for 386, 486, 586, 686 respectively).  */     (3, 4, 5, 6, for 386, 486, 586, 686 respectively).  */
1149  ENTRY(discover_x86_cpu_type)  ENTRY(discover_x86_cpu_type)
1150          movl    %esp,%edx               /* Save stack pointer */          pushl   %ebp                    /* Save frame pointer */
1151            movl    %esp,%ebp               /* Save stack pointer */
1152          and     $~0x3,%esp              /* Align stack pointer */          and     $~0x3,%esp              /* Align stack pointer */
1153    
1154            inb     $0xe8,%al               /* Enable ID flag for Cyrix CPU ... */
1155            andb    $0x80,%al               /* ... in CCR4 reg bit7 */
1156            outb    %al,$0xe8
1157          pushfl                          /* Fetch flags ... */          pushfl                          /* Fetch flags ... */
1158          popl    %eax                    /*  ... into eax */          popl    %eax                    /*  ... into eax */
1159          movl    %eax,%ecx               /* Save original flags for return */          movl    %eax,%ecx               /* Save original flags for return */
# Line 1159  ENTRY(discover_x86_cpu_type) Line 1162  ENTRY(discover_x86_cpu_type)
1162          popfl                           /*  ... In EFLAGS */          popfl                           /*  ... In EFLAGS */
1163          pushfl                          /* Fetch flags back ... */          pushfl                          /* Fetch flags back ... */
1164          popl    %eax                    /*  ... into eax */          popl    %eax                    /*  ... into eax */
1165            pushl   %ecx                    /* From ecx... */
1166            popfl                           /* ... restore original flags */
1167    
1168          xorl    %ecx,%eax               /* See if any bits didn't change */          xorl    %ecx,%eax               /* See if any bits didn't change */
1169          testl   $EFL_AC,%eax            /* Test AC bit */          testl   $EFL_AC,%eax            /* Test AC bit */
# Line 1178  ENTRY(discover_x86_cpu_type) Line 1183  ENTRY(discover_x86_cpu_type)
1183          shrl    $8,%eax                 /* Slide family bits down */          shrl    $8,%eax                 /* Slide family bits down */
1184          andl    $15,%eax                /* And select them */          andl    $15,%eax                /* And select them */
1185    
1186  9:      pushl   %ecx                    /* From ecx... */  9:      movl    %ebp,%esp               /* Restore stack pointer */
1187          popfl                           /* ... restore original flags */          popl    %ebp                    /* Restore frame pointer */
         movl    %edx,%esp               /* Restore stack pointer */  
1188          ret                             /* And return */          ret                             /* And return */
 #endif  
1189    
1190    
1191  /* */  /* */

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.6.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26