diff options
Diffstat (limited to 'libgloss/arm/swi.h')
-rw-r--r-- | libgloss/arm/swi.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libgloss/arm/swi.h b/libgloss/arm/swi.h index 15c3866a1..f5c910313 100644 --- a/libgloss/arm/swi.h +++ b/libgloss/arm/swi.h @@ -33,6 +33,14 @@ #else #define AngelSWI AngelSWI_ARM #endif +/* For Thumb-2 code use the BKPT instruction instead of SWI. */ +#ifdef __thumb2__ +#define AngelSWIInsn "bkpt" +#define AngelSWIAsm bkpt +#else +#define AngelSWIInsn "swi" +#define AngelSWIAsm swi +#endif /* The reason codes: */ #define AngelSWI_Reason_Open 0x01 |