Changeset 301 for soft/giet_vm/giet_common
- Timestamp:
- Apr 14, 2014, 6:44:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_common/utils.c
r295 r301 257 257 : "=r"(sr) 258 258 : 259 : "$3" );259 : "$3", "memory" ); 260 260 *save_sr_ptr = sr; 261 261 } … … 269 269 "or $3, $3, $4 \n" 270 270 "mtc0 $3, $12 \n" 271 ::: "$3", "$4" );271 ::: "$3", "$4", "memory" ); 272 272 } 273 273 … … 280 280 asm volatile( "mtc0 %0, $12 \n" 281 281 : 282 : "r"(sr) ); 282 : "r"(sr) 283 : "memory" ); 283 284 } 284 285 … … 325 326 unsigned int lsb = (unsigned int) paddr; 326 327 unsigned int msb = (unsigned int) (paddr >> 32); 327 328 unsigned int sr; 329 330 _it_disable(&sr); 328 331 asm volatile( 329 "li $3, 0xFFFFFFFE \n"330 "mfc0 $2, $12 \n"331 "and $3, $2, $3 \n"332 "mtc0 $3, $12 \n" /* IRQ disabled */333 334 332 "mfc2 $2, $1 \n" /* $2 <= MMU_MODE */ 335 333 "andi $3, $2, 0xb \n" … … 341 339 342 340 "mtc2 $2, $1 \n" /* restore MMU_MODE */ 343 344 "li $3, 0x00000001 \n"345 "mfc0 $2, $12 \n"346 "or $3, $3, $2 \n"347 "mtc0 $3, $12 \n" /* IRQ enabled */348 341 : "=r" (value) 349 342 : "r" (lsb), "r" (msb) 350 343 : "$2", "$3"); 344 _it_restore(&sr); 351 345 return value; 352 346 } … … 360 354 unsigned int lsb = (unsigned int)paddr; 361 355 unsigned int msb = (unsigned int)(paddr >> 32); 362 356 unsigned int sr; 357 358 _it_disable(&sr); 363 359 asm volatile( 364 "li $3, 0xFFFFFFFE \n"365 "mfc0 $2, $12 \n"366 "and $3, $2, $3 \n"367 "mtc0 $3, $12 \n" /* IRQ disabled */368 369 360 "mfc2 $2, $1 \n" /* $2 <= MMU_MODE */ 370 361 "andi $3, $2, 0xb \n" … … 376 367 377 368 "mtc2 $2, $1 \n" /* restore MMU_MODE */ 378 379 "li $3, 0x00000001 \n"380 "mfc0 $2, $12 \n"381 "or $3, $3, $2 \n"382 "mtc0 $3, $12 \n" /* IRQ enabled */383 369 : 384 370 : "r" (value), "r" (lsb), "r" (msb) 385 371 : "$2", "$3"); 372 _it_restore(&sr); 386 373 } 387 374
Note: See TracChangeset
for help on using the changeset viewer.