Changeset d6dcdd2e in mainline for arch/ia32/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/ia32/include/asm.h

    rb1cf98c rd6dcdd2e  
    3131
    3232#include <arch/types.h>
    33 #include <typedefs.h>
    34 #include <config.h>
    35 #include <synch/spinlock.h>
    36 #include <arch/boot/memmap.h>
    3733#include <config.h>
    3834
     
    6258 * Halt the current CPU until interrupt event.
    6359 */
    64 static inline void cpu_halt(void) { __asm__("hlt"); };
    65 static inline void cpu_sleep(void) { __asm__("hlt"); };
     60static inline void cpu_halt(void) { __asm__("hlt\n"); };
     61static inline void cpu_sleep(void) { __asm__("hlt\n"); };
    6662
    6763/** Read CR2
     
    7167 * @return Value read.
    7268 */
    73 static inline __u32 read_cr2(void) { __u32 v; __asm__ volatile ("movl %%cr2,%0" : "=r" (v)); return v; }
     69static inline __u32 read_cr2(void) { __u32 v; __asm__ volatile ("movl %%cr2,%0\n" : "=r" (v)); return v; }
    7470
    7571/** Write CR3
     
    8783 * @return Value read.
    8884 */
    89 static inline __u32 read_cr3(void) { __u32 v; __asm__ volatile ("movl %%cr3,%0" : "=r" (v)); return v; }
     85static inline __u32 read_cr3(void) { __u32 v; __asm__ volatile ("movl %%cr3,%0\n" : "=r" (v)); return v; }
    9086
    9187/** Set priority level low
     
    162158}
    163159
     160static inline __u64 rdtsc(void)
     161{
     162        __u64 v;
     163       
     164        __asm__ volatile("rdtsc\n" : "=A" (v));
     165       
     166        return v;
     167}
     168
    164169#endif
Note: See TracChangeset for help on using the changeset viewer.