Changeset e762b43 in mainline for kernel/arch/arm32/include/regutils.h


Ignore:
Timestamp:
2009-03-03T16:12:43Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
02fd705
Parents:
f24d300
Message:

better inline assembler readability using the new symbolic syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/include/regutils.h

    rf24d300 re762b43  
    2727 */
    2828
    29 /** @addtogroup arm32   
     29/** @addtogroup arm32
    3030 * @{
    3131 */
     
    5858{ \
    5959        uint32_t retval; \
    60         asm volatile("mrs %0, " #reg : "=r" (retval)); \
     60        asm volatile( \
     61                "mrs %[retval], " #reg \
     62                : [retval] "=r" (retval) \
     63        ); \
    6164        return retval; \
    6265}
     
    6568static inline void nm## _status_reg_ ##fieldname## _write(uint32_t value) \
    6669{ \
    67         asm volatile("msr " #reg "_" #field ", %0" : : "r" (value)); \
     70        asm volatile( \
     71                "msr " #reg "_" #field ", %[value]" \
     72                :: [value] "r" (value) \
     73        ); \
    6874}
    6975
Note: See TracChangeset for help on using the changeset viewer.