Changeset 279 for trunk/hal/tsar_mips32/core/hal_remote.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_remote.c
r204 r279 34 34 uint32_t cxy = (uint32_t)GET_CXY( xp ); 35 35 36 hal_disable_irq( &save_sr ); 37 38 asm volatile( 39 ".set noreorder \n" 40 "mfc2 $15, $24 \n" /* $15 <= PADDR_EXT */ 41 "mtc2 %2, $24 \n" /* PADDR_EXT <= cxy */ 42 "sb %0, 0(%1) \n" /* *paddr <= value */ 43 "mtc2 $15, $24 \n" /* PADDR_EXT <= $15 */ 36 /* TODO improve all hal remote functions to include SR handling in assembly code */ 37 /* as it is done below for hal_remote_sb */ 38 39 asm volatile( 40 ".set noreorder \n" 41 "mfc0 $14, $12 \n" /* $14 <= CP0_SR */ 42 "srl $13, $14, 1 \n" 43 "sll $13, $13, 1 \n" /* $13 <= SR masked */ 44 "mtc0 $13, $12 \n" /* IRQ disabled */ 45 46 47 "mfc2 $15, $24 \n" /* $15 <= PADDR_EXT */ 48 "mtc2 %2, $24 \n" /* PADDR_EXT <= cxy */ 49 "sb %0, 0(%1) \n" /* *paddr <= value */ 50 "mtc2 $15, $24 \n" /* PADDR_EXT <= $15 */ 51 52 "mtc0 $14, $12 \n" /* SR restored */ 53 44 54 "sync \n" 45 55 ".set reorder \n" 46 : : "r" (data), "r" (ptr), "r" (cxy) : "$15" ); 47 48 hal_restore_irq( save_sr ); 49 56 : : "r" (data), "r" (ptr), "r" (cxy) : "$13", "$14", "$15" ); 50 57 } 51 58
Note: See TracChangeset
for help on using the changeset viewer.