• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
24 namespace android {
25 
26 // ----------------------------------------------------------------------------
27 
ARMAssemblerProxy()28 ARMAssemblerProxy::ARMAssemblerProxy()
29     : mTarget(0)
30 {
31 }
32 
ARMAssemblerProxy(ARMAssemblerInterface * target)33 ARMAssemblerProxy::ARMAssemblerProxy(ARMAssemblerInterface* target)
34     : mTarget(target)
35 {
36 }
37 
~ARMAssemblerProxy()38 ARMAssemblerProxy::~ARMAssemblerProxy()
39 {
40     delete mTarget;
41 }
42 
setTarget(ARMAssemblerInterface * target)43 void ARMAssemblerProxy::setTarget(ARMAssemblerInterface* target)
44 {
45     delete mTarget;
46     mTarget = target;
47 }
48 
reset()49 void ARMAssemblerProxy::reset() {
50     mTarget->reset();
51 }
generate(const char * name)52 int ARMAssemblerProxy::generate(const char* name) {
53     return mTarget->generate(name);
54 }
disassemble(const char * name)55 void ARMAssemblerProxy::disassemble(const char* name) {
56     return mTarget->disassemble(name);
57 }
prolog()58 void ARMAssemblerProxy::prolog() {
59     mTarget->prolog();
60 }
epilog(uint32_t touched)61 void ARMAssemblerProxy::epilog(uint32_t touched) {
62     mTarget->epilog(touched);
63 }
comment(const char * string)64 void ARMAssemblerProxy::comment(const char* string) {
65     mTarget->comment(string);
66 }
67 
68 
dataProcessing(int opcode,int cc,int s,int Rd,int Rn,uint32_t Op2)69 void 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 
MLA(int cc,int s,int Rd,int Rm,int Rs,int Rn)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);
77 }
MUL(int cc,int s,int Rd,int Rm,int Rs)78 void ARMAssemblerProxy::MUL(int cc, int s, int Rd, int Rm, int Rs) {
79     mTarget->MUL(cc, s, Rd, Rm, Rs);
80 }
UMULL(int cc,int s,int RdLo,int RdHi,int Rm,int 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);
84 }
UMUAL(int cc,int s,int RdLo,int RdHi,int Rm,int 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);
88 }
SMULL(int cc,int s,int RdLo,int RdHi,int Rm,int 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);
92 }
SMUAL(int cc,int s,int RdLo,int RdHi,int Rm,int 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);
96 }
97 
B(int cc,uint32_t * pc)98 void ARMAssemblerProxy::B(int cc, uint32_t* pc) {
99     mTarget->B(cc, pc);
100 }
BL(int cc,uint32_t * pc)101 void ARMAssemblerProxy::BL(int cc, uint32_t* pc) {
102     mTarget->BL(cc, pc);
103 }
BX(int cc,int Rn)104 void ARMAssemblerProxy::BX(int cc, int Rn) {
105     mTarget->BX(cc, Rn);
106 }
label(const char * theLabel)107 void ARMAssemblerProxy::label(const char* theLabel) {
108     mTarget->label(theLabel);
109 }
B(int cc,const char * label)110 void ARMAssemblerProxy::B(int cc, const char* label) {
111     mTarget->B(cc, label);
112 }
BL(int cc,const char * label)113 void ARMAssemblerProxy::BL(int cc, const char* label) {
114     mTarget->BL(cc, label);
115 }
116 
pcForLabel(const char * label)117 uint32_t* ARMAssemblerProxy::pcForLabel(const char* label) {
118     return mTarget->pcForLabel(label);
119 }
120 
LDR(int cc,int Rd,int Rn,uint32_t offset)121 void ARMAssemblerProxy::LDR(int cc, int Rd, int Rn, uint32_t offset) {
122     mTarget->LDR(cc, Rd, Rn, offset);
123 }
LDRB(int cc,int Rd,int Rn,uint32_t offset)124 void ARMAssemblerProxy::LDRB(int cc, int Rd, int Rn, uint32_t offset) {
125     mTarget->LDRB(cc, Rd, Rn, offset);
126 }
STR(int cc,int Rd,int Rn,uint32_t offset)127 void ARMAssemblerProxy::STR(int cc, int Rd, int Rn, uint32_t offset) {
128     mTarget->STR(cc, Rd, Rn, offset);
129 }
STRB(int cc,int Rd,int Rn,uint32_t offset)130 void ARMAssemblerProxy::STRB(int cc, int Rd, int Rn, uint32_t offset) {
131     mTarget->STRB(cc, Rd, Rn, offset);
132 }
LDRH(int cc,int Rd,int Rn,uint32_t offset)133 void ARMAssemblerProxy::LDRH(int cc, int Rd, int Rn, uint32_t offset) {
134     mTarget->LDRH(cc, Rd, Rn, offset);
135 }
LDRSB(int cc,int Rd,int Rn,uint32_t offset)136 void ARMAssemblerProxy::LDRSB(int cc, int Rd, int Rn, uint32_t offset) {
137     mTarget->LDRSB(cc, Rd, Rn, offset);
138 }
LDRSH(int cc,int Rd,int Rn,uint32_t offset)139 void ARMAssemblerProxy::LDRSH(int cc, int Rd, int Rn, uint32_t offset) {
140     mTarget->LDRSH(cc, Rd, Rn, offset);
141 }
STRH(int cc,int Rd,int Rn,uint32_t offset)142 void ARMAssemblerProxy::STRH(int cc, int Rd, int Rn, uint32_t offset) {
143     mTarget->STRH(cc, Rd, Rn, offset);
144 }
LDM(int cc,int dir,int Rn,int W,uint32_t reg_list)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);
147 }
STM(int cc,int dir,int Rn,int W,uint32_t 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);
150 }
151 
SWP(int cc,int Rn,int Rd,int Rm)152 void ARMAssemblerProxy::SWP(int cc, int Rn, int Rd, int Rm) {
153     mTarget->SWP(cc, Rn, Rd, Rm);
154 }
SWPB(int cc,int Rn,int Rd,int Rm)155 void ARMAssemblerProxy::SWPB(int cc, int Rn, int Rd, int Rm) {
156     mTarget->SWPB(cc, Rn, Rd, Rm);
157 }
SWI(int cc,uint32_t comment)158 void ARMAssemblerProxy::SWI(int cc, uint32_t comment) {
159     mTarget->SWI(cc, comment);
160 }
161 
162 
PLD(int Rn,uint32_t offset)163 void ARMAssemblerProxy::PLD(int Rn, uint32_t offset) {
164     mTarget->PLD(Rn, offset);
165 }
CLZ(int cc,int Rd,int Rm)166 void ARMAssemblerProxy::CLZ(int cc, int Rd, int Rm) {
167     mTarget->CLZ(cc, Rd, Rm);
168 }
QADD(int cc,int Rd,int Rm,int Rn)169 void ARMAssemblerProxy::QADD(int cc, int Rd, int Rm, int Rn) {
170     mTarget->QADD(cc, Rd, Rm, Rn);
171 }
QDADD(int cc,int Rd,int Rm,int Rn)172 void ARMAssemblerProxy::QDADD(int cc, int Rd, int Rm, int Rn) {
173     mTarget->QDADD(cc, Rd, Rm, Rn);
174 }
QSUB(int cc,int Rd,int Rm,int Rn)175 void ARMAssemblerProxy::QSUB(int cc, int Rd, int Rm, int Rn) {
176     mTarget->QSUB(cc, Rd, Rm, Rn);
177 }
QDSUB(int cc,int Rd,int Rm,int Rn)178 void ARMAssemblerProxy::QDSUB(int cc, int Rd, int Rm, int Rn) {
179     mTarget->QDSUB(cc, Rd, Rm, Rn);
180 }
SMUL(int cc,int xy,int Rd,int Rm,int Rs)181 void ARMAssemblerProxy::SMUL(int cc, int xy, int Rd, int Rm, int Rs) {
182     mTarget->SMUL(cc, xy, Rd, Rm, Rs);
183 }
SMULW(int cc,int y,int Rd,int Rm,int Rs)184 void ARMAssemblerProxy::SMULW(int cc, int y, int Rd, int Rm, int Rs) {
185     mTarget->SMULW(cc, y, Rd, Rm, Rs);
186 }
SMLA(int cc,int xy,int Rd,int Rm,int Rs,int Rn)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);
189 }
SMLAL(int cc,int xy,int RdHi,int RdLo,int Rs,int Rm)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);
193 }
SMLAW(int cc,int y,int Rd,int Rm,int Rs,int Rn)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);
196 }
197 
UXTB16(int cc,int Rd,int Rm,int rotate)198 void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
199     mTarget->UXTB16(cc, Rd, Rm, rotate);
200 }
201 
UBFX(int cc,int Rd,int Rn,int lsb,int width)202 void 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