Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (5 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/tsar_mips32/core/hal_special.c

    r406 r407  
    3131
    3232struct thread_s;
    33 
    34 /////////////////////////////////
    35 void hal_set_ebase( reg_t  base )
    36 {
    37         asm volatile ("mtc0    %0,  $15,  1" : : "r" (base));
    38 }
    3933
    4034//////////////////////////
     
    200194void hal_fence()
    201195{
    202         asm volatile
    203         ( "sync    \n":: );
     196        asm volatile ("sync");
    204197}
    205198
     
    213206void hal_core_sleep()
    214207{
    215         asm volatile
    216         ("wait   \n"::);
     208        asm volatile ("wait");
    217209}
    218210
     
    221213{
    222214    asm volatile
    223     ( "1:                    \n"
     215    ( ".set noreorder        \n"
    224216      "or    $27,  %0,  $0   \n"
     217      "1:                    \n"
    225218      "addi  $27, $27,  -1   \n"
     219      "nop                   \n"
    226220      "bne   $27,  $0,  1b   \n"
    227221      "nop                   \n"
    228       : : "r" (delay) : "$27" );
     222      ".set reorder          \n"
     223      : : "r" (delay>>2) : "$27" );
    229224}
    230225
Note: See TracChangeset for help on using the changeset viewer.