Annotation of kernel/bsd/dev/ppc/video_scroll.s, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: /*
                     26:  * Copyright 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991  
                     27:  *              All Rights Reserved 
                     28:  *  
                     29:  * Permission to use, copy, modify, and distribute this software and 
                     30:  * its documentation for any purpose and without fee is hereby granted, 
                     31:  * provided that the above copyright notice appears in all copies and 
                     32:  * that both the copyright notice and this permission notice appear in 
                     33:  * supporting documentation. 
                     34:  *  
                     35:  * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 
                     36:  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
                     37:  * FOR A PARTICULAR PURPOSE. 
                     38:  *  
                     39:  * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 
                     40:  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
                     41:  * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 
                     42:  * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
                     43:  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
                     44:  * 
                     45:  */
                     46: /*
                     47:  * MKLINUX-1.0DR2
                     48:  */
                     49: 
                     50: /* Routines to perform high-speed scrolling, assuming that the memory is
                     51:  * non-cached, and that the amount of memory to be scrolled is a multiple
                     52:  * of (at least) 16.
                     53:  */
                     54: 
                     55: #if 1 //notdef_next
                     56: #include <ppc/asm.h>
                     57: #include <ppc/proc_reg.h>
                     58: 
                     59: /*
                     60:  * void video_scroll_up(unsigned long start,
                     61:  *              unsigned long end,
                     62:  *              unsigned long dest)
                     63:  */
                     64: 
                     65: ENTRY(video_scroll_up, TAG_NO_FRAME_USED)
                     66:     
                     67:     /*
                     68:      * Turn the FPU on, save regs
                     69:      */
                     70:     mfmsr      ARG4
                     71:     ori        ARG3,   ARG4,   MASK(MSR_FP)    /* bit is in low-order 16 */
                     72:     mtmsr      ARG3
                     73:     isync
                     74: 
                     75:     stfd       f0, -16(r1)
                     76:     stfd       f1, -8(r1)
                     77: 
                     78:     /* ok, now we can use the FPU registers to do some fast copying,
                     79:      * maybe this can be more optimal but it's not bad
                     80:      */
                     81: 
                     82: .L_vscr_up_loop:
                     83:     lfd f0, 0(ARG0)
                     84:     lfd f1, 8(ARG0)
                     85: 
                     86:     addi    ARG0,   ARG0,   16
                     87:     
                     88:     stfd    f0, 0(ARG2)
                     89: 
                     90:     cmp    CR0,0,    ARG0,   ARG1
                     91: 
                     92:     stfd    f1, 8(ARG2)
                     93: 
                     94:     addi    ARG2,   ARG2,   16
                     95: 
                     96:     blt+    CR0,    .L_vscr_up_loop
                     97: 
                     98:     lfd                f0, -16(r1)
                     99:     lfd                f1, -8(r1)
                    100: 
                    101:     /* re-disable the FPU */
                    102:     sync
                    103:     mtmsr   ARG4
                    104:     isync
                    105:     
                    106:     blr
                    107: 
                    108: /*
                    109:  * void video_scroll_down(unsigned long start,   HIGH address to scroll from
                    110:  *                unsigned long end,     LOW address 
                    111:  *                unsigned long dest)    HIGH address
                    112:  */
                    113: 
                    114: ENTRY(video_scroll_down, TAG_NO_FRAME_USED)
                    115: 
                    116:     /*
                    117:      * Turn the FPU on, save regs
                    118:      */
                    119:     mfmsr      ARG4
                    120:     ori        ARG3,   ARG4,   MASK(MSR_FP)    /* bit is in low-order 16 */
                    121:     mtmsr      ARG3
                    122:     isync
                    123: 
                    124:     stfd       f0, -16(r1)
                    125:     stfd       f1, -8(r1)
                    126: 
                    127:     /* ok, now we can use the FPU registers to do some fast copying,
                    128:      * maybe this can be more optimal but it's not bad
                    129:      */
                    130: 
                    131: .L_vscr_down_loop:
                    132:     lfd f0, -16(ARG0)
                    133:     lfd f1, -8(ARG0)
                    134: 
                    135:     subi    ARG0,   ARG0,   16
                    136:     
                    137:     stfd    f0, -16(ARG2)
                    138: 
                    139:     cmp    CR0,0,    ARG0,   ARG1
                    140: 
                    141:     stfd    f1, -8(ARG2)
                    142: 
                    143:     subi    ARG2,   ARG2,   16
                    144: 
                    145:     bgt+    CR0,    .L_vscr_down_loop
                    146: 
                    147:     lfd                f0, -16(r1)
                    148:     lfd                f1, -8(r1)
                    149: 
                    150:     /* re-disable the FPU */
                    151:     sync
                    152:     mtmsr   ARG4
                    153:     isync
                    154:     
                    155:     blr
                    156: #endif notdef_next
                    157: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.