blob: 32641ed67f5c050bb8426cd6ad61ae60c67a65f4 [file] [log] [blame]
wdenk21136db2003-07-16 21:53:01 +00001/*
2 * Copyright (C) 1998 Dan Malek <dmalek@jlc.net>
3 * Copyright (C) 1999 Magnus Damm <kieraypc01.p.y.kie.era.ericsson.se>
4 * Copyright (C) 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
5 * Andreas Heppel <aheppel@sysgo.de>
6 * Copyright (C) 2003 Wolfgang Denk <wd@denx.de>
7 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +02008 * SPDX-License-Identifier: GPL-2.0+
wdenk21136db2003-07-16 21:53:01 +00009 */
10
11#include <config.h>
12#include <ppc_asm.tmpl>
13
14/* ------------------------------------------------------------------------------- */
15/* Function: in8 */
16/* Description: Input 8 bits */
17/* ------------------------------------------------------------------------------- */
18 .globl in8
19in8:
20 lbz r3,0(r3)
21 sync
22 blr
23
24/* ------------------------------------------------------------------------------- */
25/* Function: in16 */
26/* Description: Input 16 bits */
27/* ------------------------------------------------------------------------------- */
28 .globl in16
29in16:
30 lhz r3,0(r3)
31 sync
32 blr
33
34/* ------------------------------------------------------------------------------- */
35/* Function: in16r */
36/* Description: Input 16 bits and byte reverse */
37/* ------------------------------------------------------------------------------- */
38 .globl in16r
39in16r:
40 lhbrx r3,0,r3
41 sync
42 blr
43
44/* ------------------------------------------------------------------------------- */
45/* Function: in32 */
46/* Description: Input 32 bits */
47/* ------------------------------------------------------------------------------- */
48 .globl in32
49in32:
50 lwz 3,0(3)
51 sync
52 blr
53
54/* ------------------------------------------------------------------------------- */
55/* Function: in32r */
56/* Description: Input 32 bits and byte reverse */
57/* ------------------------------------------------------------------------------- */
58 .globl in32r
59in32r:
60 lwbrx r3,0,r3
61 sync
62 blr
63
64/* ------------------------------------------------------------------------------- */
65/* Function: out8 */
66/* Description: Output 8 bits */
67/* ------------------------------------------------------------------------------- */
68 .globl out8
69out8:
70 stb r4,0(r3)
71 sync
72 blr
73
74/* ------------------------------------------------------------------------------- */
75/* Function: out16 */
76/* Description: Output 16 bits */
77/* ------------------------------------------------------------------------------- */
78 .globl out16
79out16:
80 sth r4,0(r3)
81 sync
82 blr
83
84/* ------------------------------------------------------------------------------- */
85/* Function: out16r */
86/* Description: Byte reverse and output 16 bits */
87/* ------------------------------------------------------------------------------- */
88 .globl out16r
89out16r:
90 sthbrx r4,0,r3
91 sync
92 blr
93
94/* ------------------------------------------------------------------------------- */
95/* Function: out32 */
96/* Description: Output 32 bits */
97/* ------------------------------------------------------------------------------- */
98 .globl out32
99out32:
100 stw r4,0(r3)
101 sync
102 blr
103
104/* ------------------------------------------------------------------------------- */
105/* Function: out32r */
106/* Description: Byte reverse and output 32 bits */
107/* ------------------------------------------------------------------------------- */
108 .globl out32r
109out32r:
110 stwbrx r4,0,r3
111 sync
112 blr