Changeset d6dcdd2e in mainline for arch/amd64/include/asm.h


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/include/asm.h

    rb1cf98c rd6dcdd2e  
    5252}
    5353
    54 static inline void cpu_sleep(void) { __asm__ volatile ("hlt"); };
    55 static inline void cpu_halt(void) { __asm__ volatile ("hlt"); };
     54static inline void cpu_sleep(void) { __asm__ volatile ("hlt\n"); };
     55static inline void cpu_halt(void) { __asm__ volatile ("hlt\n"); };
    5656
    5757
     
    6161
    6262        __asm__ volatile (
    63                 "mov %1, %%dx;"
    64                 "inb %%dx,%%al;"
    65                 "mov %%al, %0;"
     63                "mov %1, %%dx\n"
     64                "inb %%dx,%%al\n"
     65                "mov %%al, %0\n"
    6666                :"=m"(out)
    6767                :"m"(port)
     
    7474{
    7575        __asm__ volatile (
    76                 "mov %0,%%dx;"
    77                 "mov %1,%%al;"
    78                 "outb %%al,%%dx;"
     76                "mov %0,%%dx\n"
     77                "mov %1,%%al\n"
     78                "outb %%al,%%dx\n"
    7979                :
    8080                :"m"( port), "m" (b)
     
    150150{
    151151        __u64 v;
    152         __asm__ volatile ("movq %%cr0,%0" : "=r" (v));
     152        __asm__ volatile ("movq %%cr0,%0\n" : "=r" (v));
    153153        return v;
    154154}
     
    163163{
    164164        __u64 v;
    165         __asm__ volatile ("movq %%cr2,%0" : "=r" (v));
     165        __asm__ volatile ("movq %%cr2,%0\n" : "=r" (v));
    166166        return v;
    167167}
     
    199199{
    200200        __asm__ volatile (
    201                 "movl $0x1b, %%ecx;"
    202                 "rdmsr;"
    203                 "orl $(1<<11),%%eax;"
    204                 "orl $(0xfee00000),%%eax;"
    205                 "wrmsr;"
     201                "movl $0x1b, %%ecx\n"
     202                "rdmsr\n"
     203                "orl $(1<<11),%%eax\n"
     204                "orl $(0xfee00000),%%eax\n"
     205                "wrmsr\n"
    206206                :
    207207                :
Note: See TracChangeset for help on using the changeset viewer.