Changeset 4940


Ignore:
Timestamp:
Aug 8, 2006, 12:05:32 PM (18 years ago)
Author:
Gary Byers
Message:

Darwin assembler doesn't like lock instructions on the same line as
the locked instruction. (Maybe there's a better way to do this, than
just pretending that lock is a standalone instruction, but that lock
instruction does seem to be treated as a prefix.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/lisp-kernel/x86-asmutils64.s

    r4836 r4940  
    7171_exportfn(C(store_conditional))
    7272        __(mov %rsi,%rax)
    73         __(lock cmpxchgq %rdx,(%rdi))
     73        __(lock)
     74        __(cmpxchgq %rdx,(%rdi))
    7475        __(cmovne %rdx,%rax)
    7576        __(ret)
     
    8081
    8182_exportfn(C(atomic_swap))
    82         __(lock xchg %rsi,(%rdi))
     83        __(lock)
     84        __(xchg %rsi,(%rdi))
    8385        __(mov %rsi,%rax)
    8486        __(ret)
     
    9294        __(movq %rax,%rcx)
    9395        __(orq %rsi,%rcx)
    94         __(lock cmpxchg %rcx,(%rdi))
     96        __(lock)
     97        __(cmpxchg %rcx,(%rdi))
    9598        __(jnz 0b)
    9699        __(andq %rsi,%rax)
Note: See TracChangeset for help on using the changeset viewer.