Changeset 817 for soft/giet_vm/giet_common/utils.c
- Timestamp:
- Apr 28, 2016, 1:12:22 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_common/utils.c
r745 r817 80 80 return ret; 81 81 } 82 82 //////////////////////////// 83 void _set_proctime( unsigned int val ) 84 { 85 asm volatile ( "mtc0 $0, $9 \n" 86 : 87 :"r" (val)); 88 } 83 89 ///////////////////////////////////////////// 84 90 void _it_disable( unsigned int * save_sr_ptr) … … 119 125 } 120 126 127 void _cpu_sync() 128 { 129 asm volatile("sync" ::: "memory"); 130 } 121 131 122 132 /////////////////////////////////////////////////////////////////////////// … … 585 595 : "r" (delay) 586 596 : "$3" ); 597 } 598 599 ///////////////////////////////////// 600 void _sleep( unsigned int cycles ) 601 { 602 unsigned int delay = cycles; 603 asm volatile( ".set noreorder \n" 604 "1: \n" 605 "bnez %0, 1b \n" 606 "addi %0, %0, -1 \n" 607 ".set reorder \n" 608 : "+r" (delay) ); 587 609 } 588 610
Note: See TracChangeset
for help on using the changeset viewer.