ARMAssemblerProxy.cpp revision 4dc1fa8e8d1f14868ab8bba93a8cbb87f847c4e3
1/* libs/pixelflinger/codeflinger/ARMAssemblerProxy.cpp
2**
3** Copyright 2006, The Android Open Source Project
4**
5** Licensed under the Apache License, Version 2.0 (the "License");
6** you may not use this file except in compliance with the License.
7** You may obtain a copy of the License at
8**
9**     http://www.apache.org/licenses/LICENSE-2.0
10**
11** Unless required by applicable law or agreed to in writing, software
12** distributed under the License is distributed on an "AS IS" BASIS,
13** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14** See the License for the specific language governing permissions and
15** limitations under the License.
16*/
17
18
19#include <stdint.h>
20#include <sys/types.h>
21
22#include "codeflinger/ARMAssemblerProxy.h"
23
24namespace android {
25
26// ----------------------------------------------------------------------------
27
28ARMAssemblerProxy::ARMAssemblerProxy()
29    : mTarget(0)
30{
31}
32
33ARMAssemblerProxy::ARMAssemblerProxy(ARMAssemblerInterface* target)
34    : mTarget(target)
35{
36}
37
38ARMAssemblerProxy::~ARMAssemblerProxy()
39{
40    delete mTarget;
41}
42
43void ARMAssemblerProxy::setTarget(ARMAssemblerInterface* target)
44{
45    delete mTarget;
46    mTarget = target;
47}
48
49void ARMAssemblerProxy::reset() {
50    mTarget->reset();
51}
52int ARMAssemblerProxy::generate(const char* name) {
53    return mTarget->generate(name);
54}
55void ARMAssemblerProxy::disassemble(const char* name) {
56    return mTarget->disassemble(name);
57}
58void ARMAssemblerProxy::prolog() {
59    mTarget->prolog();
60}
61void ARMAssemblerProxy::epilog(uint32_t touched) {
62    mTarget->epilog(touched);
63}
64void ARMAssemblerProxy::comment(const char* string) {
65    mTarget->comment(string);
66}
67
68
69void ARMAssemblerProxy::dataProcessing( int opcode, int cc, int s,
70                                        int Rd, int Rn, uint32_t Op2)
71{
72    mTarget->dataProcessing(opcode, cc, s, Rd, Rn, Op2);
73}
74
75void ARMAssemblerProxy::MLA(int cc, int s, int Rd, int Rm, int Rs, int Rn) {
76    mTarget->MLA(cc, s, Rd, Rm, Rs, Rn);
77}
78void ARMAssemblerProxy::MUL(int cc, int s, int Rd, int Rm, int Rs) {
79    mTarget->MUL(cc, s, Rd, Rm, Rs);
80}
81void ARMAssemblerProxy::UMULL(int cc, int s,
82            int RdLo, int RdHi, int Rm, int Rs) {
83    mTarget->UMULL(cc, s, RdLo, RdHi, Rm, Rs);
84}
85void ARMAssemblerProxy::UMUAL(int cc, int s,
86            int RdLo, int RdHi, int Rm, int Rs) {
87    mTarget->UMUAL(cc, s, RdLo, RdHi, Rm, Rs);
88}
89void ARMAssemblerProxy::SMULL(int cc, int s,
90            int RdLo, int RdHi, int Rm, int Rs) {
91    mTarget->SMULL(cc, s, RdLo, RdHi, Rm, Rs);
92}
93void ARMAssemblerProxy::SMUAL(int cc, int s,
94            int RdLo, int RdHi, int Rm, int Rs) {
95    mTarget->SMUAL(cc, s, RdLo, RdHi, Rm, Rs);
96}
97
98void ARMAssemblerProxy::B(int cc, uint32_t* pc) {
99    mTarget->B(cc, pc);
100}
101void ARMAssemblerProxy::BL(int cc, uint32_t* pc) {
102    mTarget->BL(cc, pc);
103}
104void ARMAssemblerProxy::BX(int cc, int Rn) {
105    mTarget->BX(cc, Rn);
106}
107void ARMAssemblerProxy::label(const char* theLabel) {
108    mTarget->label(theLabel);
109}
110void ARMAssemblerProxy::B(int cc, const char* label) {
111    mTarget->B(cc, label);
112}
113void ARMAssemblerProxy::BL(int cc, const char* label) {
114    mTarget->BL(cc, label);
115}
116
117uint32_t* ARMAssemblerProxy::pcForLabel(const char* label) {
118    return mTarget->pcForLabel(label);
119}
120
121void ARMAssemblerProxy::LDR(int cc, int Rd, int Rn, uint32_t offset) {
122    mTarget->LDR(cc, Rd, Rn, offset);
123}
124void ARMAssemblerProxy::LDRB(int cc, int Rd, int Rn, uint32_t offset) {
125    mTarget->LDRB(cc, Rd, Rn, offset);
126}
127void ARMAssemblerProxy::STR(int cc, int Rd, int Rn, uint32_t offset) {
128    mTarget->STR(cc, Rd, Rn, offset);
129}
130void ARMAssemblerProxy::STRB(int cc, int Rd, int Rn, uint32_t offset) {
131    mTarget->STRB(cc, Rd, Rn, offset);
132}
133void ARMAssemblerProxy::LDRH(int cc, int Rd, int Rn, uint32_t offset) {
134    mTarget->LDRH(cc, Rd, Rn, offset);
135}
136void ARMAssemblerProxy::LDRSB(int cc, int Rd, int Rn, uint32_t offset) {
137    mTarget->LDRSB(cc, Rd, Rn, offset);
138}
139void ARMAssemblerProxy::LDRSH(int cc, int Rd, int Rn, uint32_t offset) {
140    mTarget->LDRSH(cc, Rd, Rn, offset);
141}
142void ARMAssemblerProxy::STRH(int cc, int Rd, int Rn, uint32_t offset) {
143    mTarget->STRH(cc, Rd, Rn, offset);
144}
145void ARMAssemblerProxy::LDM(int cc, int dir, int Rn, int W, uint32_t reg_list) {
146    mTarget->LDM(cc, dir, Rn, W, reg_list);
147}
148void ARMAssemblerProxy::STM(int cc, int dir, int Rn, int W, uint32_t reg_list) {
149    mTarget->STM(cc, dir, Rn, W, reg_list);
150}
151
152void ARMAssemblerProxy::SWP(int cc, int Rn, int Rd, int Rm) {
153    mTarget->SWP(cc, Rn, Rd, Rm);
154}
155void ARMAssemblerProxy::SWPB(int cc, int Rn, int Rd, int Rm) {
156    mTarget->SWPB(cc, Rn, Rd, Rm);
157}
158void ARMAssemblerProxy::SWI(int cc, uint32_t comment) {
159    mTarget->SWI(cc, comment);
160}
161
162
163void ARMAssemblerProxy::PLD(int Rn, uint32_t offset) {
164    mTarget->PLD(Rn, offset);
165}
166void ARMAssemblerProxy::CLZ(int cc, int Rd, int Rm) {
167    mTarget->CLZ(cc, Rd, Rm);
168}
169void ARMAssemblerProxy::QADD(int cc, int Rd, int Rm, int Rn) {
170    mTarget->QADD(cc, Rd, Rm, Rn);
171}
172void ARMAssemblerProxy::QDADD(int cc, int Rd, int Rm, int Rn) {
173    mTarget->QDADD(cc, Rd, Rm, Rn);
174}
175void ARMAssemblerProxy::QSUB(int cc, int Rd, int Rm, int Rn) {
176    mTarget->QSUB(cc, Rd, Rm, Rn);
177}
178void ARMAssemblerProxy::QDSUB(int cc, int Rd, int Rm, int Rn) {
179    mTarget->QDSUB(cc, Rd, Rm, Rn);
180}
181void ARMAssemblerProxy::SMUL(int cc, int xy, int Rd, int Rm, int Rs) {
182    mTarget->SMUL(cc, xy, Rd, Rm, Rs);
183}
184void ARMAssemblerProxy::SMULW(int cc, int y, int Rd, int Rm, int Rs) {
185    mTarget->SMULW(cc, y, Rd, Rm, Rs);
186}
187void ARMAssemblerProxy::SMLA(int cc, int xy, int Rd, int Rm, int Rs, int Rn) {
188    mTarget->SMLA(cc, xy, Rd, Rm, Rs, Rn);
189}
190void ARMAssemblerProxy::SMLAL(  int cc, int xy,
191                                int RdHi, int RdLo, int Rs, int Rm) {
192    mTarget->SMLAL(cc, xy, RdHi, RdLo, Rs, Rm);
193}
194void ARMAssemblerProxy::SMLAW(int cc, int y, int Rd, int Rm, int Rs, int Rn) {
195    mTarget->SMLAW(cc, y, Rd, Rm, Rs, Rn);
196}
197
198void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
199    mTarget->UXTB16(cc, Rd, Rm, rotate);
200}
201
202void ARMAssemblerProxy::UBFX(int cc, int Rd, int Rn, int lsb, int width) {
203    mTarget->UBFX(cc, Rd, Rn, lsb, width);
204}
205
206}; // namespace android
207
208