Ignore:
Timestamp:
Jun 6, 2013, 5:39:18 PM (11 years ago)
Author:
brejon
Message:
  • Update malloc (remote free)
  • bugfix in spin_lock (bad register used in asm inline)
  • memo/Makefile clean rule : added "-f" option to rm command
  • main Makefile :
    • added spin_lock.o in dhrystone object files
    • added rules to compile spin_lock
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/libs/spin_lock.c

    r228 r244  
    3232
    3333    asm volatile (
    34             "giet_lock_try:                 \n"
    35             "ll   $2,    0(%0)              \n" /* $2 <= lock current value */
     34            "move $16, %0                   \n"
     35            "giet_lock_try :                \n"
     36            "ll   $2,    0($16)             \n" /* $2 <= lock current value */
    3637            "bnez $2,    giet_lock_delay    \n" /* retry if lock already taken */
    3738            "li   $3,    1                  \n" /* $3 <= argument for sc */
    38             "sc   $3,    0(%0)              \n" /* try to get lock */
     39            "sc   $3,    0($16)             \n" /* try to get lock */
    3940            "bnez $3,    giet_lock_ok       \n" /* exit if atomic */
    4041
     
    5354            :
    5455            :"r"(plock)
    55             :"$2", "$3", "$4");
     56            :"$2", "$3", "$4", "$16");
    5657}
    5758
Note: See TracChangeset for help on using the changeset viewer.