OpenCores
URL https://opencores.org/ocsvn/c0or1k/c0or1k/trunk

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [src/] [arch/] [arm/] [v5/] [atomic.S.ARM] - Diff between revs 2 and 6

Only display areas with differences | Details | Blame | View Log

Rev 2 Rev 6
 
/*
 
 * Copyright (C) 2010 B Labs
 
 *
 
 * Author: Bahadir Balban
 
 */
 
 
 
#include INC_ARCH(asm.h)
 
 
 
/*
 
 * Atomically and destructively reads a byte. E.g.
 
 * byte is read and zero is written back. This is
 
 * useful on reading irq counts
 
 *
 
 * @r0 = byte address
 
 */
 
BEGIN_PROC(l4_atomic_dest_readb)
 
        mov     r1, #0
 
        swpb    r2, r1, [r0]
 
        mov     r0, r2
 
        mov     pc, lr
 
END_PROC(l4_atomic_dest_readb)
 
 
 
 
 
 
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.