Ignore:
Timestamp:
Jun 29, 2017, 1:27:43 PM (7 years ago)
Author:
max@…
Message:

remove lw_unc, add a few ops, and update a few things

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/core/hal_cpu.S

    r91 r94  
    5656        ret
    5757
     58ASM_ENTRY(rdtsc)
     59        xorq    %rax,%rax
     60        rdtsc
     61        shlq    $32,%rdx
     62        orq     %rdx,%rax
     63        ret
     64
    5865ASM_ENTRY(in8)
    5966        movq    %rdi,%rdx
     
    8895        ret
    8996
     97/* -------------------------------------------------------------------------- */
     98
     99ASM_ENTRY(atomic_cas_32)
     100        movl    %esi,%eax
     101        lock
     102        cmpxchgl %edx,(%rdi)
     103        /* %eax now contains the old value */
     104        ret
     105
     106ASM_ENTRY(atomic_add_32)
     107        lock
     108        addl    %esi,(%rdi)
     109        ret
     110
Note: See TracChangeset for help on using the changeset viewer.