diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h index 5947ca171e..3e269c287d 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -710,6 +710,26 @@ Lyre prototype 1 */ | |||
710 | #define ROCKBOX_STRICT_ALIGN 1 | 710 | #define ROCKBOX_STRICT_ALIGN 1 |
711 | #endif | 711 | #endif |
712 | 712 | ||
713 | #if defined(CPU_ARM) && defined(__ASSEMBLER__) | ||
714 | /* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */ | ||
715 | .macro ldmpc cond="", order="ia", regs:req | ||
716 | #if ARM_ARCH == 4 && defined(USE_THUMB) | ||
717 | ldm\cond\order sp!, { \regs, lr } | ||
718 | bx\cond lr | ||
719 | #else | ||
720 | ldm\cond\order sp!, { \regs, pc } | ||
721 | #endif | ||
722 | .endm | ||
723 | .macro ldrpc cond="" | ||
724 | #if ARM_ARCH == 4 && defined(USE_THUMB) | ||
725 | ldr\cond lr, [sp], #4 | ||
726 | bx\cond lr | ||
727 | #else | ||
728 | ldr\cond pc, [sp], #4 | ||
729 | #endif | ||
730 | .endm | ||
731 | #endif | ||
732 | |||
713 | #ifndef CODEC_SIZE | 733 | #ifndef CODEC_SIZE |
714 | #define CODEC_SIZE 0 | 734 | #define CODEC_SIZE 0 |
715 | #endif | 735 | #endif |