Changeset 8044533 in rtems


Ignore:
Timestamp:
Jul 18, 1995, 7:27:50 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
10aed1e3
Parents:
f67ad3d
Message:

merged Linux UNIX simulator support (C)

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/score/cpu/i386/cpu.c

    rf67ad3d r8044533  
    7474 
    7575#if __GO32__
    76 #include <cpu.h>
    7776#include <go32.h>
    7877#include <dpmi.h>
     
    9089    *old_handler =  0;    /* XXX not supported */
    9190
    92     handler_info.pm_offset = new_handler;
     91    handler_info.pm_offset = (u_long) new_handler;
    9392    handler_info.pm_selector = _go32_my_cs();
    9493
  • c/src/exec/score/cpu/unix/cpu.c

    rf67ad3d r8044533  
    392392  *(addr + SP_OFF) = (unsigned32)(_stack_high - CPU_FRAME_SIZE);
    393393  *(addr + FP_OFF) = (unsigned32)(_stack_high);
     394
     395#elif defined(i386)
     396 
     397    /*
     398     *  This information was gathered by disassembling setjmp().
     399     */
     400 
     401    stack_ptr = _stack_high - CPU_FRAME_SIZE;
     402    *(addr + EBX_OFF) = 0xFEEDFEED;
     403    *(addr + ESI_OFF) = 0xDEADDEAD;
     404    *(addr + EDI_OFF) = 0xDEAFDEAF;
     405    *(addr + EBP_OFF) = stack_ptr;
     406    *(addr + ESP_OFF) = stack_ptr;
     407    *(addr + RET_OFF) = jmp_addr;
     408 
     409 
     410    addr = (unsigned32 *) stack_ptr;
     411 
     412    addr[ 0 ] = jmp_addr;
     413    addr[ 1 ] = (unsigned32) stack_ptr;
     414    addr[ 2 ] = (unsigned32) stack_ptr;
     415
    394416#else
    395417#error "UNKNOWN CPU!!!"
  • c/src/exec/score/cpu/unix/cpu.h

    rf67ad3d r8044533  
    265265#if defined(hppa1_1)
    266266#define CPU_STACK_GROWS_UP               TRUE
    267 #elif defined(sparc)
     267#elif defined(sparc) || defined(i386)
    268268#define CPU_STACK_GROWS_UP               FALSE
    269269#else
     
    363363#endif
    364364
     365#if defined(i386)
     366 
     367#ifdef RTEMS_NEWLIB
     368#error "Newlib not installed"
     369#endif
     370 
     371/*
     372 *  For Linux 1.1
     373 */
     374 
     375#ifdef RTEMS_UNIXLIB
     376#define EBX_OFF    0
     377#define ESI_OFF    1
     378#define EDI_OFF    2
     379#define EBP_OFF    3
     380#define ESP_OFF    4
     381#define RET_OFF    5
     382#endif
     383 
     384#endif
     385 
    365386#if defined(sparc)
    366387
     
    516537#elif defined(sparc)
    517538#define CPU_FRAME_SIZE  (112)   /* based on disassembled test code */
     539#elif defined(i386)
     540#define CPU_FRAME_SIZE  (24)  /* return address, sp, and bp pushed plus fudge */
    518541#else
    519542#error "Unknown CPU!!!"
  • c/src/exec/score/cpu/unix/unix.h

    rf67ad3d r8044533  
    6565#if defined(hpux)
    6666 
    67 #define RTEMS_MODEL_NAME  "hpux"
     67#define RTEMS_MODEL_NAME  "HP-UX"
    6868 
    6969#elif defined(solaris)
    7070 
    71 #define RTEMS_MODEL_NAME  "solaris"
     71#define RTEMS_MODEL_NAME  "Solaris"
     72 
     73#elif defined(linux)
     74 
     75#define RTEMS_MODEL_NAME  "Linux"
    7276 
    7377#else
  • cpukit/score/cpu/i386/cpu.c

    rf67ad3d r8044533  
    7474 
    7575#if __GO32__
    76 #include <cpu.h>
    7776#include <go32.h>
    7877#include <dpmi.h>
     
    9089    *old_handler =  0;    /* XXX not supported */
    9190
    92     handler_info.pm_offset = new_handler;
     91    handler_info.pm_offset = (u_long) new_handler;
    9392    handler_info.pm_selector = _go32_my_cs();
    9493
  • cpukit/score/cpu/unix/cpu.c

    rf67ad3d r8044533  
    392392  *(addr + SP_OFF) = (unsigned32)(_stack_high - CPU_FRAME_SIZE);
    393393  *(addr + FP_OFF) = (unsigned32)(_stack_high);
     394
     395#elif defined(i386)
     396 
     397    /*
     398     *  This information was gathered by disassembling setjmp().
     399     */
     400 
     401    stack_ptr = _stack_high - CPU_FRAME_SIZE;
     402    *(addr + EBX_OFF) = 0xFEEDFEED;
     403    *(addr + ESI_OFF) = 0xDEADDEAD;
     404    *(addr + EDI_OFF) = 0xDEAFDEAF;
     405    *(addr + EBP_OFF) = stack_ptr;
     406    *(addr + ESP_OFF) = stack_ptr;
     407    *(addr + RET_OFF) = jmp_addr;
     408 
     409 
     410    addr = (unsigned32 *) stack_ptr;
     411 
     412    addr[ 0 ] = jmp_addr;
     413    addr[ 1 ] = (unsigned32) stack_ptr;
     414    addr[ 2 ] = (unsigned32) stack_ptr;
     415
    394416#else
    395417#error "UNKNOWN CPU!!!"
Note: See TracChangeset for help on using the changeset viewer.