Home | History | Annotate | Download | only in codeflinger
      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 
     28 ARMAssemblerProxy::ARMAssemblerProxy()
     29     : mTarget(0)
     30 {
     31 }
     32 
     33 ARMAssemblerProxy::ARMAssemblerProxy(ARMAssemblerInterface* target)
     34     : mTarget(target)
     35 {
     36 }
     37 
     38 ARMAssemblerProxy::~ARMAssemblerProxy()
     39 {
     40     delete mTarget;
     41 }
     42 
     43 void ARMAssemblerProxy::setTarget(ARMAssemblerInterface* target)
     44 {
     45     delete mTarget;
     46     mTarget = target;
     47 }
     48 
     49 void ARMAssemblerProxy::reset() {
     50     mTarget->reset();
     51 }
     52 int ARMAssemblerProxy::generate(const char* name) {
     53     return mTarget->generate(name);
     54 }
     55 void ARMAssemblerProxy::disassemble(const char* name) {
     56     return mTarget->disassemble(name);
     57 }
     58 void ARMAssemblerProxy::prolog() {
     59     mTarget->prolog();
     60 }
     61 void ARMAssemblerProxy::epilog(uint32_t touched) {
     62     mTarget->epilog(touched);
     63 }
     64 void ARMAssemblerProxy::comment(const char* string) {
     65     mTarget->comment(string);
     66 }
     67 
     68 
     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 
     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 }
     78 void ARMAssemblerProxy::MUL(int cc, int s, int Rd, int Rm, int Rs) {
     79     mTarget->MUL(cc, s, Rd, Rm, Rs);
     80 }
     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 }
     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 }
     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 }
     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 
     98 void ARMAssemblerProxy::B(int cc, uint32_t* pc) {
     99     mTarget->B(cc, pc);
    100 }
    101 void ARMAssemblerProxy::BL(int cc, uint32_t* pc) {
    102     mTarget->BL(cc, pc);
    103 }
    104 void ARMAssemblerProxy::BX(int cc, int Rn) {
    105     mTarget->BX(cc, Rn);
    106 }
    107 void ARMAssemblerProxy::label(const char* theLabel) {
    108     mTarget->label(theLabel);
    109 }
    110 void ARMAssemblerProxy::B(int cc, const char* label) {
    111     mTarget->B(cc, label);
    112 }
    113 void ARMAssemblerProxy::BL(int cc, const char* label) {
    114     mTarget->BL(cc, label);
    115 }
    116 
    117 uint32_t* ARMAssemblerProxy::pcForLabel(const char* label) {
    118     return mTarget->pcForLabel(label);
    119 }
    120 
    121 void ARMAssemblerProxy::LDR(int cc, int Rd, int Rn, uint32_t offset) {
    122     mTarget->LDR(cc, Rd, Rn, offset);
    123 }
    124 void ARMAssemblerProxy::LDRB(int cc, int Rd, int Rn, uint32_t offset) {
    125     mTarget->LDRB(cc, Rd, Rn, offset);
    126 }
    127 void ARMAssemblerProxy::STR(int cc, int Rd, int Rn, uint32_t offset) {
    128     mTarget->STR(cc, Rd, Rn, offset);
    129 }
    130 void ARMAssemblerProxy::STRB(int cc, int Rd, int Rn, uint32_t offset) {
    131     mTarget->STRB(cc, Rd, Rn, offset);
    132 }
    133 void ARMAssemblerProxy::LDRH(int cc, int Rd, int Rn, uint32_t offset) {
    134     mTarget->LDRH(cc, Rd, Rn, offset);
    135 }
    136 void ARMAssemblerProxy::LDRSB(int cc, int Rd, int Rn, uint32_t offset) {
    137     mTarget->LDRSB(cc, Rd, Rn, offset);
    138 }
    139 void ARMAssemblerProxy::LDRSH(int cc, int Rd, int Rn, uint32_t offset) {
    140     mTarget->LDRSH(cc, Rd, Rn, offset);
    141 }
    142 void ARMAssemblerProxy::STRH(int cc, int Rd, int Rn, uint32_t offset) {
    143     mTarget->STRH(cc, Rd, Rn, offset);
    144 }
    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 }
    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 
    152 void ARMAssemblerProxy::SWP(int cc, int Rn, int Rd, int Rm) {
    153     mTarget->SWP(cc, Rn, Rd, Rm);
    154 }
    155 void ARMAssemblerProxy::SWPB(int cc, int Rn, int Rd, int Rm) {
    156     mTarget->SWPB(cc, Rn, Rd, Rm);
    157 }
    158 void ARMAssemblerProxy::SWI(int cc, uint32_t comment) {
    159     mTarget->SWI(cc, comment);
    160 }
    161 
    162 
    163 void ARMAssemblerProxy::PLD(int Rn, uint32_t offset) {
    164     mTarget->PLD(Rn, offset);
    165 }
    166 void ARMAssemblerProxy::CLZ(int cc, int Rd, int Rm) {
    167     mTarget->CLZ(cc, Rd, Rm);
    168 }
    169 void ARMAssemblerProxy::QADD(int cc, int Rd, int Rm, int Rn) {
    170     mTarget->QADD(cc, Rd, Rm, Rn);
    171 }
    172 void ARMAssemblerProxy::QDADD(int cc, int Rd, int Rm, int Rn) {
    173     mTarget->QDADD(cc, Rd, Rm, Rn);
    174 }
    175 void ARMAssemblerProxy::QSUB(int cc, int Rd, int Rm, int Rn) {
    176     mTarget->QSUB(cc, Rd, Rm, Rn);
    177 }
    178 void ARMAssemblerProxy::QDSUB(int cc, int Rd, int Rm, int Rn) {
    179     mTarget->QDSUB(cc, Rd, Rm, Rn);
    180 }
    181 void ARMAssemblerProxy::SMUL(int cc, int xy, int Rd, int Rm, int Rs) {
    182     mTarget->SMUL(cc, xy, Rd, Rm, Rs);
    183 }
    184 void ARMAssemblerProxy::SMULW(int cc, int y, int Rd, int Rm, int Rs) {
    185     mTarget->SMULW(cc, y, Rd, Rm, Rs);
    186 }
    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 }
    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 }
    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 
    198 void ARMAssemblerProxy::UXTB16(int cc, int Rd, int Rm, int rotate) {
    199     mTarget->UXTB16(cc, Rd, Rm, rotate);
    200 }
    201 
    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