added function to clear all cache lines (from illegal_instruction.S)

This commit is contained in:
Markus Fröschle
2012-10-16 17:55:57 +00:00
parent e287bfe3b3
commit 00b8e433a3

View File

@@ -74,18 +74,18 @@ void clear_caches(void)
" cpushl bc,(a0) | flush\n\t"
" lea 0x10(a0),a0 | index+1\n\t"
" addq.l #1,d1 | index+1\n\t"
" cmpi.w #512,d1 | alle sets?\n\t"
" bne cfa_setloop | nein->\n\t"
" cmpi.w #512,d1 | all sets?\n\t"
" bne cfa_setloop | no->\n\t"
" clr.l d1\n\t"
" addq.l #1,d0\n\t"
" move.l d0,a0\n\t"
" cmpi.w #4,d0 | all ways?\n\t"
" bne cfa_setloop | nein->\n\t"
" bne cfa_setloop | no->\n\t"
" nop\n\t"
" move.l _rt_cacr,d0 | holen\n\t"
" movec d0,cacr | setzen\n\t"
" move.l _rt_cacr,d0 | get cacr shadow register\n\t"
" movec d0,cacr | set old value\n\t"
" move.l (sp)+,d2\n\t"
" move.w d2,sr | alte interrupt maske\n\t"
" move.w d2,sr | restore previous interrupt mask\n\t"
/* input */ :
/* output */ :
/* clobber */ : "d0", "d1", "d2", "a0"