summaryrefslogtreecommitdiffstats
path: root/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
blob: c57d7daa962079fac66fc0610223225194e8b492 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/* libs/pixelflinger/codeflinger/ARMAssemblerProxy.cpp
**
** Copyright 2006, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License"); 
** you may not use this file except in compliance with the License. 
** You may obtain a copy of the License at 
**
**     http://www.apache.org/licenses/LICENSE-2.0 
**
** Unless required by applicable law or agreed to in writing, software 
** distributed under the License is distributed on an "AS IS" BASIS, 
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
** See the License for the specific language governing permissions and 
** limitations under the License.
*/


#include <stdint.h>
#include <sys/types.h>

#include "codeflinger/ARMAssemblerProxy.h"

namespace android {

// ----------------------------------------------------------------------------

ARMAssemblerProxy::ARMAssemblerProxy()
    : mTarget(0)
{
}

ARMAssemblerProxy::ARMAssemblerProxy(ARMAssemblerInterface* target)
    : mTarget(target)
{
}

ARMAssemblerProxy::~ARMAssemblerProxy()
{
    delete mTarget;
}

void ARMAssemblerProxy::setTarget(ARMAssemblerInterface* target)
{
    delete mTarget;
    mTarget = target;
}

void ARMAssemblerProxy::reset() {
    mTarget->reset();
}
int ARMAssemblerProxy::generate(const char* name) {
    return mTarget->generate(name);
}
void ARMAssemblerProxy::disassemble(const char* name) {
    return mTarget->disassemble(name);
}
void ARMAssemblerProxy::prolog() {
    mTarget->prolog();
}
void ARMAssemblerProxy::epilog(uint32_t touched) {
    mTarget->epilog(touched);
}
void ARMAssemblerProxy::comment(const char* string) {
    mTarget->comment(string);
}


void ARMAssemblerProxy::dataProcessing( int opcode, int cc, int s,
                                        int Rd, int Rn, uint32_t Op2)
{
    mTarget->dataProcessing(opcode, cc, s, Rd, Rn, Op2);
}

void ARMAssemblerProxy::MLA(int cc, int s, int Rd, int Rm, int Rs, int Rn) {
    mTarget->MLA(cc, s, Rd, Rm, Rs, Rn);
}
void ARMAssemblerProxy::MUL(int cc, int s, int Rd, int Rm, int Rs) {
    mTarget->MUL(cc, s, Rd, Rm, Rs);
}
void ARMAssemblerProxy::UMULL(int cc, int s,
            int RdLo, int RdHi, int Rm, int Rs) {
    mTarget->UMULL(cc, s, RdLo, RdHi, Rm, Rs); 
}
void ARMAssemblerProxy::UMUAL(int cc, int s,
            int RdLo, int RdHi, int Rm, int Rs) {
    mTarget->UMUAL(cc, s, RdLo, RdHi, Rm, Rs); 
}
void ARMAssemblerProxy::SMULL(int cc, int s,
            int RdLo, int RdHi, int Rm, int Rs) {
    mTarget->SMULL(cc, s, RdLo, RdHi, Rm, Rs); 
}
void ARMAssemblerProxy::SMUAL(int cc, int s,
            int RdLo, int RdHi, int Rm, int Rs) {
    mTarget->SMUAL(cc, s, RdLo, RdHi, Rm, Rs); 
}

void ARMAssemblerProxy::B(int cc, uint32_t* pc) {
    mTarget->B(cc, pc); 
}
void ARMAssemblerProxy::BL(int cc, uint32_t* pc) {
    mTarget->BL(cc, pc); 
}
void ARMAssemblerProxy::BX(int cc, int Rn) {
    mTarget->BX(cc, Rn); 
}
void ARMAssemblerProxy::label(const char* theLabel) {
    mTarget->label(theLabel);
}
void ARMAssemblerProxy::B(int cc, const char* label) {
    mTarget->B(cc, label);
}
void ARMAssemblerProxy::BL(int cc, const char* label) {
    mTarget->BL(cc, label);
}

uint32_t* ARMAssemblerProxy::pcForLabel(const char* label) {
    return mTarget->pcForLabel(label);
}

void ARMAssemblerProxy::LDR(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->LDR(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::LDRB(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->LDRB(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::STR(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->STR(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::STRB(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->STRB(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::LDRH(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->LDRH(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::LDRSB(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->LDRSB(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::LDRSH(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->LDRSH(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::STRH(int cc, int Rd, int Rn, uint32_t offset) {
    mTarget->STRH(cc, Rd, Rn, offset);
}
void ARMAssemblerProxy::LDM(int cc, int dir, int Rn, int W, uint32_t reg_list) {
    mTarget->LDM(cc, dir, Rn, W, reg_list);
}
void ARMAssemblerProxy::STM(int cc, int dir, int Rn, int W, uint32_t reg_list) {
    mTarget->STM(cc, dir, Rn, W, reg_list);
}

void ARMAssemblerProxy::SWP(int cc, int Rn, int Rd, int Rm) {
    mTarget->SWP(cc, Rn, Rd, Rm);
}
void ARMAssemblerProxy::SWPB(int cc, int Rn, int Rd, int Rm) {
    mTarget->SWPB(cc, Rn, Rd, Rm);
}
void ARMAssemblerProxy::SWI(int cc, uint32_t comment) {
    mTarget->SWI(cc, comment);
}


void ARMAssemblerProxy::PLD(int Rn, uint32_t offset) {
    mTarget->PLD(Rn, offset);
}
void ARMAssemblerProxy::CLZ(int cc, int Rd, int Rm) {
    mTarget->CLZ(cc, Rd, Rm);
}
void ARMAssemblerProxy::QADD(int cc, int Rd, int Rm, int Rn) {
    mTarget->QADD(cc, Rd, Rm, Rn);
}
void ARMAssemblerProxy::QDADD(int cc, int Rd, int Rm, int Rn) {
    mTarget->QDADD(cc, Rd, Rm, Rn);
}
void ARMAssemblerProxy::QSUB(int cc, int Rd, int Rm, int Rn) {
    mTarget->QSUB(cc, Rd, Rm, Rn);
}
void ARMAssemblerProxy::QDSUB(int cc, int Rd, int Rm, int Rn) {
    mTarget->QDSUB(cc, Rd, Rm, Rn);
}
void ARMAssemblerProxy::SMUL(int cc, int xy, int Rd, int Rm, int Rs) {
    mTarget->SMUL(cc, xy, Rd, Rm, Rs);
}
void ARMAssemblerProxy::SMULW(int cc, int y, int Rd, int Rm, int Rs) {
    mTarget->SMULW(cc, y, Rd, Rm, Rs);
}
void ARMAssemblerProxy::SMLA(int cc, int xy, int Rd, int Rm, int Rs, int Rn) {
    mTarget->SMLA(cc, xy, Rd, Rm, Rs, Rn);
}
void ARMAssemblerProxy::SMLAL(  int cc, int xy,
                                int RdHi, int RdLo, int Rs, int Rm) {
    mTarget->SMLAL(cc, xy, RdHi, RdLo, Rs, Rm);
}
void ARMAssemblerProxy::SMLAW(int cc, int y, int Rd, int Rm, int Rs, int Rn) {
    mTarget->SMLAW(cc, y, Rd, Rm, Rs, Rn);
}

void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
    mTarget->UXTB16(cc, Rd, Rm, rotate);
}

void ARMAssemblerProxy::UBFX(int cc, int Rd, int Rn, int lsb, int width) {
    mTarget->UBFX(cc, Rd, Rn, lsb, width);
}

}; // namespace android