mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-02 21:30:29 +00:00
use copymem.i to copy kernel
This commit is contained in:
parent
f71c1048cd
commit
ecfd051646
@ -35,14 +35,14 @@ second.o: $(OBJS) ld.script
|
||||
MMU030_asm.o: MMU030_asm.S
|
||||
$(AS) $(ASFLAGS) -m68030 -o $@ $^
|
||||
|
||||
enter_kernel030.o: enter_kernel030.S
|
||||
$(AS) $(ASFLAGS) -m68030 -o $@ $^
|
||||
enter_kernel030.o: enter_kernel030.S copymem.i
|
||||
$(AS) $(ASFLAGS) -m68030 -o $@ $<
|
||||
|
||||
MMU040_asm.o: MMU040_asm.S
|
||||
$(AS) $(ASFLAGS) -m68040 -o $@ $^
|
||||
|
||||
enter_kernel040.o: enter_kernel040.S
|
||||
$(AS) $(ASFLAGS) -m68040 -o $@ $^
|
||||
enter_kernel040.o: enter_kernel040.S copymem.i
|
||||
$(AS) $(ASFLAGS) -m68040 -o $@ $<
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $^
|
||||
|
25
second/copymem.i
Normal file
25
second/copymem.i
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
*
|
||||
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
||||
*
|
||||
*/
|
||||
|
||||
.macro copymem src, dst, size
|
||||
cmpa.l \src, \dst
|
||||
bgt.s 1f
|
||||
0:
|
||||
move.b (\src)+,(\dst)+
|
||||
subq.l #1,\size
|
||||
bge.s 0b
|
||||
|
||||
bra 4f
|
||||
|
||||
1:
|
||||
adda.l \size, \src
|
||||
adda.l \size, \dst
|
||||
2:
|
||||
move.b -(\src),-(\dst)
|
||||
subq.l #1,\size
|
||||
bge.s 2b
|
||||
4:
|
||||
.endm
|
@ -4,6 +4,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
.include "copymem.i"
|
||||
|
||||
.align 4
|
||||
|
||||
.global enter_kernel030
|
||||
@ -37,10 +39,7 @@ enter_kernel030:
|
||||
|
||||
move.l %a2, %a1
|
||||
|
||||
copy_loop:
|
||||
move.b (%a0)+, (%a2)+
|
||||
subq.l #1, %d0
|
||||
bge.s copy_loop
|
||||
copymem %a0, %a2, %d0
|
||||
|
||||
/* jump into kernel */
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
.include "copymem.i"
|
||||
|
||||
.align 4
|
||||
|
||||
.global enter_kernel040
|
||||
@ -35,10 +37,7 @@ enter_kernel040:
|
||||
|
||||
move.l %a2, %a1
|
||||
|
||||
copy_loop:
|
||||
move.b (%a0)+, (%a2)+
|
||||
subq.l #1, %d0
|
||||
bge.s copy_loop
|
||||
copymem %a0, %a2, %d0
|
||||
|
||||
/* jump into kernel */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user