123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- #ifndef __ASM_UNIFIED_H
- #define __ASM_UNIFIED_H
- #if defined(__ASSEMBLY__) && defined(CONFIG_ARM_ASM_UNIFIED)
- .syntax unified
- #endif
- #ifdef CONFIG_CPU_V7M
- #define AR_CLASS(x...)
- #define M_CLASS(x...) x
- #else
- #define AR_CLASS(x...) x
- #define M_CLASS(x...)
- #endif
- #ifdef CONFIG_THUMB2_KERNEL
- #if __GNUC__ < 4
- #error Thumb-2 kernel requires gcc >= 4
- #endif
- #define PSR_ISETSTATE PSR_T_BIT
- #define ARM(x...)
- #define THUMB(x...) x
- #ifdef __ASSEMBLY__
- #define W(instr) instr.w
- #else
- #define WASM(instr) #instr ".w"
- #endif
- #else
- #define PSR_ISETSTATE 0
- #define ARM(x...) x
- #define THUMB(x...)
- #ifdef __ASSEMBLY__
- #define W(instr) instr
- #else
- #define WASM(instr) #instr
- #endif
- #endif
- #ifndef CONFIG_ARM_ASM_UNIFIED
- #ifdef __ASSEMBLY__
- .macro it, cond
- .endm
- .macro itt, cond
- .endm
- .macro ite, cond
- .endm
- .macro ittt, cond
- .endm
- .macro itte, cond
- .endm
- .macro itet, cond
- .endm
- .macro itee, cond
- .endm
- .macro itttt, cond
- .endm
- .macro ittte, cond
- .endm
- .macro ittet, cond
- .endm
- .macro ittee, cond
- .endm
- .macro itett, cond
- .endm
- .macro itete, cond
- .endm
- .macro iteet, cond
- .endm
- .macro iteee, cond
- .endm
- #else
- __asm__(
- " .macro it, cond\n"
- " .endm\n"
- " .macro itt, cond\n"
- " .endm\n"
- " .macro ite, cond\n"
- " .endm\n"
- " .macro ittt, cond\n"
- " .endm\n"
- " .macro itte, cond\n"
- " .endm\n"
- " .macro itet, cond\n"
- " .endm\n"
- " .macro itee, cond\n"
- " .endm\n"
- " .macro itttt, cond\n"
- " .endm\n"
- " .macro ittte, cond\n"
- " .endm\n"
- " .macro ittet, cond\n"
- " .endm\n"
- " .macro ittee, cond\n"
- " .endm\n"
- " .macro itett, cond\n"
- " .endm\n"
- " .macro itete, cond\n"
- " .endm\n"
- " .macro iteet, cond\n"
- " .endm\n"
- " .macro iteee, cond\n"
- " .endm\n");
- #endif
- #endif
- #endif
|