Ignore:
Timestamp:
Jul 17, 2009, 1:53:04 PM (12 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, 5, master
Children:
ec5d4505
Parents:
9832a22
Message:

ARM bsp maintenance

File:
1 edited

Legend:

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

    r9832a22 r7ae2775  
    6565  if(!mode) mode="unknown";
    6666
    67 #if defined(__thumb__)
    68   asm volatile (" .code 16 \n" \
    69                 "adr %[tmp], arm_code \n" \
    70                 "bx  %[tmp]           \n" \
    71                 "nop                  \n" \
    72                 ".code 32             \n" \
    73                 "arm_code:            \n" \
    74                 : [tmp]"=&r" (tmp) );
    75 #endif
    76   asm volatile ("       MRS  %[cpsr], cpsr \n"
    77             "   ORR  %[tmp], %[spsr], #0xc0 \n"
    78             "   MSR  cpsr_c, %[tmp] \n"
    79             "   MOV  %[prev_sp], sp \n"
    80             "   MOV  %[prev_lr], lr \n"
    81             "   MSR  cpsr_c, %[cpsr] \n"
    82             : [prev_sp] "=&r" (prev_sp), [prev_lr] "=&r" (prev_lr),
    83               [cpsr] "=&r" (cpsr), [tmp] "=&r" (tmp)
    84             : [spsr] "r" (spsr)
    85             : "cc");
     67  asm volatile (
     68    THUMB_TO_ARM
     69    "mrs %[cpsr], cpsr\n"
     70    "orr %[tmp], %[spsr], #0xc0\n"
     71    "msr cpsr_c, %[tmp]\n"
     72    "mov %[prev_sp], sp\n"
     73    "mov %[prev_lr], lr\n"
     74    "msr cpsr_c, %[cpsr]\n"
     75    ARM_TO_THUMB
     76    : [prev_sp] "=&r" (prev_sp), [prev_lr] "=&r" (prev_lr),
     77      [cpsr] "=&r" (cpsr), [tmp] "=&r" (tmp)
     78    : [spsr] "r" (spsr)
     79    : "cc"
     80  );
    8681
    8782  printk(
Note: See TracChangeset for help on using the changeset viewer.