Merge tag 'xilinx-for-v2017.09' of git://www.denx.de/git/u-boot-microblaze
[oweals/u-boot.git] / arch / arm / include / asm / assembler.h
index 11b80fb190ce03165ac505bf4412d485a30b4840..b146918586015da8229ac85cd5662d83b927e6fd 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 #include <config.h>
+#include <asm/unified.h>
 
 /*
  * Endian independent macros for shifting bytes within registers.
 #define PLD(code...)
 #endif
 
+/*
+ * We only support cores that support at least Thumb-1 and thus we use
+ * 'bx lr'
+ */
        .irp    c,,eq,ne,cs,cc,mi,pl,vs,vc,hi,ls,ge,lt,gt,le,hs,lo
        .macro  ret\c, reg
-#if defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__)
-       mov\c   pc, \reg
-#else
        .ifeqs  "\reg", "lr"
        bx\c    \reg
        .else
        mov\c   pc, \reg
        .endif
-#endif
        .endm
        .endr
 
@@ -76,7 +77,7 @@
  * We disable it especially for Thumb builds since those instructions
  * are not made in a Thumb ready way...
  */
-#ifdef CONFIG_SYS_THUMB_BUILD
+#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD)
 #define CALGN(code...)
 #else
 #define CALGN(code...) code