Changeset e7b7be3f in mainline for kernel/arch/ia32xen/include/asm.h


Ignore:
Timestamp:
2007-01-22T13:10:08Z (18 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f3fc9b
Parents:
62c63fc
Message:

asm volatile → asm volatile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32xen/include/asm.h

    r62c63fc re7b7be3f  
    6060    { \
    6161        unative_t res; \
    62         __asm__ volatile ("movl %%" #reg ", %0" : "=r" (res) ); \
     62        asm volatile ("movl %%" #reg ", %0" : "=r" (res) ); \
    6363        return res; \
    6464    }
     
    6666#define GEN_WRITE_REG(reg) static inline void write_ ##reg (unative_t regn) \
    6767    { \
    68         __asm__ volatile ("movl %0, %%" #reg : : "r" (regn)); \
     68        asm volatile ("movl %0, %%" #reg : : "r" (regn)); \
    6969    }
    7070
     
    9393 * @param val Value to write
    9494 */
    95 static inline void outb(uint16_t port, uint8_t val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
     95static inline void outb(uint16_t port, uint8_t val) { asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
    9696
    9797/** Word to port
     
    102102 * @param val Value to write
    103103 */
    104 static inline void outw(uint16_t port, uint16_t val) { __asm__ volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); }
     104static inline void outw(uint16_t port, uint16_t val) { asm volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); }
    105105
    106106/** Double word to port
     
    111111 * @param val Value to write
    112112 */
    113 static inline void outl(uint16_t port, uint32_t val) { __asm__ volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); }
     113static inline void outl(uint16_t port, uint32_t val) { asm volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); }
    114114
    115115/** Byte from port
     
    120120 * @return Value read
    121121 */
    122 static inline uint8_t inb(uint16_t port) { uint8_t val; __asm__ volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); return val; }
     122static inline uint8_t inb(uint16_t port) { uint8_t val; asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); return val; }
    123123
    124124/** Word from port
     
    129129 * @return Value read
    130130 */
    131 static inline uint16_t inw(uint16_t port) { uint16_t val; __asm__ volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port) ); return val; }
     131static inline uint16_t inw(uint16_t port) { uint16_t val; asm volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port) ); return val; }
    132132
    133133/** Double word from port
     
    138138 * @return Value read
    139139 */
    140 static inline uint32_t inl(uint16_t port) { uint32_t val; __asm__ volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); return val; }
     140static inline uint32_t inl(uint16_t port) { uint32_t val; asm volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); return val; }
    141141
    142142/** Enable interrupts.
     
    214214        uintptr_t v;
    215215       
    216         __asm__ volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1)));
     216        asm volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1)));
    217217       
    218218        return v;
     
    224224        uintptr_t *ip;
    225225
    226         __asm__ volatile (
     226        asm volatile (
    227227                "mov %%eip, %0"
    228228                : "=r" (ip)
     
    237237static inline void invlpg(uintptr_t addr)
    238238{
    239         __asm__ volatile ("invlpg %0\n" :: "m" (*(unative_t *)addr));
     239        asm volatile ("invlpg %0\n" :: "m" (*(unative_t *)addr));
    240240}
    241241
     
    246246static inline void gdtr_load(ptr_16_32_t *gdtr_reg)
    247247{
    248         __asm__ volatile ("lgdtl %0\n" : : "m" (*gdtr_reg));
     248        asm volatile ("lgdtl %0\n" : : "m" (*gdtr_reg));
    249249}
    250250
     
    255255static inline void gdtr_store(ptr_16_32_t *gdtr_reg)
    256256{
    257         __asm__ volatile ("sgdtl %0\n" : : "m" (*gdtr_reg));
     257        asm volatile ("sgdtl %0\n" : : "m" (*gdtr_reg));
    258258}
    259259
     
    264264static inline void tr_load(uint16_t sel)
    265265{
    266         __asm__ volatile ("ltr %0" : : "r" (sel));
     266        asm volatile ("ltr %0" : : "r" (sel));
    267267}
    268268
Note: See TracChangeset for help on using the changeset viewer.