summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/arm/rtems/asm.h
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2010-01-12 15:03:22 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2010-01-12 15:03:22 +0000
commit39c8fdb416327c5ec0c23807ae701798a5739cdf (patch)
tree0f2bb4acb60e60d74b7ef08e345a21d7896aba20 /cpukit/score/cpu/arm/rtems/asm.h
parent2010-01-11 Marc Pignat <marc.pignat@hevs.ch> (diff)
downloadrtems-39c8fdb416327c5ec0c23807ae701798a5739cdf.tar.bz2
add support for lpc32xx
Diffstat (limited to 'cpukit/score/cpu/arm/rtems/asm.h')
-rw-r--r--cpukit/score/cpu/arm/rtems/asm.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/cpukit/score/cpu/arm/rtems/asm.h b/cpukit/score/cpu/arm/rtems/asm.h
index 04c5360790..f8b027cf1b 100644
--- a/cpukit/score/cpu/arm/rtems/asm.h
+++ b/cpukit/score/cpu/arm/rtems/asm.h
@@ -141,4 +141,20 @@
.globl name ; name: ; .globl name ## _arm ; name ## _arm:
#endif
+.macro SWITCH_FROM_THUMB_TO_ARM
+#ifdef __thumb__
+.align 2
+ bx pc
+.arm
+#endif /* __thumb__ */
+.endm
+
+.macro SWITCH_FROM_ARM_TO_THUMB REG
+#ifdef __thumb__
+ add \REG, pc, #1
+ bx \REG
+.thumb
+#endif /* __thumb__ */
+.endm
+
#endif /* _RTEMS_ASM_H */