Ignore:
Timestamp:
01/12/10 15:03:22 (13 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, 5, master
Children:
61df726
Parents:
29a3d72
Message:

add support for lpc32xx

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/shared/abort/abort.c

    r29a3d72 r39c8fdb  
    6464{
    6565    char *mode;
    66     uint32_t prev_sp,prev_lr,cpsr,tmp;
     66    uint32_t prev_sp,prev_lr,cpsr,arm_switch_reg;
    6767    int i;
    6868
     
    7272    if(!mode) mode="unknown";
    7373
    74     asm volatile ("     MRS  %[cpsr], cpsr \n"
    75               " ORR  %[tmp], %[spsr], #0xc0 \n"
    76               " MSR  cpsr_c, %[tmp] \n"
     74    asm volatile (ARM_SWITCH_TO_ARM
     75              " MRS  %[cpsr], cpsr \n"
     76              " ORR  %[arm_switch_reg], %[spsr], #0xc0 \n"
     77              " MSR  cpsr_c, %[arm_switch_reg] \n"
    7778              " MOV  %[prev_sp], sp \n"
    7879              " MOV  %[prev_lr], lr \n"
    7980              " MSR  cpsr_c, %[cpsr] \n"
    80               : [prev_sp] "=&r" (prev_sp), [prev_lr] "=&r" (prev_lr),
    81                 [cpsr] "=&r" (cpsr), [tmp] "=&r" (tmp)
     81              ARM_SWITCH_BACK
     82              : [arm_switch_reg] "=&r" (arm_switch_reg), [prev_sp] "=&r" (prev_sp), [prev_lr] "=&r" (prev_lr),
     83                [cpsr] "=&r" (cpsr)
    8284              : [spsr] "r" (spsr)
    8385              : "cc");
Note: See TracChangeset for help on using the changeset viewer.