~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to arch/arm/mm/abort-macro.S

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 *
10
10
 */
11
11
 
12
 
        .macro  do_thumb_abort
13
 
        tst     r3, #PSR_T_BIT
 
12
        .macro  do_thumb_abort, fsr, pc, psr, tmp
 
13
        tst     \psr, #PSR_T_BIT
14
14
        beq     not_thumb
15
 
        ldrh    r3, [r2]                        @ Read aborted Thumb instruction
16
 
        and     r3, r3, # 0xfe00                @ Mask opcode field
17
 
        cmp     r3, # 0x5600                    @ Is it ldrsb?
18
 
        orreq   r3, r3, #1 << 11                @ Set L-bit if yes
19
 
        tst     r3, #1 << 11                    @ L = 0 -> write
20
 
        orreq   r1, r1, #1 << 11                @ yes.
21
 
        mov     pc, lr
 
15
        ldrh    \tmp, [\pc]                     @ Read aborted Thumb instruction
 
16
        and     \tmp, \tmp, # 0xfe00            @ Mask opcode field
 
17
        cmp     \tmp, # 0x5600                  @ Is it ldrsb?
 
18
        orreq   \tmp, \tmp, #1 << 11            @ Set L-bit if yes
 
19
        tst     \tmp, #1 << 11                  @ L = 0 -> write
 
20
        orreq   \psr, \psr, #1 << 11            @ yes.
 
21
        b       do_DataAbort
22
22
not_thumb:
23
23
        .endm
24
24
 
25
25
/*
26
 
 * We check for the following insturction encoding for LDRD.
 
26
 * We check for the following instruction encoding for LDRD.
27
27
 *
28
 
 * [27:25] == 0
 
28
 * [27:25] == 000
29
29
 *   [7:4] == 1101
30
30
 *    [20] == 0
31
31
 */
32
 
        .macro  do_ldrd_abort
33
 
        tst     r3, #0x0e000000                 @ [27:25] == 0
34
 
        bne     not_ldrd
35
 
        and     r2, r3, #0x000000f0             @ [7:4] == 1101
36
 
        cmp     r2, #0x000000d0
37
 
        bne     not_ldrd
38
 
        tst     r3, #1 << 20                    @ [20] == 0
39
 
        moveq   pc, lr
 
32
        .macro  do_ldrd_abort, tmp, insn
 
33
        tst     \insn, #0x0e100000              @ [27:25,20] == 0
 
34
        bne     not_ldrd
 
35
        and     \tmp, \insn, #0x000000f0        @ [7:4] == 1101
 
36
        cmp     \tmp, #0x000000d0
 
37
        beq     do_DataAbort
40
38
not_ldrd:
41
39
        .endm
42
40