~ubuntu-branches/ubuntu/intrepid/xserver-xgl/intrepid

« back to all changes in this revision

Viewing changes to hw/xfree86/os-support/lynxos/lynx_ppc.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthew Garrett
  • Date: 2006-02-13 14:21:43 UTC
  • Revision ID: james.westby@ubuntu.com-20060213142143-mad6z9xzem7hzxz9
Tags: upstream-7.0.0
ImportĀ upstreamĀ versionĀ 7.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 */
 
25
 
 
26
void ppc_flush_icache()
 
27
{
 
28
__asm__ __volatile__ (" \
 
29
        mflr 0 ;\
 
30
        stw 31,-4(1) ;\
 
31
        stw 0,8(1) ;\
 
32
        stwu 1,-64(1) ;\
 
33
        mr 31,1 ;\
 
34
        stw 3,88(31) ;\
 
35
        li 6, 0 ;\
 
36
        dcbf 3, 6 ;\
 
37
        li 5, 32 ;\
 
38
        dcbf 3, 5 ;\
 
39
        sync ;\
 
40
        li 4,0 ;\
 
41
        icbi  3,4 ;\
 
42
        li 7,32 ;\
 
43
        icbi  3,7 ;\
 
44
        sync ;\
 
45
        isync ;\
 
46
        lwz 1,0(1) ;\
 
47
        lwz 0,8(1) ;\
 
48
        mtlr 0 ;\
 
49
        lwz 31,-4(1) ;\
 
50
        blr ;\
 
51
");
 
52
}