Initial commit
[xorg_rtime.git] / xorg-server-1.4 / hw / xfree86 / os-support / lynxos / lynx_ppc.S
blob3865850d157334e431aa56ecb46a41a89e472638
1 /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/lynxos/lynx_ppc.S,v 1.1 1999/07/10 07:24:49 dawes Exp $ */
2 /*
3  * Copyright 1998 by Metro Link Incorporated
4  *
5  * Permission to use, copy, modify, distribute, and sell this software
6  * and its documentation for any purpose is hereby granted without fee,
7  * provided that the above copyright notice appear in all copies and that
8  * both that copyright notice and this permission notice appear in
9  * supporting documentation, and that the name of Metro Link
10  * Incorporated not be used in advertising or publicity pertaining to
11  * distribution of the software without specific, written prior
12  * permission.  Metro Link Incorporated makes no representations
13  * about the suitability of this software for any purpose.  It is
14  * provided "as is" without express or implied warranty.
15  *
16  * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD
17  * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18  * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED BE
19  * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
20  * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
21  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
22  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
23  * SOFTWARE.
24  */
26         .file   "ppc.s"
27 .toc
28         .csect .text[PR]
29         .balign 4
30         .globl ppc_flush_icache
31         .globl .ppc_flush_icache
32 .csect ppc_flush_icache[DS]
33 ppc_flush_icache:
34         .long .ppc_flush_icache, TOC[tc0], 0
35 .csect .text[PR]
36 .ppc_flush_icache:
37         mflr 0
38         stw 31,-4(1)
39         stw 0,8(1)
40         stwu 1,-64(1)
41         mr 31,1
42         stw 3,88(31)
43         li 6, 0         /* __inst_dcbf (addr, 0); */
44         dcbf 3, 6
45         li 5, 32        /* __inst_dcbf (addr, LINESIZE); */
46         dcbf 3, 5
47         sync            /* __inst_sync (); */
48         li 4,0          /* __inst_icbi (addr, 0); */
49         icbi  3,4
50         li 7,32         /* __inst_icbi (addr, LINESIZE); */
51         icbi  3,7
52         sync            /* __inst_sync (); */
53         isync           /* __inst_isync (); */
54 L..1:
55         lwz 1,0(1)
56         lwz 0,8(1)
57         mtlr 0
58         lwz 31,-4(1)
59         blr
60 LT..ppc_flush_icache:
61         .long 0
62         .byte 0,0,32,97,128,1,1,1
63         .long 0
64         .long LT..ppc_flush_icache-.ppc_flush_icache
65         .short 16
66         .byte "ppc_flush_icache"
67         .byte 31
68 _section_.text:
69         .csect .data[RW]
70         .long _section_.text