OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [libgloss/] [pa/] [op50n-io.S] - Diff between revs 207 and 345

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 345
/* op50n-io.S -- low-level I/O routines for the Oki OP50N eval board.
/* op50n-io.S -- low-level I/O routines for the Oki OP50N eval board.
 *
 *
 * Copyright (c) 1995 Cygnus Support
 * Copyright (c) 1995 Cygnus Support
 *
 *
 * The authors hereby grant permission to use, copy, modify, distribute,
 * The authors hereby grant permission to use, copy, modify, distribute,
 * and license this software and its documentation for any purpose, provided
 * and license this software and its documentation for any purpose, provided
 * that existing copyright notices are retained in all copies and that this
 * that existing copyright notices are retained in all copies and that this
 * notice is included verbatim in any distributions. No written agreement,
 * notice is included verbatim in any distributions. No written agreement,
 * license, or royalty fee is required for any of the authorized uses.
 * license, or royalty fee is required for any of the authorized uses.
 * Modifications to this software may be copyrighted by their authors
 * Modifications to this software may be copyrighted by their authors
 * and need not follow the licensing terms described here, provided that
 * and need not follow the licensing terms described here, provided that
 * the new terms are clearly indicated on the first page of each file where
 * the new terms are clearly indicated on the first page of each file where
 * they apply.
 * they apply.
 */
 */
mon_start       .EQU    0xd0000000
mon_start       .EQU    0xd0000000
where_dp        .EQU    mon_start+4*4
where_dp        .EQU    mon_start+4*4
where_ci        .EQU    mon_start+14*4
where_ci        .EQU    mon_start+14*4
where_co        .EQU    mon_start+15*4
where_co        .EQU    mon_start+15*4
where_read      .EQU    mon_start+22*4
where_read      .EQU    mon_start+22*4
where_write     .EQU    mon_start+23*4
where_write     .EQU    mon_start+23*4
/*
/*
 *int c = inbyte(wait);
 *int c = inbyte(wait);
 */
 */
        .space $TEXT$
        .space $TEXT$
        .align 4
        .align 4
        .EXPORT inbyte,CODE,ARGW0=GR,RTNVAL=GR
        .EXPORT inbyte,CODE,ARGW0=GR,RTNVAL=GR
inbyte
inbyte
        .PROC
        .PROC
        .CALLINFO CALLER,FRAME=64,SAVE_RP
        .CALLINFO CALLER,FRAME=64,SAVE_RP
        .ENTRY
        .ENTRY
        stw     %r2,-20(0,%r30)
        stw     %r2,-20(0,%r30)
        ldo     64(%r30),%r30
        ldo     64(%r30),%r30
        stw     %r27,-56(0,%r30)        ; save my dp
        stw     %r27,-56(0,%r30)        ; save my dp
        ldil    l%where_dp,%r27         ; load monitors dp
        ldil    l%where_dp,%r27         ; load monitors dp
        ldw     r%where_dp(0,%r27),%r27
        ldw     r%where_dp(0,%r27),%r27
        ldil    l%where_ci,%r1
        ldil    l%where_ci,%r1
        ldw     r%where_ci(0,%r1),%r1
        ldw     r%where_ci(0,%r1),%r1
        ble     0(0,%r1)
        ble     0(0,%r1)
        copy    %r31,%r2
        copy    %r31,%r2
        ldw     -56(0,%r30),%r27        ; load my dp
        ldw     -56(0,%r30),%r27        ; load my dp
        ldw     -84(0,%r30),%r2
        ldw     -84(0,%r30),%r2
        ldo     -64(%r30),%r30
        ldo     -64(%r30),%r30
        bv      %r0(%r2)
        bv      %r0(%r2)
        nop
        nop
        .EXIT
        .EXIT
        .PROCEND
        .PROCEND
/* int c = outbyte(c);
/* int c = outbyte(c);
*/
*/
        .EXPORT outbyte,CODE,ARGW0=GR,RTNVAL=GR
        .EXPORT outbyte,CODE,ARGW0=GR,RTNVAL=GR
