Changeset dace69bf in rtems


Ignore:
Timestamp:
Apr 17, 2010, 7:24:16 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
421ed95
Parents:
340d782
Message:

2010-04-17 Allan Hessenflow <allanh@…>

  • cpu.c, cpu_asm.S, rtems/score/cpu.h: Fine tune registers saved in the context. The sp and imask registers need to be saved. Also allocated 12 bytes on the stack at thread entry as the abi requires that.
Location:
cpukit/score/cpu/bfin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/bfin/ChangeLog

    r340d782 rdace69bf  
     12010-04-17      Allan Hessenflow <allanh@kallisti.com>
     2
     3        * cpu.c, cpu_asm.S, rtems/score/cpu.h: Fine tune registers saved in the
     4        context. The sp and imask registers need to be saved. Also allocated
     5        12 bytes on the stack at thread entry as the abi requires that.
     6
    172010-04-17      Mike Frysinger <vapier.adi@gmail.com>
    28
  • cpukit/score/cpu/bfin/cpu.c

    r340d782 rdace69bf  
    193193    stack_high = ((uint32_t)(stack_base) + size);
    194194
    195     the_context->register_sp = stack_high;
     195    /* blackfin abi requires caller to reserve 12 bytes on stack */
     196    the_context->register_sp = stack_high - 12;
    196197    the_context->register_rets = (uint32_t) entry_point;
    197198    the_context->imask = new_level ? 0 : 0xffff;
    198 
    199     /* Blackfin C ABI requires L regs to be 0 upon func entry. */
    200     the_context->register_l0 = 0;
    201     the_context->register_l1 = 0;
    202     the_context->register_l2 = 0;
    203     the_context->register_l3 = 0;
    204199}
    205200
  • cpukit/score/cpu/bfin/cpu_asm.S

    r340d782 rdace69bf  
    256256        [p0++] = sp;
    257257
    258         /* save length registers */
    259         r0 = l0;
    260         [p0++] = r0;
    261         r0 = l1;
    262         [p0++] = r0;
    263         r0 = l2;
    264         [p0++] = r0;
    265         r0 = l3;
    266         [p0++] = r0;
    267 
    268258        /* save rets */
    269259        r0 = rets;
     
    290280        fp = [p0++];
    291281        sp = [p0++];
    292 
    293         /* restore length registers */
    294         r0 = [p0++];
    295         l0 = r0;
    296         r0 = [p0++];
    297         l1 = r0;
    298         r0 = [p0++];
    299         l2 = r0;
    300         r0 = [p0++];
    301         l3 = r0;
    302282
    303283        /* restore rets */
  • cpukit/score/cpu/bfin/rtems/score/cpu.h

    r340d782 rdace69bf  
    481481    uint32_t   register_fp;
    482482    uint32_t   register_sp;
    483 
    484     uint32_t   register_l0;
    485     uint32_t   register_l1;
    486     uint32_t   register_l2;
    487     uint32_t   register_l3;
    488483
    489484    uint32_t   register_rets;
Note: See TracChangeset for help on using the changeset viewer.