fixed save and restore of gcc scratch registers on DMA video page copy
This commit is contained in:
@@ -629,21 +629,22 @@ irq6_sca_pn1c:
|
|||||||
|
|
||||||
// experiment: do video page copy using Coldfire DMA
|
// experiment: do video page copy using Coldfire DMA
|
||||||
|
|
||||||
lea -11 * 4(sp),sp
|
lea -15 * 4(sp),sp
|
||||||
|
movem.l d0-d1/a0-a1,sp // save gcc scratch registers
|
||||||
clr.l -(sp) // no special functions
|
clr.l -(sp) // no special functions
|
||||||
move.l #MCD_SINGLE_DMA|MCD_TT_FLAGS_CW|MCD_TT_FLAGS_RL|MCD_TT_FLAGS_SP,-(sp)
|
move.l #MCD_SINGLE_DMA|MCD_TT_FLAGS_CW|MCD_TT_FLAGS_RL|MCD_TT_FLAGS_SP,-(sp)
|
||||||
mov3q #7,-(sp) // highest DMA priority
|
mov3q #7,-(sp) // highest DMA priority
|
||||||
move.l #DMA_ALWAYS,-(sp) // do memory to memory DMA
|
move.l #DMA_ALWAYS,-(sp) // do memory to memory DMA
|
||||||
move.l #4,-(sp) // copy 4 bytes at a time
|
move.l #4,-(sp) // copy 4 bytes at a time
|
||||||
move.l #0x100000,-(sp) // copy 1 Megabyte
|
move.l #0x100000,-(sp) // copy 1 Megabyte
|
||||||
move.l #4,-(sp) // destination increment
|
move.l #4,-(sp) // destination increment
|
||||||
move.l a1,-(sp) // destination adress
|
move.l a1,-(sp) // destination adress
|
||||||
move.l #4,-(sp) // source increment
|
move.l #4,-(sp) // source increment
|
||||||
move.l a0,-(sp) // source adress
|
move.l a0,-(sp) // source adress
|
||||||
move.l #1,-(sp) // channel 1
|
move.l #1,-(sp) // channel 1
|
||||||
jsr _MCD_startDma
|
jsr _MCD_startDma
|
||||||
lea 11 * 4(sp),sp // adjust stack
|
movem.l (sp),d0-d1/a0-a1 // restore gcc scratch registers
|
||||||
|
lea 15 * 4(sp),sp // adjust stack
|
||||||
|
|
||||||
wait_dma_finished:
|
wait_dma_finished:
|
||||||
clr.l -(sp)
|
clr.l -(sp)
|
||||||
@@ -652,8 +653,6 @@ wait_dma_finished:
|
|||||||
tst.l d0
|
tst.l d0
|
||||||
cmp.l #6,d0
|
cmp.l #6,d0
|
||||||
bne wait_dma_finished
|
bne wait_dma_finished
|
||||||
|
|
||||||
// intentionally no wait for the DMA to finish
|
|
||||||
#else
|
#else
|
||||||
irq6_vcd0_loop:
|
irq6_vcd0_loop:
|
||||||
move.l (a0)+,(a1)+ // page copy
|
move.l (a0)+,(a1)+ // page copy
|
||||||
|
|||||||
@@ -190,19 +190,19 @@ _mmu_init:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Everything else gets a 1:1 mapping on miss
|
* Everything else gets 1:1 mapped on miss
|
||||||
*/
|
*/
|
||||||
_mmutr_miss:
|
_mmutr_miss:
|
||||||
lea -8 * 4(sp),sp
|
lea -4 * 4(sp),sp
|
||||||
movem.l d0-d3/a0-a3,(sp)
|
movem.l d0-d1/a0-a1,(sp) // save gcc scratch registers
|
||||||
|
|
||||||
move.l d0,-(sp)
|
move.l d0,-(sp)
|
||||||
pea MISS_text
|
pea MISS_text
|
||||||
jsr _xprintf
|
jsr _xprintf
|
||||||
addq.l #8,sp
|
addq.l #8,sp
|
||||||
|
|
||||||
movem.l (sp),d0-d3/a0-a3
|
movem.l (sp),d0-d1/a0-a1 // restore registers
|
||||||
lea 8 * 4(sp),sp
|
lea 4 * 4(sp),sp
|
||||||
|
|
||||||
bsr cpusha // clear caches
|
bsr cpusha // clear caches
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user