Changeset e7b7be3f in mainline


Ignore:
Timestamp:
2007-01-22T13:10:08Z (17 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

Files:
49 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc64/loader/ofwarch.c

    r62c63fc re7b7be3f  
    7070        uint64_t current_mid;
    7171       
    72         __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (current_mid) : "r" (0), "i" (ASI_UPA_CONFIG));
     72        asm volatile ("ldxa [%1] %2, %0\n" : "=r" (current_mid) : "r" (0), "i" (ASI_UPA_CONFIG));
    7373        current_mid >>= UPA_CONFIG_MID_SHIFT;
    7474        current_mid &= UPA_CONFIG_MID_MASK;
  • kernel/arch/amd64/include/asm.h

    r62c63fc re7b7be3f  
    5353        uintptr_t v;
    5454       
    55         __asm__ volatile ("andq %%rsp, %0\n" : "=r" (v) : "0" (~((uint64_t)STACK_SIZE-1)));
     55        asm volatile ("andq %%rsp, %0\n" : "=r" (v) : "0" (~((uint64_t)STACK_SIZE-1)));
    5656       
    5757        return v;
  • kernel/arch/amd64/include/atomic.h

    r62c63fc re7b7be3f  
    4343static inline void atomic_inc(atomic_t *val) {
    4444#ifdef CONFIG_SMP
    45         __asm__ volatile ("lock incq %0\n" : "=m" (val->count));
     45        asm volatile ("lock incq %0\n" : "=m" (val->count));
    4646#else
    47         __asm__ volatile ("incq %0\n" : "=m" (val->count));
     47        asm volatile ("incq %0\n" : "=m" (val->count));
    4848#endif /* CONFIG_SMP */
    4949}
     
    5151static inline void atomic_dec(atomic_t *val) {
    5252#ifdef CONFIG_SMP
    53         __asm__ volatile ("lock decq %0\n" : "=m" (val->count));
     53        asm volatile ("lock decq %0\n" : "=m" (val->count));
    5454#else
    55         __asm__ volatile ("decq %0\n" : "=m" (val->count));
     55        asm volatile ("decq %0\n" : "=m" (val->count));
    5656#endif /* CONFIG_SMP */
    5757}
     
    6161        long r = 1;
    6262
    63         __asm__ volatile (
     63        asm volatile (
    6464                "lock xaddq %1, %0\n"
    6565                : "=m" (val->count), "+r" (r)
     
    7373        long r = -1;
    7474       
    75         __asm__ volatile (
     75        asm volatile (
    7676                "lock xaddq %1, %0\n"
    7777                : "=m" (val->count), "+r" (r)
     
    8787        uint64_t v;
    8888       
    89         __asm__ volatile (
     89        asm volatile (
    9090                "movq $1, %0\n"
    9191                "xchgq %0, %1\n"
     
    103103
    104104        preemption_disable();
    105         __asm__ volatile (
     105        asm volatile (
    106106                "0:;"
    107107#ifdef CONFIG_HT
  • kernel/arch/amd64/include/memstr.h

    r62c63fc re7b7be3f  
    5252        unative_t d0, d1, d2;
    5353
    54         __asm__ __volatile__(
     54        asm volatile(
    5555                "rep movsq\n\t"
    5656                "movq %4, %%rcx\n\t"
     
    8383        unative_t ret;
    8484       
    85         __asm__ (
     85        asm (
    8686                "repe cmpsb\n\t"
    8787                "je 1f\n\t"
     
    109109        unative_t d0, d1;
    110110       
    111         __asm__ __volatile__ (
     111        asm volatile (
    112112                "rep stosw\n\t"
    113113                : "=&D" (d0), "=&c" (d1), "=a" (x)
     
    131131        unative_t d0, d1;
    132132       
    133         __asm__ __volatile__ (
     133        asm volatile (
    134134                "rep stosb\n\t"
    135135                : "=&D" (d0), "=&c" (d1), "=a" (x)
  • kernel/arch/amd64/src/cpu/cpu.c

    r62c63fc re7b7be3f  
    7777void cpu_setup_fpu(void)
    7878{
    79         __asm__ volatile (
     79        asm volatile (
    8080                "movq %%cr0, %%rax;"
    8181                "btsq $1, %%rax;" /* cr0.mp */
     
    100100void fpu_disable(void)
    101101{
    102         __asm__ volatile (
     102        asm     volatile (
    103103                "mov %%cr0,%%rax;"
    104104                "bts $3,%%rax;"
     
    112112void fpu_enable(void)
    113113{
    114         __asm__ volatile (
     114        asm     volatile (
    115115                "mov %%cr0,%%rax;"
    116116                "btr $3,%%rax;"
  • kernel/arch/amd64/src/fpu_context.c

    r62c63fc re7b7be3f  
    4141void fpu_context_save(fpu_context_t *fctx)
    4242{
    43         __asm__ volatile (
     43        asm volatile (
    4444                "fxsave %0"
    4545                : "=m"(*fctx)
     
    5050void fpu_context_restore(fpu_context_t *fctx)
    5151{
    52         __asm__ volatile (
     52        asm volatile (
    5353                "fxrstor %0"
    5454                : "=m"(*fctx)
     
    5959{
    6060        /* TODO: Zero all SSE, MMX etc. registers */
    61         __asm__ volatile (
     61        asm volatile (
    6262                "fninit;"
    6363        );
  • kernel/arch/amd64/src/userspace.c

    r62c63fc re7b7be3f  
    5555        ipl &= ~(0xcd4);
    5656
    57         __asm__ volatile (""
     57        asm volatile (""
    5858                          "pushq %0\n"
    5959                          "pushq %1\n"
  • kernel/arch/ia32/include/asm.h

    r62c63fc re7b7be3f  
    5858 * Halt the current CPU until interrupt event.
    5959 */
    60 static inline void cpu_halt(void) { __asm__("hlt\n"); };
    61 static inline void cpu_sleep(void) { __asm__("hlt\n"); };
     60static inline void cpu_halt(void)
     61{
     62        asm("hlt\n");
     63};
     64
     65static inline void cpu_sleep(void)
     66{
     67        asm("hlt\n");
     68};
    6269
    6370#define GEN_READ_REG(reg) static inline unative_t read_ ##reg (void) \
    6471    { \
    6572        unative_t res; \
    66         __asm__ volatile ("movl %%" #reg ", %0" : "=r" (res) ); \
     73        asm volatile ("movl %%" #reg ", %0" : "=r" (res) ); \
    6774        return res; \
    6875    }
     
    7077#define GEN_WRITE_REG(reg) static inline void write_ ##reg (unative_t regn) \
    7178    { \
    72         __asm__ volatile ("movl %0, %%" #reg : : "r" (regn)); \
     79        asm volatile ("movl %0, %%" #reg : : "r" (regn)); \
    7380    }
    7481
     
    99106 * @param val Value to write
    100107 */
    101 static inline void outb(uint16_t port, uint8_t val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
     108static inline void outb(uint16_t port, uint8_t val)
     109{
     110        asm volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) );
     111}
    102112
    103113/** Word to port
     
    108118 * @param val Value to write
    109119 */
    110 static inline void outw(uint16_t port, uint16_t val) { __asm__ volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); }
     120static inline void outw(uint16_t port, uint16_t val)
     121{
     122        asm volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) );
     123}
    111124
    112125/** Double word to port
     
    117130 * @param val Value to write
    118131 */
    119 static inline void outl(uint16_t port, uint32_t val) { __asm__ volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); }
     132static inline void outl(uint16_t port, uint32_t val)
     133{
     134        asm volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) );
     135}
    120136
    121137/** Byte from port
     
    126142 * @return Value read
    127143 */
    128 static inline uint8_t inb(uint16_t port) { uint8_t val; __asm__ volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) ); return val; }
     144static inline uint8_t inb(uint16_t port)
     145{
     146        uint8_t val;
     147       
     148        asm volatile ("inb %w1, %b0 \n" : "=a" (val) : "d" (port) );
     149        return val;
     150}
    129151
    130152/** Word from port
     
    135157 * @return Value read
    136158 */
    137 static inline uint16_t inw(uint16_t port) { uint16_t val; __asm__ volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port) ); return val; }
     159static inline uint16_t inw(uint16_t port)
     160{
     161        uint16_t val;
     162       
     163        asm volatile ("inw %w1, %w0 \n" : "=a" (val) : "d" (port) );
     164        return val;
     165}
    138166
    139167/** Double word from port
     
    144172 * @return Value read
    145173 */
    146 static inline uint32_t inl(uint16_t port) { uint32_t val; __asm__ volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) ); return val; }
     174static inline uint32_t inl(uint16_t port)
     175{
     176        uint32_t val;
     177       
     178        asm volatile ("inl %w1, %l0 \n" : "=a" (val) : "d" (port) );
     179        return val;
     180}
    147181
    148182/** Enable interrupts.
     
    156190{
    157191        ipl_t v;
    158         __asm__ volatile (
     192        asm volatile (
    159193                "pushf\n\t"
    160194                "popl %0\n\t"
     
    175209{
    176210        ipl_t v;
    177         __asm__ volatile (
     211        asm volatile (
    178212                "pushf\n\t"
    179213                "popl %0\n\t"
     
    192226static inline void interrupts_restore(ipl_t ipl)
    193227{
    194         __asm__ volatile (
     228        asm volatile (
    195229                "pushl %0\n\t"
    196230                "popf\n"
     
    206240{
    207241        ipl_t v;
    208         __asm__ volatile (
     242        asm volatile (
    209243                "pushf\n\t"
    210244                "popl %0\n"
     
    224258        uintptr_t v;
    225259       
    226         __asm__ volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1)));
     260        asm volatile ("andl %%esp, %0\n" : "=r" (v) : "0" (~(STACK_SIZE-1)));
    227261       
    228262        return v;
     
    234268        uintptr_t *ip;
    235269
    236         __asm__ volatile (
     270        asm volatile (
    237271                "mov %%eip, %0"
    238272                : "=r" (ip)
     
    247281static inline void invlpg(uintptr_t addr)
    248282{
    249         __asm__ volatile ("invlpg %0\n" :: "m" (*(unative_t *)addr));
     283        asm volatile ("invlpg %0\n" :: "m" (*(unative_t *)addr));
    250284}
    251285
     
    256290static inline void gdtr_load(ptr_16_32_t *gdtr_reg)
    257291{
    258         __asm__ volatile ("lgdtl %0\n" : : "m" (*gdtr_reg));
     292        asm volatile ("lgdtl %0\n" : : "m" (*gdtr_reg));
    259293}
    260294
     
    265299static inline void gdtr_store(ptr_16_32_t *gdtr_reg)
    266300{
    267         __asm__ volatile ("sgdtl %0\n" : : "m" (*gdtr_reg));
     301        asm volatile ("sgdtl %0\n" : : "m" (*gdtr_reg));
    268302}
    269303
     
    274308static inline void idtr_load(ptr_16_32_t *idtr_reg)
    275309{
    276         __asm__ volatile ("lidtl %0\n" : : "m" (*idtr_reg));
     310        asm volatile ("lidtl %0\n" : : "m" (*idtr_reg));
    277311}
    278312
     
    283317static inline void tr_load(uint16_t sel)
    284318{
    285         __asm__ volatile ("ltr %0" : : "r" (sel));
     319        asm volatile ("ltr %0" : : "r" (sel));
    286320}
    287321
  • kernel/arch/ia32/include/atomic.h

    r62c63fc re7b7be3f  
    4343static inline void atomic_inc(atomic_t *val) {
    4444#ifdef CONFIG_SMP
    45         __asm__ volatile ("lock incl %0\n" : "=m" (val->count));
     45        asm volatile ("lock incl %0\n" : "=m" (val->count));
    4646#else
    47         __asm__ volatile ("incl %0\n" : "=m" (val->count));
     47        asm volatile ("incl %0\n" : "=m" (val->count));
    4848#endif /* CONFIG_SMP */
    4949}
     
    5151static inline void atomic_dec(atomic_t *val) {
    5252#ifdef CONFIG_SMP
    53         __asm__ volatile ("lock decl %0\n" : "=m" (val->count));
     53        asm volatile ("lock decl %0\n" : "=m" (val->count));
    5454#else
    55         __asm__ volatile ("decl %0\n" : "=m" (val->count));
     55        asm volatile ("decl %0\n" : "=m" (val->count));
    5656#endif /* CONFIG_SMP */
    5757}
     
    6161        long r = 1;
    6262
    63         __asm__ volatile (
     63        asm volatile (
    6464                "lock xaddl %1, %0\n"
    6565                : "=m" (val->count), "+r" (r)
     
    7373        long r = -1;
    7474       
    75         __asm__ volatile (
     75        asm volatile (
    7676                "lock xaddl %1, %0\n"
    7777                : "=m" (val->count), "+r"(r)
     
    8787        uint32_t v;
    8888       
    89         __asm__ volatile (
     89        asm volatile (
    9090                "movl $1, %0\n"
    9191                "xchgl %0, %1\n"
     
    102102
    103103        preemption_disable();
    104         __asm__ volatile (
     104        asm volatile (
    105105                "0:;"
    106106#ifdef CONFIG_HT
  • kernel/arch/ia32/include/barrier.h

    r62c63fc re7b7be3f  
    4747 */
    4848
    49 #define CS_ENTER_BARRIER()      __asm__ volatile ("" ::: "memory")
    50 #define CS_LEAVE_BARRIER()      __asm__ volatile ("" ::: "memory")
     49#define CS_ENTER_BARRIER()      asm volatile ("" ::: "memory")
     50#define CS_LEAVE_BARRIER()      asm volatile ("" ::: "memory")
    5151
    5252static inline void cpuid_serialization(void)
    5353{
    54         __asm__ volatile (
     54        asm volatile (
    5555                "xorl %%eax, %%eax\n"
    5656                "cpuid\n"
     
    6060
    6161#ifdef CONFIG_FENCES_P4
    62 #       define memory_barrier()         __asm__ volatile ("mfence\n" ::: "memory")
    63 #       define read_barrier()           __asm__ volatile ("lfence\n" ::: "memory")
     62#       define memory_barrier()         asm volatile ("mfence\n" ::: "memory")
     63#       define read_barrier()           asm volatile ("lfence\n" ::: "memory")
    6464#       ifdef CONFIG_WEAK_MEMORY
    65 #               define write_barrier()  __asm__ volatile ("sfence\n" ::: "memory")
     65#               define write_barrier()  asm volatile ("sfence\n" ::: "memory")
    6666#       else
    67 #               define write_barrier()  __asm__ volatile( "" ::: "memory");
     67#               define write_barrier()  asm volatile( "" ::: "memory");
    6868#       endif
    6969#elif CONFIG_FENCES_P3
     
    7171#       define read_barrier()           cpuid_serialization()
    7272#       ifdef CONFIG_WEAK_MEMORY
    73 #               define write_barrier()  __asm__ volatile ("sfence\n" ::: "memory")
     73#               define write_barrier()  asm volatile ("sfence\n" ::: "memory")
    7474#       else
    75 #               define write_barrier()  __asm__ volatile( "" ::: "memory");
     75#               define write_barrier()  asm volatile( "" ::: "memory");
    7676#       endif
    7777#else
     
    8181#               define write_barrier()  cpuid_serialization()
    8282#       else
    83 #               define write_barrier()  __asm__ volatile( "" ::: "memory");
     83#               define write_barrier()  asm volatile( "" ::: "memory");
    8484#       endif
    8585#endif
  • kernel/arch/ia32/include/cpuid.h

    r62c63fc re7b7be3f  
    7777        uint32_t val, ret;
    7878       
    79         __asm__ volatile (
     79        asm volatile (
    8080                "pushf\n"               /* read flags */
    8181                "popl %0\n"
     
    100100static inline void cpuid(uint32_t cmd, cpu_info_t *info)
    101101{
    102         __asm__ volatile (
     102        asm volatile (
    103103                "movl %4, %%eax\n"
    104104                "cpuid\n"
  • kernel/arch/ia32/include/memstr.h

    r62c63fc re7b7be3f  
    5252        unative_t d0, d1, d2;
    5353
    54         __asm__ __volatile__(
     54        asm volatile(
    5555                /* copy all full dwords */
    5656                "rep movsl\n\t"
     
    8989        int ret;
    9090       
    91         __asm__ (
     91        asm (
    9292                "repe cmpsb\n\t"
    9393                "je 1f\n\t"
     
    115115        uint32_t d0, d1;
    116116       
    117         __asm__ __volatile__ (
     117        asm volatile (
    118118                "rep stosw\n\t"
    119119                : "=&D" (d0), "=&c" (d1), "=a" (x)
     
    137137        uint32_t d0, d1;
    138138       
    139         __asm__ __volatile__ (
     139        asm volatile (
    140140                "rep stosb\n\t"
    141141                : "=&D" (d0), "=&c" (d1), "=a" (x)
  • kernel/arch/ia32/src/cpu/cpu.c

    r62c63fc re7b7be3f  
    7272void fpu_disable(void)
    7373{
    74         __asm__ volatile (
     74        asm volatile (
    7575                "mov %%cr0,%%eax;"
    7676                "or $8,%%eax;"
     
    8484void fpu_enable(void)
    8585{
    86         __asm__ volatile (
     86        asm volatile (
    8787                "mov %%cr0,%%eax;"
    8888                "and $0xffFFffF7,%%eax;"
  • kernel/arch/ia32/src/fpu_context.c

    r62c63fc re7b7be3f  
    4444static void fpu_context_f_save(fpu_context_t *fctx)
    4545{
    46         __asm__ volatile (
     46        asm volatile (
    4747                "fnsave %0"
    4848                : "=m"(*fctx)
     
    5252static void fpu_context_f_restore(fpu_context_t *fctx)
    5353{
    54         __asm__ volatile (
     54        asm volatile (
    5555                "frstor %0"
    5656                : "=m"(*fctx)
     
    6060static void fpu_context_fx_save(fpu_context_t *fctx)
    6161{
    62         __asm__ volatile (
     62        asm volatile (
    6363                "fxsave %0"
    6464                : "=m"(*fctx)
     
    6868static void fpu_context_fx_restore(fpu_context_t *fctx)
    6969{
    70         __asm__ volatile (
     70        asm volatile (
    7171                "fxrstor %0"
    7272                : "=m"(*fctx)
     
    104104{
    105105        uint32_t help0 = 0, help1 = 0;
    106         __asm__ volatile (
     106        asm volatile (
    107107                "fninit;\n"
    108108                "stmxcsr %0\n"
  • kernel/arch/ia32/src/pm.c

    r62c63fc re7b7be3f  
    148148static void clean_IOPL_NT_flags(void)
    149149{
    150         __asm__ volatile (
     150        asm volatile (
    151151                "pushfl\n"
    152152                "pop %%eax\n"
     
    161161static void clean_AM_flag(void)
    162162{
    163         __asm__ volatile (
     163        asm volatile (
    164164                "mov %%cr0, %%eax\n"
    165165                "and $0xfffbffff, %%eax\n"
  • kernel/arch/ia32/src/userspace.c

    r62c63fc re7b7be3f  
    5252        ipl = interrupts_disable();
    5353
    54         __asm__ volatile (
     54        asm volatile (
    5555                /*
    5656                 * Clear nested task flag.
  • 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
  • kernel/arch/ia32xen/src/pm.c

    r62c63fc re7b7be3f  
    133133static void clean_IOPL_NT_flags(void)
    134134{
    135 //      __asm__ volatile (
     135//      asm volatile (
    136136//              "pushfl\n"
    137137//              "pop %%eax\n"
     
    146146static void clean_AM_flag(void)
    147147{
    148 //      __asm__ volatile (
     148//      asm volatile (
    149149//              "mov %%cr0, %%eax\n"
    150150//              "and $0xfffbffff, %%eax\n"
  • kernel/arch/ia64/include/asm.h

    r62c63fc re7b7be3f  
    5050        uint64_t v;
    5151
    52         __asm__ volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1)));
     52        asm volatile ("and %0 = %1, r12" : "=r" (v) : "r" (~(STACK_SIZE-1)));
    5353       
    5454        return v;
     
    6363        uint64_t v;
    6464       
    65         __asm__ volatile ("mov %0 = psr\n" : "=r" (v));
     65        asm volatile ("mov %0 = psr\n" : "=r" (v));
    6666       
    6767        return v;
     
    7676        uint64_t v;
    7777       
    78         __asm__ volatile ("mov %0 = cr.iva\n" : "=r" (v));
     78        asm volatile ("mov %0 = cr.iva\n" : "=r" (v));
    7979       
    8080        return v;
     
    8787static inline void iva_write(uint64_t v)
    8888{
    89         __asm__ volatile ("mov cr.iva = %0\n" : : "r" (v));
     89        asm volatile ("mov cr.iva = %0\n" : : "r" (v));
    9090}
    9191
     
    9999        uint64_t v;
    100100       
    101         __asm__ volatile ("mov %0 = cr.ivr\n" : "=r" (v));
     101        asm volatile ("mov %0 = cr.ivr\n" : "=r" (v));
    102102       
    103103        return v;
     
    110110static inline void itc_write(uint64_t v)
    111111{
    112         __asm__ volatile ("mov ar.itc = %0\n" : : "r" (v));
     112        asm volatile ("mov ar.itc = %0\n" : : "r" (v));
    113113}
    114114
     
    121121        uint64_t v;
    122122       
    123         __asm__ volatile ("mov %0 = ar.itc\n" : "=r" (v));
     123        asm volatile ("mov %0 = ar.itc\n" : "=r" (v));
    124124       
    125125        return v;
     
    132132static inline void itm_write(uint64_t v)
    133133{
    134         __asm__ volatile ("mov cr.itm = %0\n" : : "r" (v));
     134        asm volatile ("mov cr.itm = %0\n" : : "r" (v));
    135135}
    136136
     
    143143        uint64_t v;
    144144       
    145         __asm__ volatile ("mov %0 = cr.itm\n" : "=r" (v));
     145        asm volatile ("mov %0 = cr.itm\n" : "=r" (v));
    146146       
    147147        return v;
     
    156156        uint64_t v;
    157157       
    158         __asm__ volatile ("mov %0 = cr.itv\n" : "=r" (v));
     158        asm volatile ("mov %0 = cr.itv\n" : "=r" (v));
    159159       
    160160        return v;
     
    167167static inline void itv_write(uint64_t v)
    168168{
    169         __asm__ volatile ("mov cr.itv = %0\n" : : "r" (v));
     169        asm volatile ("mov cr.itv = %0\n" : : "r" (v));
    170170}
    171171
     
    176176static inline void eoi_write(uint64_t v)
    177177{
    178         __asm__ volatile ("mov cr.eoi = %0\n" : : "r" (v));
     178        asm volatile ("mov cr.eoi = %0\n" : : "r" (v));
    179179}
    180180
     
    187187        uint64_t v;
    188188
    189         __asm__ volatile ("mov %0 = cr.tpr\n"  : "=r" (v));
     189        asm volatile ("mov %0 = cr.tpr\n"  : "=r" (v));
    190190       
    191191        return v;
     
    198198static inline void tpr_write(uint64_t v)
    199199{
    200         __asm__ volatile ("mov cr.tpr = %0\n" : : "r" (v));
     200        asm volatile ("mov cr.tpr = %0\n" : : "r" (v));
    201201}
    202202
     
    212212        uint64_t v;
    213213       
    214         __asm__ volatile (
     214        asm volatile (
    215215                "mov %0 = psr\n"
    216216                "rsm %1\n"
     
    233233        uint64_t v;
    234234       
    235         __asm__ volatile (
     235        asm volatile (
    236236                "mov %0 = psr\n"
    237237                "ssm %1\n"
     
    271271static inline void pk_disable(void)
    272272{
    273         __asm__ volatile ("rsm %0\n" : : "i" (PSR_PK_MASK));
     273        asm volatile ("rsm %0\n" : : "i" (PSR_PK_MASK));
    274274}
    275275
  • kernel/arch/ia64/include/atomic.h

    r62c63fc re7b7be3f  
    4747        long v;
    4848
    49         __asm__ volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "+m" (val->count) : "i" (imm));
     49        asm volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "+m" (val->count) : "i" (imm));
    5050 
    5151        return v;
  • kernel/arch/ia64/include/barrier.h

    r62c63fc re7b7be3f  
    4242#define CS_LEAVE_BARRIER()      memory_barrier()
    4343
    44 #define memory_barrier()        __asm__ volatile ("mf\n" ::: "memory")
     44#define memory_barrier()        asm volatile ("mf\n" ::: "memory")
    4545#define read_barrier()          memory_barrier()
    4646#define write_barrier()         memory_barrier()
    4747
    48 #define srlz_i()                __asm__ volatile (";; srlz.i ;;\n" ::: "memory")
    49 #define srlz_d()                __asm__ volatile (";; srlz.d\n" ::: "memory")
     48#define srlz_i()                asm volatile (";; srlz.i ;;\n" ::: "memory")
     49#define srlz_d()                asm volatile (";; srlz.d\n" ::: "memory")
    5050
    5151#endif
  • kernel/arch/ia64/include/cpu.h

    r62c63fc re7b7be3f  
    5959        uint64_t v;
    6060       
    61         __asm__ volatile ("mov %0 = cpuid[%1]\n" : "=r" (v) : "r" (n));
     61        asm volatile ("mov %0 = cpuid[%1]\n" : "=r" (v) : "r" (n));
    6262       
    6363        return v;
  • kernel/arch/ia64/include/mm/page.h

    r62c63fc re7b7be3f  
    195195        uint64_t ret;
    196196
    197         __asm__ volatile ("thash %0 = %1\n" : "=r" (ret) : "r" (va));
     197        asm volatile ("thash %0 = %1\n" : "=r" (ret) : "r" (va));
    198198
    199199        return ret;
     
    213213        uint64_t ret;
    214214
    215         __asm__ volatile ("ttag %0 = %1\n" : "=r" (ret) : "r" (va));
     215        asm volatile ("ttag %0 = %1\n" : "=r" (ret) : "r" (va));
    216216
    217217        return ret;
     
    228228        uint64_t ret;
    229229        ASSERT(i < REGION_REGISTERS);
    230         __asm__ volatile ("mov %0 = rr[%1]\n" : "=r" (ret) : "r" (i << VRN_SHIFT));
     230        asm volatile ("mov %0 = rr[%1]\n" : "=r" (ret) : "r" (i << VRN_SHIFT));
    231231        return ret;
    232232}
     
    240240{
    241241        ASSERT(i < REGION_REGISTERS);
    242         __asm__ volatile (
     242        asm volatile (
    243243                "mov rr[%0] = %1\n"
    244244                :
     
    255255        uint64_t ret;
    256256       
    257         __asm__ volatile ("mov %0 = cr.pta\n" : "=r" (ret));
     257        asm volatile ("mov %0 = cr.pta\n" : "=r" (ret));
    258258       
    259259        return ret;
     
    266266static inline void pta_write(uint64_t v)
    267267{
    268         __asm__ volatile ("mov cr.pta = %0\n" : : "r" (v));
     268        asm volatile ("mov cr.pta = %0\n" : : "r" (v));
    269269}
    270270
  • kernel/arch/ia64/src/ia64.c

    r62c63fc re7b7be3f  
    134134        psr.bn = 1;                             /* start in bank 0 */
    135135
    136         __asm__ volatile ("mov %0 = ar.rsc\n" : "=r" (rsc.value));
     136        asm volatile ("mov %0 = ar.rsc\n" : "=r" (rsc.value));
    137137        rsc.loadrs = 0;
    138138        rsc.be = false;
  • kernel/arch/ia64/src/mm/tlb.c

    r62c63fc re7b7be3f  
    7373        for(i = 0; i < count1; i++) {
    7474                for(j = 0; j < count2; j++) {
    75                         __asm__ volatile (
     75                        asm volatile (
    7676                                "ptc.e %0 ;;"
    7777                                :
     
    180180        /*cnt+=(page!=va);*/
    181181        for(; va<(page+cnt*(PAGE_SIZE)); va += (1<<ps)) {
    182                 __asm__ volatile (
     182                asm volatile (
    183183                        "ptc.l %0,%1;;"
    184184                        :
     
    245245        }
    246246       
    247         __asm__ volatile (
     247        asm volatile (
    248248                "mov r8=psr;;\n"
    249249                "rsm %0;;\n"                    /* PSR_IC_MASK */
     
    321321        }
    322322
    323         __asm__ volatile (
     323        asm volatile (
    324324                "mov r8=psr;;\n"
    325325                "rsm %0;;\n"                    /* PSR_IC_MASK */
     
    383383void dtr_purge(uintptr_t page, count_t width)
    384384{
    385         __asm__ volatile ("ptr.d %0, %1\n" : : "r" (page), "r" (width<<2));
     385        asm volatile ("ptr.d %0, %1\n" : : "r" (page), "r" (width<<2));
    386386}
    387387
  • kernel/arch/ia64/src/proc/scheduler.c

    r62c63fc re7b7be3f  
    7474         * These values will be found there after switch from userspace.
    7575         */
    76         __asm__ volatile (
     76        asm volatile (
    7777                "bsw.0\n"
    7878                "mov r22 = %0\n"
  • kernel/arch/ia64/src/ski/ski.c

    r62c63fc re7b7be3f  
    7070void ski_putchar(chardev_t *d, const char ch)
    7171{
    72         __asm__ volatile (
     72        asm volatile (
    7373                "mov r15 = %0\n"
    7474                "mov r32 = %1\n"        /* r32 is in0 */
     
    9696        uint64_t ch;
    9797       
    98         __asm__ volatile (
     98        asm volatile (
    9999                "mov r15 = %1\n"
    100100                "break 0x80000;;\n"     /* modifies r8 */
     
    205205void ski_init_console(void)
    206206{
    207         __asm__ volatile (
     207        asm volatile (
    208208                "mov r15 = %0\n"
    209209                "break 0x80000\n"
  • kernel/arch/mips32/include/asm.h

    r62c63fc re7b7be3f  
    4444{
    4545        /* Most of the simulators do not support */
    46 /*      __asm__ volatile ("wait"); */
     46/*      asm volatile ("wait"); */
    4747}
    4848
     
    5757        uintptr_t v;
    5858       
    59         __asm__ volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
     59        asm volatile ("and %0, $29, %1\n" : "=r" (v) : "r" (~(STACK_SIZE-1)));
    6060       
    6161        return v;
  • kernel/arch/mips32/include/atomic.h

    r62c63fc re7b7be3f  
    5656        long tmp, v;
    5757
    58         __asm__ volatile (
     58        asm volatile (
    5959                "1:\n"
    6060                "       ll %0, %1\n"
  • kernel/arch/mips32/include/barrier.h

    r62c63fc re7b7be3f  
    3939 * TODO: implement true MIPS memory barriers for macros below.
    4040 */
    41 #define CS_ENTER_BARRIER()      __asm__ volatile ("" ::: "memory")
    42 #define CS_LEAVE_BARRIER()      __asm__ volatile ("" ::: "memory")
     41#define CS_ENTER_BARRIER()      asm volatile ("" ::: "memory")
     42#define CS_LEAVE_BARRIER()      asm volatile ("" ::: "memory")
    4343
    44 #define memory_barrier()        __asm__ volatile ("" ::: "memory")
    45 #define read_barrier()          __asm__ volatile ("" ::: "memory")
    46 #define write_barrier()         __asm__ volatile ("" ::: "memory")
     44#define memory_barrier()        asm volatile ("" ::: "memory")
     45#define read_barrier()          asm volatile ("" ::: "memory")
     46#define write_barrier()         asm volatile ("" ::: "memory")
    4747
    4848#endif
  • kernel/arch/mips32/include/mm/tlb.h

    r62c63fc re7b7be3f  
    143143static inline void tlbp(void)
    144144{
    145         __asm__ volatile ("tlbp\n\t");
     145        asm volatile ("tlbp\n\t");
    146146}
    147147
     
    153153static inline void tlbr(void)
    154154{
    155         __asm__ volatile ("tlbr\n\t");
     155        asm volatile ("tlbr\n\t");
    156156}
    157157
     
    162162static inline void tlbwi(void)
    163163{
    164         __asm__ volatile ("tlbwi\n\t");
     164        asm volatile ("tlbwi\n\t");
    165165}
    166166
     
    171171static inline void tlbwr(void)
    172172{
    173         __asm__ volatile ("tlbwr\n\t");
     173        asm volatile ("tlbwr\n\t");
    174174}
    175175
  • kernel/arch/sparc64/include/asm.h

    r62c63fc re7b7be3f  
    5252        uint64_t v;
    5353       
    54         __asm__ volatile ("rdpr %%pstate, %0\n" : "=r" (v));
     54        asm volatile ("rdpr %%pstate, %0\n" : "=r" (v));
    5555       
    5656        return v;
     
    6363static inline void pstate_write(uint64_t v)
    6464{
    65         __asm__ volatile ("wrpr %0, %1, %%pstate\n" : : "r" (v), "i" (0));
     65        asm volatile ("wrpr %0, %1, %%pstate\n" : : "r" (v), "i" (0));
    6666}
    6767
     
    7474        uint64_t v;
    7575       
    76         __asm__ volatile ("rd %%tick_cmpr, %0\n" : "=r" (v));
     76        asm volatile ("rd %%tick_cmpr, %0\n" : "=r" (v));
    7777       
    7878        return v;
     
    8585static inline void tick_compare_write(uint64_t v)
    8686{
    87         __asm__ volatile ("wr %0, %1, %%tick_cmpr\n" : : "r" (v), "i" (0));
     87        asm volatile ("wr %0, %1, %%tick_cmpr\n" : : "r" (v), "i" (0));
    8888}
    8989
     
    9696        uint64_t v;
    9797       
    98         __asm__ volatile ("rdpr %%tick, %0\n" : "=r" (v));
     98        asm volatile ("rdpr %%tick, %0\n" : "=r" (v));
    9999       
    100100        return v;
     
    107107static inline void tick_write(uint64_t v)
    108108{
    109         __asm__ volatile ("wrpr %0, %1, %%tick\n" : : "r" (v), "i" (0));
     109        asm volatile ("wrpr %0, %1, %%tick\n" : : "r" (v), "i" (0));
    110110}
    111111
     
    118118        uint64_t v;
    119119       
    120         __asm__ volatile ("rd %%fprs, %0\n" : "=r" (v));
     120        asm volatile ("rd %%fprs, %0\n" : "=r" (v));
    121121       
    122122        return v;
     
    129129static inline void fprs_write(uint64_t v)
    130130{
    131         __asm__ volatile ("wr %0, %1, %%fprs\n" : : "r" (v), "i" (0));
     131        asm volatile ("wr %0, %1, %%fprs\n" : : "r" (v), "i" (0));
    132132}
    133133
     
    140140        uint64_t v;
    141141
    142         __asm__ volatile ("rd %%softint, %0\n" : "=r" (v));
     142        asm volatile ("rd %%softint, %0\n" : "=r" (v));
    143143
    144144        return v;
     
    151151static inline void softint_write(uint64_t v)
    152152{
    153         __asm__ volatile ("wr %0, %1, %%softint\n" : : "r" (v), "i" (0));
     153        asm volatile ("wr %0, %1, %%softint\n" : : "r" (v), "i" (0));
    154154}
    155155
     
    162162static inline void clear_softint_write(uint64_t v)
    163163{
    164         __asm__ volatile ("wr %0, %1, %%clear_softint\n" : : "r" (v), "i" (0));
     164        asm volatile ("wr %0, %1, %%clear_softint\n" : : "r" (v), "i" (0));
    165165}
    166166
     
    173173static inline void set_softint_write(uint64_t v)
    174174{
    175         __asm__ volatile ("wr %0, %1, %%set_softint\n" : : "r" (v), "i" (0));
     175        asm volatile ("wr %0, %1, %%set_softint\n" : : "r" (v), "i" (0));
    176176}
    177177
     
    248248        uintptr_t unbiased_sp;
    249249       
    250         __asm__ volatile ("add %%sp, %1, %0\n" : "=r" (unbiased_sp) : "i" (STACK_BIAS));
     250        asm volatile ("add %%sp, %1, %0\n" : "=r" (unbiased_sp) : "i" (STACK_BIAS));
    251251       
    252252        return ALIGN_DOWN(unbiased_sp, STACK_SIZE);
     
    261261        uint64_t v;
    262262       
    263         __asm__ volatile ("rdpr %%ver, %0\n" : "=r" (v));
     263        asm volatile ("rdpr %%ver, %0\n" : "=r" (v));
    264264       
    265265        return v;
     
    274274        uint64_t v;
    275275       
    276         __asm__ volatile ("rdpr %%tpc, %0\n" : "=r" (v));
     276        asm volatile ("rdpr %%tpc, %0\n" : "=r" (v));
    277277       
    278278        return v;
     
    287287        uint64_t v;
    288288       
    289         __asm__ volatile ("rdpr %%tl, %0\n" : "=r" (v));
     289        asm volatile ("rdpr %%tl, %0\n" : "=r" (v));
    290290       
    291291        return v;
     
    300300        uint64_t v;
    301301       
    302         __asm__ volatile ("rdpr %%tba, %0\n" : "=r" (v));
     302        asm volatile ("rdpr %%tba, %0\n" : "=r" (v));
    303303       
    304304        return v;
     
    311311static inline void tba_write(uint64_t v)
    312312{
    313         __asm__ volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0));
     313        asm volatile ("wrpr %0, %1, %%tba\n" : : "r" (v), "i" (0));
    314314}
    315315
     
    325325        uint64_t v;
    326326       
    327         __asm__ volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" ((unsigned) asi));
     327        asm volatile ("ldxa [%1] %2, %0\n" : "=r" (v) : "r" (va), "i" ((unsigned) asi));
    328328       
    329329        return v;
     
    338338static inline void asi_u64_write(asi_t asi, uintptr_t va, uint64_t v)
    339339{
    340         __asm__ volatile ("stxa %0, [%1] %2\n" : :  "r" (v), "r" (va), "i" ((unsigned) asi) : "memory");
     340        asm volatile ("stxa %0, [%1] %2\n" : :  "r" (v), "r" (va), "i" ((unsigned) asi) : "memory");
    341341}
    342342
     
    344344static inline void flushw(void)
    345345{
    346         __asm__ volatile ("flushw\n");
     346        asm volatile ("flushw\n");
    347347}
    348348
     
    350350static inline void nucleus_enter(void)
    351351{
    352         __asm__ volatile ("wrpr %g0, 1, %tl\n");
     352        asm volatile ("wrpr %g0, 1, %tl\n");
    353353}
    354354
     
    356356static inline void nucleus_leave(void)
    357357{
    358         __asm__ volatile ("wrpr %g0, %g0, %tl\n");
     358        asm volatile ("wrpr %g0, %g0, %tl\n");
    359359}
    360360
  • kernel/arch/sparc64/include/atomic.h

    r62c63fc re7b7be3f  
    5858                a = *((uint64_t *) x);
    5959                b = a + i;
    60                 __asm__ volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), "+r" (b) : "r" (a));
     60                asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *)x)), "+r" (b) : "r" (a));
    6161        } while (a != b);
    6262
     
    9999        volatile uintptr_t x = (uint64_t) &val->count;
    100100
    101         __asm__ volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), "+r" (v) : "r" (0));
     101        asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), "+r" (v) : "r" (0));
    102102
    103103        return v;
     
    111111        volatile uintptr_t x = (uint64_t) &val->count;
    112112
    113         __asm__ volatile (
     113        asm volatile (
    114114        "0:\n"
    115115                "casx %0, %3, %1\n"
  • kernel/arch/sparc64/include/barrier.h

    r62c63fc re7b7be3f  
    4040 */
    4141#define CS_ENTER_BARRIER()                              \
    42         __asm__ volatile (                              \
     42        asm volatile (                          \
    4343                "membar #LoadLoad | #LoadStore\n"       \
    4444                ::: "memory"                            \
    4545        )
    4646#define CS_LEAVE_BARRIER()                              \
    47         __asm__ volatile (                              \
     47        asm volatile (                          \
    4848                "membar #StoreStore\n"                  \
    4949                "membar #LoadStore\n"                   \
     
    5252
    5353#define memory_barrier()        \
    54         __asm__ volatile ("membar #LoadLoad | #StoreStore\n" ::: "memory")
     54        asm volatile ("membar #LoadLoad | #StoreStore\n" ::: "memory")
    5555#define read_barrier()          \
    56         __asm__ volatile ("membar #LoadLoad\n" ::: "memory")
     56        asm volatile ("membar #LoadLoad\n" ::: "memory")
    5757#define write_barrier()         \
    58         __asm__ volatile ("membar #StoreStore\n" ::: "memory")
     58        asm volatile ("membar #StoreStore\n" ::: "memory")
    5959
    6060/** Flush Instruction Memory instruction. */
     
    7171         */
    7272         
    73         __asm__ volatile ("flush %o7\n");
     73        asm volatile ("flush %o7\n");
    7474}
    7575
     
    7777static inline void membar(void)
    7878{
    79         __asm__ volatile ("membar #Sync\n");
     79        asm volatile ("membar #Sync\n");
    8080}
    8181
  • kernel/arch/sparc64/src/fpu_context.c

    r62c63fc re7b7be3f  
    4040void fpu_context_save(fpu_context_t *fctx)
    4141{
    42         __asm__ volatile (
     42        asm volatile (
    4343                "std %%f0, %0\n"
    4444                "std %%f2, %1\n"
     
    6868         */
    6969       
    70         __asm__ volatile (
     70        asm volatile (
    7171                "std %%f32, %0\n"
    7272                "std %%f34, %1\n"
     
    9191        );
    9292       
    93         __asm__ volatile ("stx %%fsr, %0\n" : "=m" (fctx->fsr));
     93        asm volatile ("stx %%fsr, %0\n" : "=m" (fctx->fsr));
    9494}
    9595
    9696void fpu_context_restore(fpu_context_t *fctx)
    9797{
    98         __asm__ volatile (
     98        asm volatile (
    9999                "ldd %0, %%f0\n"
    100100                "ldd %1, %%f2\n"
     
    125125         */
    126126       
    127         __asm__ volatile (
     127        asm volatile (
    128128                "ldd %0, %%f32\n"
    129129                "ldd %1, %%f34\n"
     
    149149        );
    150150       
    151         __asm__ volatile ("ldx %0, %%fsr\n" : : "m" (fctx->fsr));
     151        asm volatile ("ldx %0, %%fsr\n" : : "m" (fctx->fsr));
    152152}
    153153
  • uspace/libc/arch/amd64/include/atomic.h

    r62c63fc re7b7be3f  
    3939
    4040static inline void atomic_inc(atomic_t *val) {
    41         __asm__ volatile ("lock incq %0\n" : "=m" (val->count));
     41        asm volatile ("lock incq %0\n" : "=m" (val->count));
    4242}
    4343
    4444static inline void atomic_dec(atomic_t *val) {
    45         __asm__ volatile ("lock decq %0\n" : "=m" (val->count));
     45        asm volatile ("lock decq %0\n" : "=m" (val->count));
    4646}
    4747
     
    5050        long r;
    5151
    52         __asm__ volatile (
     52        asm volatile (
    5353                "movq $1, %0\n"
    5454                "lock xaddq %0, %1\n"
     
    6363        long r;
    6464       
    65         __asm__ volatile (
     65        asm volatile (
    6666                "movq $-1, %0\n"
    6767                "lock xaddq %0, %1\n"
  • uspace/libc/arch/amd64/include/thread.h

    r62c63fc re7b7be3f  
    5252        void * retval;
    5353
    54         __asm__ ("movq %%fs:0, %0" : "=r"(retval));
     54        asm ("movq %%fs:0, %0" : "=r"(retval));
    5555        return retval;
    5656}
  • uspace/libc/arch/ia32/include/atomic.h

    r62c63fc re7b7be3f  
    3737
    3838static inline void atomic_inc(atomic_t *val) {
    39         __asm__ volatile ("lock incl %0\n" : "=m" (val->count));
     39        asm volatile ("lock incl %0\n" : "=m" (val->count));
    4040}
    4141
    4242static inline void atomic_dec(atomic_t *val) {
    43         __asm__ volatile ("lock decl %0\n" : "=m" (val->count));
     43        asm volatile ("lock decl %0\n" : "=m" (val->count));
    4444}
    4545
     
    4848        long r;
    4949
    50         __asm__ volatile (
     50        asm volatile (
    5151                "movl $1, %0\n"
    5252                "lock xaddl %0, %1\n"
     
    6161        long r;
    6262       
    63         __asm__ volatile (
     63        asm volatile (
    6464                "movl $-1, %0\n"
    6565                "lock xaddl %0, %1\n"
  • uspace/libc/arch/ia32/include/thread.h

    r62c63fc re7b7be3f  
    5252        void * retval;
    5353
    54         __asm__ ("movl %%gs:0, %0" : "=r"(retval));
     54        asm ("movl %%gs:0, %0" : "=r"(retval));
    5555        return retval;
    5656}
  • uspace/libc/arch/ia64/include/atomic.h

    r62c63fc re7b7be3f  
    4747        long v;
    4848
    49         __asm__ volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "+m" (val->count) : "i" (imm));
     49        asm volatile ("fetchadd8.rel %0 = %1, %2\n" : "=r" (v), "+m" (val->count) : "i" (imm));
    5050 
    5151        return v;
  • uspace/libc/arch/ia64/include/thread.h

    r62c63fc re7b7be3f  
    4646static inline void __tcb_set(tcb_t *tcb)
    4747{
    48         __asm__ volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13");
     48        asm volatile ("mov r13 = %0\n" : : "r" (tcb) : "r13");
    4949}
    5050
     
    5353        void *retval;
    5454
    55         __asm__ volatile ("mov %0 = r13\n" : "=r" (retval));
     55        asm volatile ("mov %0 = r13\n" : "=r" (retval));
    5656
    5757        return retval;
  • uspace/libc/arch/mips32/include/atomic.h

    r62c63fc re7b7be3f  
    5757        long tmp, v;
    5858
    59         __asm__ volatile (
     59        asm volatile (
    6060                "1:\n"
    6161                "       ll %0, %1\n"
  • uspace/libc/arch/mips32/include/thread.h

    r62c63fc re7b7be3f  
    6262        tp += MIPS_TP_OFFSET + sizeof(tcb_t);
    6363
    64         __asm__ volatile ("add $27, %0, $0" : : "r"(tp)); /* Move tls to K1 */
     64        asm volatile ("add $27, %0, $0" : : "r"(tp)); /* Move tls to K1 */
    6565}
    6666
     
    6969        void * retval;
    7070
    71         __asm__ volatile("add %0, $27, $0" : "=r"(retval));
     71        asm volatile("add %0, $27, $0" : "=r"(retval));
    7272
    7373        return (tcb_t *)(retval - MIPS_TP_OFFSET - sizeof(tcb_t));
  • uspace/libc/arch/ppc32/include/atomic.h

    r62c63fc re7b7be3f  
    4040        long tmp;
    4141
    42         asm __volatile__ (
     42        asm volatile (
    4343                "1:\n"
    4444                "lwarx %0, 0, %2\n"
     
    5555        long tmp;
    5656
    57         asm __volatile__(
     57        asm volatile (
    5858                "1:\n"
    5959                "lwarx %0, 0, %2\n"
  • uspace/libc/arch/ppc64/include/atomic.h

    r62c63fc re7b7be3f  
    4040        long tmp;
    4141
    42         asm __volatile__ (
     42        asm volatile (
    4343                "1:\n"
    4444                "lwarx %0, 0, %2\n"
     
    5555        long tmp;
    5656
    57         asm __volatile__(
     57        asm volatile (
    5858                "1:\n"
    5959                "lwarx %0, 0, %2\n"
  • uspace/libc/arch/sparc64/include/atomic.h

    r62c63fc re7b7be3f  
    5454                a = val->count;
    5555                b = a + i;
    56                 __asm__ volatile ("casx %0, %2, %1\n" : "+m" (*val), "+r" (b) : "r" (a));
     56                asm volatile ("casx %0, %2, %1\n" : "+m" (*val), "+r" (b) : "r" (a));
    5757        } while (a != b);
    5858
  • uspace/libc/arch/sparc64/include/syscall.h

    r62c63fc re7b7be3f  
    4747        register uint64_t a4 asm("o3") = p4;
    4848
    49         __asm__ volatile (
     49        asm volatile (
    5050                "ta %5\n"
    5151                : "=r" (a1)
  • uspace/libc/arch/sparc64/include/thread.h

    r62c63fc re7b7be3f  
    4646static inline void __tcb_set(tcb_t *tcb)
    4747{
    48         __asm__ volatile ("mov %0, %%g7\n" : : "r" (tcb) : "g7");
     48        asm volatile ("mov %0, %%g7\n" : : "r" (tcb) : "g7");
    4949}
    5050
     
    5353        void *retval;
    5454
    55         __asm__ volatile ("mov %%g7, %0\n" : "=r" (retval));
     55        asm volatile ("mov %%g7, %0\n" : "=r" (retval));
    5656
    5757        return retval;
  • uspace/libc/malloc/malloc.c

    r62c63fc re7b7be3f  
    15701570  else {\
    15711571    unsigned int K;\
    1572     __asm__("bsrl %1,%0\n\t" : "=r" (K) : "rm"  (X));\
     1572    asm("bsrl %1,%0\n\t" : "=r" (K) : "rm"  (X));\
    15731573    I =  (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
    15741574  }\
     
    16291629{\
    16301630  unsigned int J;\
    1631   __asm__("bsfl %1,%0\n\t" : "=r" (J) : "rm" (X));\
     1631  asm("bsfl %1,%0\n\t" : "=r" (J) : "rm" (X));\
    16321632  I = (bindex_t)J;\
    16331633}
Note: See TracChangeset for help on using the changeset viewer.