Skip to content

Use proper CAS instructions  #76

@apellegr

Description

@apellegr

In include/atomics.h, shouldn't this:

        asm volatile(
        "       mov     %[old], %[exp]\n"
        "       cas   %[old], %[val], %[ptr]\n"
        : [old] "=&r" (old), [ptr] "+Q" (*(unsigned long *)ptr)
        : [exp] "Lr" (exp), [val] "r" (val)
        : );

Be:

        asm volatile(
        "       mov     %[old], %[exp]\n"
        "       casal   %[old], %[val], %[ptr]\n"
        : [old] "=&r" (old), [ptr] "+Q" (*(unsigned long *)ptr)
        : [exp] "Lr" (exp), [val] "r" (val)
        : );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions