Changeset 857 for branches/reconfiguration/softs
- Timestamp:
- Oct 22, 2014, 12:43:10 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/reconfiguration/softs/libs/io.h
r850 r857 22 22 uint32_t lsb = paddr & ((1ULL << CLUSTER_OFFSET_BITS)-1); 23 23 24 asm volatile("mtc2 %2, $24 \n" /* DATA_PADDR_EXT <= msb */ 24 asm volatile("mfc2 $8, $24 \n" /* t0 <= DATA_PADDR_EXT */ 25 "mtc2 %2, $24 \n" /* DATA_PADDR_EXT <= msb */ 25 26 "lw %0, 0(%1) \n" /* value <= *paddr */ 26 "mtc2 $ 0, $24 \n" /* DATA_PADDR_EXT <= 0 */27 "mtc2 $8, $24 \n" /* DATA_PADDR_EXT <= 0 */ 27 28 : "=r"(value) 28 29 : "r"(lsb), "r"(msb) 29 : " memory");30 : "$8", "memory"); 30 31 31 32 return value; … … 42 43 uint32_t lsb = paddr & ((1ULL << CLUSTER_OFFSET_BITS)-1); 43 44 44 asm volatile("mtc2 %2, $24 \n" /* DATA_PADDR_EXT <= msb */ 45 asm volatile("mfc2 $8, $24 \n" /* t0 <= DATA_PADDR_EXT */ 46 "mtc2 %2, $24 \n" /* DATA_PADDR_EXT <= msb */ 45 47 "sw %0, 0(%1) \n" /* value <= *paddr */ 46 "mtc2 $ 0, $24 \n" /* DATA_PADDR_EXT <= 0 */48 "mtc2 $8, $24 \n" /* DATA_PADDR_EXT <= 0 */ 47 49 "sync \n" 48 50 : /* no outputs */ 49 51 : "r"(value), "r"(lsb), "r"(msb) 50 : " memory");52 : "$8", "memory"); 51 53 } 52 54
Note: See TracChangeset
for help on using the changeset viewer.