outbyte
outbyte
        .PROC
        .PROC
        .CALLINFO CALLER,FRAME=64,SAVE_RP
        .CALLINFO CALLER,FRAME=64,SAVE_RP
        .ENTRY
        .ENTRY
        stw     %r2,-20(0,%r30)
        stw     %r2,-20(0,%r30)
        ldo     64(%r30),%r30
        ldo     64(%r30),%r30
        stw     %r27,-56(0,%r30)        ; save my dp
        stw     %r27,-56(0,%r30)        ; save my dp
        ldil    l%where_dp,%r27         ; load monitors dp
        ldil    l%where_dp,%r27         ; load monitors dp
        ldw     r%where_dp(0,%r27),%r27
        ldw     r%where_dp(0,%r27),%r27
        ldil    l%where_co,%r1
        ldil    l%where_co,%r1
        ldw     r%where_co(0,%r1),%r1
        ldw     r%where_co(0,%r1),%r1
        ble     0(0,%r1)
        ble     0(0,%r1)
        copy    %r31,%r2
        copy    %r31,%r2
        ldw     -56(0,%r30),%r27        ; load my dp
        ldw     -56(0,%r30),%r27        ; load my dp
        ldw     -84(0,%r30),%r2
        ldw     -84(0,%r30),%r2
        ldo     -64(%r30),%r30
        ldo     -64(%r30),%r30
        bv      %r0(%r2)
        bv      %r0(%r2)
        nop
        nop
        .EXIT
        .EXIT
        .PROCEND
        .PROCEND
#if 0
#if 0
/* cnt = read(fd, bufp, cnt);
/* cnt = read(fd, bufp, cnt);
*/
*/
        .EXPORT read,CODE,ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO,RTNVAL=NO
        .EXPORT read,CODE,ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO,RTNVAL=NO
read
read
        .PROC
        .PROC
        .CALLINFO FRAME=64,CALLS,SAVE_RP
        .CALLINFO FRAME=64,CALLS,SAVE_RP
        .ENTRY
        .ENTRY
        stw     %r2,-20(0,%r30)
        stw     %r2,-20(0,%r30)
        ldo     64(%r30),%r30
        ldo     64(%r30),%r30
        stw     %dp,-56(0,%r30) ; save my dp
        stw     %dp,-56(0,%r30) ; save my dp
        ldil    l%where_dp,%dp  ; load monitors dp
        ldil    l%where_dp,%dp  ; load monitors dp
        ldw     r%where_dp(0,%dp), %dp
        ldw     r%where_dp(0,%dp), %dp
        ldil    l%where_read,%r1
        ldil    l%where_read,%r1
        ldw     r%where_read(0,%r1), %r1
        ldw     r%where_read(0,%r1), %r1
        ble     0(0,%r1)
        ble     0(0,%r1)
        copy    %r31,%r2
        copy    %r31,%r2
        ldw     -56(0,%r30),%dp ; load my dp
        ldw     -56(0,%r30),%dp ; load my dp
        ldw     -84(0,%r30),%r2
        ldw     -84(0,%r30),%r2
        bv      %r0(%r2)
        bv      %r0(%r2)
        ldo     -64(%r30),%r30
        ldo     -64(%r30),%r30
        .EXIT
        .EXIT
        .PROCEND
        .PROCEND
/* cnt = write(fd, bufp, cnt);
/* cnt = write(fd, bufp, cnt);
*/
*/
        .EXPORT write,CODE,ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO,RTNVAL=NO
        .EXPORT write,CODE,ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO,RTNVAL=NO
write
write
        .PROC
        .PROC
        .CALLINFO FRAME=64,CALLS,SAVE_RP
        .CALLINFO FRAME=64,CALLS,SAVE_RP
        .ENTRY
        .ENTRY
        stw     %r2,-20(0,%r30)
        stw     %r2,-20(0,%r30)
        ldo     64(%r30),%r30
        ldo     64(%r30),%r30
        stw     %dp,-56(0,%r30) ; save my dp
        stw     %dp,-56(0,%r30) ; save my dp
        ldil    l%where_dp,%dp  ; load monitors dp
        ldil    l%where_dp,%dp  ; load monitors dp
        ldw     r%where_dp(0,%dp), %dp
        ldw     r%where_dp(0,%dp), %dp
        ldil    l%where_write,%r1
        ldil    l%where_write,%r1
        ldw     r%where_write(0,%r1), %r1
        ldw     r%where_write(0,%r1), %r1
        ble     0(0,%r1)
        ble     0(0,%r1)
        copy    %r31,%r2
        copy    %r31,%r2
        ldw     -56(0,%r30),%dp ; load my dp
        ldw     -56(0,%r30),%dp ; load my dp
        ldw     -84(0,%r30),%r2
        ldw     -84(0,%r30),%r2
        bv      %r0(%r2)
        bv      %r0(%r2)
        ldo     -64(%r30),%r30
        ldo     -64(%r30),%r30
        .EXIT
        .EXIT
        .PROCEND
        .PROCEND
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.