make the window layout a little tidier.
[AROS.git] / arch / .unmaintained / m68k-emul / cachecleare.s
blob9eef6112083771229c55cdbe38f6d8882ab95069
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 /******************************************************************************
8 NAME
9 AROS_LH3(void, CacheClearE,
11 SYNOPSIS
12 AROS_LHA(APTR, address, A0),
13 AROS_LHA(ULONG, length, D0),
14 AROS_LHA(ULONG, caches, D1),
16 LOCATION
17 struct ExecBase *, SysBase, 107, Exec)
19 FUNCTION
20 Flushes the contents of the CPU caches for a given area of memory
21 and a given cache.
23 INPUTS
24 address - First byte in memory
25 length - number of bytes (~0 means all addresses).
26 caches - CPU caches affected
27 CACRF_ClearI - Instruction cache
28 CACRF_ClearD - Data cache
30 RESULT
32 NOTES
34 EXAMPLE
36 BUGS
37 Currently this only works on Linux/m68k.
38 It ignores the caches argument and clears all caches.
40 SEE ALSO
42 INTERNALS
44 HISTORY
46 ******************************************************************************/
48 #include "machine.i"
50 FirstArg = 4+(3*4)
51 address = FirstArg
52 length = address+4
53 caches = length+4
55 .text
56 .balign 16
57 .globl AROS_SLIB_ENTRY(CacheClearE,Exec)
58 .type AROS_SLIB_ENTRY(CacheClearE,Exec),@function
59 AROS_SLIB_ENTRY(CacheClearE,Exec):
60 movem.l %d2-%d4,-(%sp)
61 moveq #123,%d0
62 move.l address(%sp),%d1
63 move.l #1,%d2
64 move.l #3,%d3
65 move.l length(%sp),%d4
66 trap #0
67 movem.l (%sp)+,%d2-%d4
68 rts