* rs6000-pinsn.c (print_insn): Use powerpc disassembler when
[deliverable/binutils-gdb.git] / gdb / nlm / alpha-io.S
CommitLineData
27847c6f
SG
1/*
2 * Copyright (C) 1993, 1994 by
3 * Digital Equipment Corporation, Maynard, Massachusetts.
4 * All rights reserved.
5 *
6 * This software is furnished under a license and may be used and copied
7 * only in accordance of the terms of such license and with the
8 * inclusion of the above copyright notice. This software or any other
9 * copies thereof may not be provided or otherwise made available to any
10 * other person. No title to and ownership of the software is hereby
11 * transferred.
12 *
13 * The information in this software is subject to change without notice
14 * and should not be construed as a commitment by Digital Equipment
15 * Corporation.
16 *
17 * Digital assumes no responsibility for the use or reliability of its
18 * software on equipment which is not supplied by Digital.
19 *
20 */
21
22
27847c6f
SG
23#include "alpha-regdef.h"
24
25#define LEAF_ENTRY(NAME) .text ; .align 4 ; .globl NAME ; .ent NAME, 0 ; NAME: ; .frame sp, 0, ra ; .prologue 0 ;
26
27
27847c6f 28LEAF_ENTRY(flush_i_cache)
74ace0c8
SG
29 call_pal 0x86 /* IMB */
30 ret zero, (ra) /* return */
31 .end flush_i_cache
27847c6f
SG
32
33
34
74ace0c8
SG
35/* ++
36 *
37 * VOID
38 * outVti(
39 * ULONG Port
40 * ULONG Data
41 * )
42 *
43 * Routine Description:
44 *
45 * This Function Uses The 64-Bit Super-Page To Write Data To A Port
46 * Of The On-Board VTI Combo Chip For JENSEN.
47 *
48 * Arguments:
49 *
50 * Port (A0) - Port Number On VTI Chip To Which To Write Data
51 * data (a1) - data to write to the port, only low byte is significant
52 * To The VTI
53 *
54 * Return Value:
55 *
56 * None.
57 *
58 */
27847c6f 59
74ace0c8 60 LEAF_ENTRY(outVti)
27847c6f
SG
61
62 /*
74ace0c8
SG
63 * generate super-page address of vti, base address
64 * N.B. - Upper Bits Must Be Sign Extension Of Bit 42
65 * va<42:41> = 10 (binary) for super-page address
66 */
27847c6f 67
736c56de 68 lda t0, 0xc01c(zero) /* t0 = ffff ffff ffff c01c */
74ace0c8 69 sll t0, 28, t0 /* t0 = ffff fc01 c000 0000 */
27847c6f
SG
70
71
27847c6f 72 /*
74ace0c8
SG
73 * Shift In The Port Number To Generate The Port Address We
74 * wish to access
75 * N.B. - Access Width Is Always Zero = Byte Access For VTI
76 */
27847c6f 77
74ace0c8
SG
78 sll a0, 9, a0 /* a0 << 9 */
79 bis t0, a0, t0 /* T0 = Address Of VTI Port */
27847c6f 80
27847c6f 81
27847c6f 82 /*
74ace0c8
SG
83 * Do The Port Write, Guarantee That Subsequent Writes (And Reads)
84 * are ordered with respect to this write and return to caller
85 */
27847c6f 86
74ace0c8
SG
87 stl a1, 0(t0) /* write data to port */
88 mb /* guarantee write ordering */
27847c6f 89
74ace0c8 90 ret zero, (ra) /* return */
27847c6f
SG
91
92 .end outVti
93
94
95
74ace0c8
SG
96/*
97 *
98 * ULONG
99 * inVti(
100 * ULONG Port
101 * )
102 *
103 * Routine Description:
104 *
105 * This Function Uses The 64-Bit Super-Page To Read Data From A Port
106 * Of The On-Board VTI Combo Chip For JENSEN.
107 *
108 * Arguments:
109 *
110 * Port (A0) - Port Number On VTI Chip To Which To Write Data
111 *
112 * Return Value:
113 *
114 * Data (V0) - The Data Read From The VTI Chip, Only The Low Byte Will
115 * be valid
116 *
117 */
27847c6f
SG
118
119 LEAF_ENTRY(inVti)
120
74ace0c8
SG
121 /*
122 * generate super-page address of vti, base address
123 * N.B. - Upper Bits Must Be Sign Extension Of Bit 42
124 * va<42:41> = 10 (binary) for super-page address
125 */
27847c6f 126
736c56de 127 lda t0, 0xc01c(zero) /* t0 = ffff ffff ffff c01c */
74ace0c8 128 sll t0, 28, t0 /* t0 = ffff fc01 c000 0000 */
27847c6f
SG
129
130
74ace0c8
SG
131 /*
132 * Shift In The Port Number To Generate The Port Address We
133 * wish to access
134 * N.B. - Access Width For VTI Is Always 0 = Byte Access
135 */
27847c6f 136
74ace0c8
SG
137 sll a0, 9, a0 /* a0 << 9 */
138 bis t0, a0, t0 /* T0 = Address Of VTI Port */
27847c6f
SG
139
140
74ace0c8
SG
141 /*
142 * Do The Super-Page I/O Access And Return Data To Caller
143 */
27847c6f 144
74ace0c8 145 ldl v0, 0(t0) /* read data from port */
27847c6f
SG
146 and v0, 0xff, v0
147
74ace0c8 148 ret zero, (ra) /* return */
27847c6f
SG
149
150 .end inVti
This page took 0.047448 seconds and 4 git commands to generate.