Changeset 279 for trunk/hal/tsar_mips32/core/hal_special.c
- Timestamp:
- Jul 27, 2017, 12:23:29 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/tsar_mips32/core/hal_special.c
r124 r279 32 32 struct thread_s; 33 33 34 ///////////////////////////////// 35 void hal_set_ebase( reg_t base ) 36 { 37 asm volatile ("mtc0 %0, $15, 1" : : "r" (base)); 38 } 34 39 35 40 ////////////////////////// … … 48 53 cycle_t count; 49 54 50 asm volatile ("mfc0 %0, $9 55 asm volatile ("mfc0 %0, $9" : "=&r" (count)); 51 56 52 57 return count; 58 } 59 60 ///////////////////////// 61 inline reg_t hal_get_sr() 62 { 63 register uint32_t sr; 64 65 asm volatile ("mfc0 %0, $12" : "=&r" (sr)); 66 67 return sr; 53 68 } 54 69 … … 90 105 void * thread_ptr; 91 106 92 asm volatile 93 ( "mfc0 %0, $4, 2 \n" 94 : "=&r" (thread_ptr) ); 107 asm volatile ("mfc0 %0, $4, 2" : "=&r" (thread_ptr)); 95 108 96 109 return thread_ptr; … … 100 113 void hal_set_current_thread( struct thread_s * thread ) 101 114 { 102 asm volatile 103 ( "mtc0 %0, $4, 2 \n" 104 : : "r" (thread) ); 115 asm volatile ("mtc0 %0, $4, 2" : : "r" (thread)); 105 116 } 106 117 … … 135 146 register uint32_t sp; 136 147 137 asm volatile 138 ( "or %0, $0, $29 \n" 139 : "=&r" (sp) ); 148 asm volatile ("or %0, $0, $29" : "=&r" (sp)); 140 149 141 150 return sp;
Note: See TracChangeset
for help on using the changeset viewer.