Changeset ab504d3 in rtems


Ignore:
Timestamp:
Mar 18, 2003, 7:22:33 PM (17 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
66565bb
Parents:
64f8ae4
Message:

2003-03-18 Till Straumann <strauman@…>

PR 356/bsps

  • cpu.c: This patch makes RTEMS/PowerPC eabi compliant.
Location:
c/src/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/support/new_exception_processing/ChangeLog

    r64f8ae4 rab504d3  
     12003-03-18  Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 356/bsps
     4        * cpu.c: This patch makes RTEMS/PowerPC eabi compliant.
     5
    162003-03-06      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    27
  • c/src/lib/libbsp/powerpc/support/new_exception_processing/cpu.c

    r64f8ae4 rab504d3  
    7171
    7272  sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
     73
     74  sp &= ~(CPU_STACK_ALIGNMENT-1);
     75
    7376  *((unsigned32 *)sp) = 0;
    7477  the_context->gpr1 = sp;
     
    110113
    111114  the_context->pc = (unsigned32)entry_point;
     115
     116#if (PPC_ABI == PPC_ABI_SVR4)
     117  { unsigned    r13 = 0;
     118    asm volatile ("mr %0, 13" : "=r" ((r13)));
     119   
     120    the_context->gpr13 = r13;
     121  }
     122#elif (PPC_ABI == PPC_ABI_EABI)
     123  { unsigned32  r2 = 0;
     124    unsigned    r13 = 0;
     125    asm volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
     126 
     127    the_context->gpr2 = r2;
     128    the_context->gpr13 = r13;
     129  }
     130#else
     131#error unsupported PPC_ABI
     132#endif
    112133}
    113134
  • c/src/lib/libcpu/powerpc/new-exceptions/ChangeLog

    r64f8ae4 rab504d3  
     12003-03-18  Till Straumann <strauman@slac.stanford.edu>
     2
     3        PR 356/bsps
     4        * cpu.c: This patch makes RTEMS/PowerPC eabi compliant.
     5
    162003-03-06      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    27
  • c/src/lib/libcpu/powerpc/new-exceptions/cpu.c

    r64f8ae4 rab504d3  
    7171
    7272  sp = (unsigned32)stack_base + size - CPU_MINIMUM_STACK_FRAME_SIZE;
     73
     74  sp &= ~(CPU_STACK_ALIGNMENT-1);
     75
    7376  *((unsigned32 *)sp) = 0;
    7477  the_context->gpr1 = sp;
     
    110113
    111114  the_context->pc = (unsigned32)entry_point;
     115
     116#if (PPC_ABI == PPC_ABI_SVR4)
     117  { unsigned    r13 = 0;
     118    asm volatile ("mr %0, 13" : "=r" ((r13)));
     119   
     120    the_context->gpr13 = r13;
     121  }
     122#elif (PPC_ABI == PPC_ABI_EABI)
     123  { unsigned32  r2 = 0;
     124    unsigned    r13 = 0;
     125    asm volatile ("mr %0,2; mr %1,13" : "=r" ((r2)), "=r" ((r13)));
     126 
     127    the_context->gpr2 = r2;
     128    the_context->gpr13 = r13;
     129  }
     130#else
     131#error unsupported PPC_ABI
     132#endif
    112133}
    113134
Note: See TracChangeset for help on using the changeset viewer.