Changeset d6dcdd2e in mainline for arch/amd64/src/asm_utils.S


Ignore:
Timestamp:
2005-09-13T21:20:56Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
01e48c1
Parents:
b1cf98c
Message:

Optimize some assembler functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/amd64/src/asm_utils.S

    rb1cf98c rd6dcdd2e  
    7676#
    7777has_cpuid:
    78         pushq %rbx
    79        
    8078        pushfq                  # store flags
    8179        popq %rax               # read flags
    82         movq %rax,%rbx          # copy flags
    83         btcl $21,%ebx           # swap the ID bit
    84         pushq %rbx
     80        movq %rax,%rdx          # copy flags
     81        btcl $21,%edx           # swap the ID bit
     82        pushq %rdx
    8583        popfq                   # propagate the change into flags
    8684        pushfq
    87         popq %rbx               # read flags   
     85        popq %rdx               # read flags   
    8886        andl $(1<<21),%eax      # interested only in ID bit
    89         andl $(1<<21),%ebx
    90         xorl %ebx,%eax          # 0 if not supported, 1 if supported
    91        
    92         popq %rbx
     87        andl $(1<<21),%edx
     88        xorl %edx,%eax          # 0 if not supported, 1 if supported
    9389        ret
    9490
Note: See TracChangeset for help on using the changeset viewer.