1 /* libs/pixelflinger/codeflinger/ARMAssemblerProxy.cpp
3 ** Copyright 2006, The Android Open Source Project
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
9 ** http://www.apache.org/licenses/LICENSE-2.0
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.
20 #include <sys/types.h>
22 #include "codeflinger/ARMAssemblerProxy.h"
26 // ----------------------------------------------------------------------------
28 ARMAssemblerProxy::ARMAssemblerProxy()
33 ARMAssemblerProxy::ARMAssemblerProxy(ARMAssemblerInterface* target)
38 ARMAssemblerProxy::~ARMAssemblerProxy()
43 void ARMAssemblerProxy::setTarget(ARMAssemblerInterface* target)
49 void ARMAssemblerProxy::reset() {
52 int ARMAssemblerProxy::generate(const char* name) {
53 return mTarget->generate(name);
55 void ARMAssemblerProxy::disassemble(const char* name) {
56 return mTarget->disassemble(name);
58 void ARMAssemblerProxy::prolog() {
61 void ARMAssemblerProxy::epilog(uint32_t touched) {
62 mTarget->epilog(touched);
64 void ARMAssemblerProxy::comment(const char* string) {
65 mTarget->comment(string);
69 void ARMAssemblerProxy::dataProcessing( int opcode, int cc, int s,
70 int Rd, int Rn, uint32_t Op2)
72 mTarget->dataProcessing(opcode, cc, s, Rd, Rn, Op2);
75 void ARMAssemblerProxy::MLA(int cc, int s, int Rd, int Rm, int Rs, int Rn) {
76 mTarget->MLA(cc, s, Rd, Rm, Rs, Rn);
78 void ARMAssemblerProxy::MUL(int cc, int s, int Rd, int Rm, int Rs) {
79 mTarget->MUL(cc, s, Rd, Rm, Rs);
81 void ARMAssemblerProxy::UMULL(int cc, int s,
82 int RdLo, int RdHi, int Rm, int Rs) {
83 mTarget->UMULL(cc, s, RdLo, RdHi, Rm, Rs);
85 void ARMAssemblerProxy::UMUAL(int cc, int s,
86 int RdLo, int RdHi, int Rm, int Rs) {
87 mTarget->UMUAL(cc, s, RdLo, RdHi, Rm, Rs);
89 void ARMAssemblerProxy::SMULL(int cc, int s,
90 int RdLo, int RdHi, int Rm, int Rs) {
91 mTarget->SMULL(cc, s, RdLo, RdHi, Rm, Rs);
93 void ARMAssemblerProxy::SMUAL(int cc, int s,
94 int RdLo, int RdHi, int Rm, int Rs) {
95 mTarget->SMUAL(cc, s, RdLo, RdHi, Rm, Rs);
98 void ARMAssemblerProxy::B(int cc, uint32_t* pc) {
101 void ARMAssemblerProxy::BL(int cc, uint32_t* pc) {
104 void ARMAssemblerProxy::BX(int cc, int Rn) {
107 void ARMAssemblerProxy::label(const char* theLabel) {
108 mTarget->label(theLabel);
110 void ARMAssemblerProxy::B(int cc, const char* label) {
111 mTarget->B(cc, label);
113 void ARMAssemblerProxy::BL(int cc, const char* label) {
114 mTarget->BL(cc, label);
117 uint32_t* ARMAssemblerProxy::pcForLabel(const char* label) {
118 return mTarget->pcForLabel(label);
121 void ARMAssemblerProxy::LDR(int cc, int Rd, int Rn, uint32_t offset) {
122 mTarget->LDR(cc, Rd, Rn, offset);
124 void ARMAssemblerProxy::LDRB(int cc, int Rd, int Rn, uint32_t offset) {
125 mTarget->LDRB(cc, Rd, Rn, offset);
127 void ARMAssemblerProxy::STR(int cc, int Rd, int Rn, uint32_t offset) {
128 mTarget->STR(cc, Rd, Rn, offset);
130 void ARMAssemblerProxy::STRB(int cc, int Rd, int Rn, uint32_t offset) {
131 mTarget->STRB(cc, Rd, Rn, offset);
133 void ARMAssemblerProxy::LDRH(int cc, int Rd, int Rn, uint32_t offset) {
134 mTarget->LDRH(cc, Rd, Rn, offset);
136 void ARMAssemblerProxy::LDRSB(int cc, int Rd, int Rn, uint32_t offset) {
137 mTarget->LDRSB(cc, Rd, Rn, offset);
139 void ARMAssemblerProxy::LDRSH(int cc, int Rd, int Rn, uint32_t offset) {
140 mTarget->LDRSH(cc, Rd, Rn, offset);
142 void ARMAssemblerProxy::STRH(int cc, int Rd, int Rn, uint32_t offset) {
143 mTarget->STRH(cc, Rd, Rn, offset);
145 void ARMAssemblerProxy::LDM(int cc, int dir, int Rn, int W, uint32_t reg_list) {
146 mTarget->LDM(cc, dir, Rn, W, reg_list);
148 void ARMAssemblerProxy::STM(int cc, int dir, int Rn, int W, uint32_t reg_list) {
149 mTarget->STM(cc, dir, Rn, W, reg_list);
152 void ARMAssemblerProxy::SWP(int cc, int Rn, int Rd, int Rm) {
153 mTarget->SWP(cc, Rn, Rd, Rm);
155 void ARMAssemblerProxy::SWPB(int cc, int Rn, int Rd, int Rm) {
156 mTarget->SWPB(cc, Rn, Rd, Rm);
158 void ARMAssemblerProxy::SWI(int cc, uint32_t comment) {
159 mTarget->SWI(cc, comment);
163 void ARMAssemblerProxy::PLD(int Rn, uint32_t offset) {
164 mTarget->PLD(Rn, offset);
166 void ARMAssemblerProxy::CLZ(int cc, int Rd, int Rm) {
167 mTarget->CLZ(cc, Rd, Rm);
169 void ARMAssemblerProxy::QADD(int cc, int Rd, int Rm, int Rn) {
170 mTarget->QADD(cc, Rd, Rm, Rn);
172 void ARMAssemblerProxy::QDADD(int cc, int Rd, int Rm, int Rn) {
173 mTarget->QDADD(cc, Rd, Rm, Rn);
175 void ARMAssemblerProxy::QSUB(int cc, int Rd, int Rm, int Rn) {
176 mTarget->QSUB(cc, Rd, Rm, Rn);
178 void ARMAssemblerProxy::QDSUB(int cc, int Rd, int Rm, int Rn) {
179 mTarget->QDSUB(cc, Rd, Rm, Rn);
181 void ARMAssemblerProxy::SMUL(int cc, int xy, int Rd, int Rm, int Rs) {
182 mTarget->SMUL(cc, xy, Rd, Rm, Rs);
184 void ARMAssemblerProxy::SMULW(int cc, int y, int Rd, int Rm, int Rs) {
185 mTarget->SMULW(cc, y, Rd, Rm, Rs);
187 void ARMAssemblerProxy::SMLA(int cc, int xy, int Rd, int Rm, int Rs, int Rn) {
188 mTarget->SMLA(cc, xy, Rd, Rm, Rs, Rn);
190 void ARMAssemblerProxy::SMLAL( int cc, int xy,
191 int RdHi, int RdLo, int Rs, int Rm) {
192 mTarget->SMLAL(cc, xy, RdHi, RdLo, Rs, Rm);
194 void ARMAssemblerProxy::SMLAW(int cc, int y, int Rd, int Rm, int Rs, int Rn) {
195 mTarget->SMLAW(cc, y, Rd, Rm, Rs, Rn);
198 void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
199 mTarget->UXTB16(cc, Rd, Rm, rotate);
202 }; // namespace android