2 * File: arch/blackfin/lib/ins.S
4 * Author: Bas Vermeulen <bas@buyways.nl>
6 * Created: Tue Mar 22 15:27:24 CEST 2005
7 * Description: Implementation of ins{bwl} for BlackFin processors using zero overhead loops.
10 * Copyright 2004-2006 Analog Devices Inc.
11 * Copyright (C) 2005 Bas Vermeulen, BuyWays BV <bas@buyways.nl>
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <linux/linkage.h>
32 #include <asm/blackfin.h>
37 P0 = R0; /* P0 = port */
39 P1 = R1; /* P1 = address */
40 P2 = R2; /* P2 = count */
42 LSETUP( .Llong_loop_s, .Llong_loop_e) LC0 = P2;
43 .Llong_loop_s: R0 = [P0];
52 P0 = R0; /* P0 = port */
54 P1 = R1; /* P1 = address */
55 P2 = R2; /* P2 = count */
57 LSETUP( .Lword_loop_s, .Lword_loop_e) LC0 = P2;
58 .Lword_loop_s: R0 = W[P0];
67 P0 = R0; /* P0 = port */
69 P1 = R1; /* P1 = address */
70 P2 = R2; /* P2 = count */
72 LSETUP( .Lbyte_loop_s, .Lbyte_loop_e) LC0 = P2;
73 .Lbyte_loop_s: R0 = B[P0];