- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# arch/avr32/include/arch/compiler-gcc.h

Go to the documentation of this file.

    00001
    00041 #ifndef ARCH_COMPILER_GCC_H_INCLUDED
    00042 #define ARCH_COMPILER_GCC_H_INCLUDED
    00043
    00051 #define avr32_write_sr(x) asm volatile("mtsr 0, %0" :: "r"(x) : "cc")
    00052
    00056 static inline unsigned long bit_reverse(unsigned long word)
    00057 {
    00058         asm("brev       %0" : "=r"(word) : "0"(word));
    00059         return word;
    00060 }
    00061 #define bit_reverse(word)       bit_reverse(word)
    00062
    00066 #define avr32_set_sr_bit(x)     __builtin_ssrf(x)
    00067
    00071 #define avr32_clear_sr_bit(x)   __builtin_csrf(x)
    00072
    00079 #define cpu_irq_enable()                                \
    00080         do {                                            \
    00081                 barrier();                              \
    00082                 avr32_clear_sr_bit(SYSREG_SR_GM_BIT);   \
    00083         } while (0)
    00084
    00091 #define cpu_irq_disable()                               \
    00092         do {                                            \
    00093                 avr32_set_sr_bit(SYSREG_SR_GM_BIT);     \
    00094                 barrier();                              \
    00095         } while (0)
    00096
    00097
    00098 #endif /* ARCH_COMPILER_GCC_H_INCLUDED */