ARM: 5757/1: Thumb-2: Correct "mov.w pc, lr" instruction which is unpredictable
[safe/jmp/linux-2.6] / arch / arm / kernel / entry-header.S
index ac34c0d..7e9ed1e 100644 (file)
        mov     \rd, sp, lsr #13
        mov     \rd, \rd, lsl #13
        .endm
+
+       @
+       @ 32-bit wide "mov pc, reg"
+       @
+       .macro  movw_pc, reg
+       mov     pc, \reg
+       .endm
 #else  /* CONFIG_THUMB2_KERNEL */
        .macro  svc_exit, rpsr
        clrex                                   @ clear the exclusive monitor
        lsr     \rd, \rd, #13
        mov     \rd, \rd, lsl #13
        .endm
+
+       @
+       @ 32-bit wide "mov pc, reg"
+       @
+       .macro  movw_pc, reg
+       mov     pc, \reg
+       nop
+       .endm
 #endif /* !CONFIG_THUMB2_KERNEL */
 
 /*