summaryrefslogtreecommitdiffstats
path: root/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
diff options
context:
space:
mode:
authorPaul Lind <plind@mips.com>2012-02-01 10:54:19 -0800
committerPaul Lind <plind@mips.com>2012-08-13 11:41:15 -0700
commit2bc2b792782b304b15d8c48b54916a9b3fa3a7ac (patch)
tree12bdbda74e161ec1a3874fb873912641315ddb14 /libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
parentae8927aa05adf9e5a00760b45e4634eecf6340e3 (diff)
downloadsystem_core-2bc2b792782b304b15d8c48b54916a9b3fa3a7ac.tar.gz
system_core-2bc2b792782b304b15d8c48b54916a9b3fa3a7ac.tar.bz2
system_core-2bc2b792782b304b15d8c48b54916a9b3fa3a7ac.zip
Add MIPS support to pixelflinger.
See the comment-block at the top of MIPSAssembler.cpp for implementation overview. Change-Id: Id492c10610574af8c89c38d19e12fafc3652c28a
Diffstat (limited to 'libpixelflinger/codeflinger/ARMAssemblerProxy.cpp')
-rw-r--r--libpixelflinger/codeflinger/ARMAssemblerProxy.cpp91
1 files changed, 91 insertions, 0 deletions
diff --git a/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp b/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
index c57d7daa9..7feed622b 100644
--- a/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
+++ b/libpixelflinger/codeflinger/ARMAssemblerProxy.cpp
@@ -55,6 +55,10 @@ int ARMAssemblerProxy::generate(const char* name) {
void ARMAssemblerProxy::disassemble(const char* name) {
return mTarget->disassemble(name);
}
+int ARMAssemblerProxy::getCodegenArch()
+{
+ return mTarget->getCodegenArch();
+}
void ARMAssemblerProxy::prolog() {
mTarget->prolog();
}
@@ -66,6 +70,93 @@ void ARMAssemblerProxy::comment(const char* string) {
}
+
+// addressing modes
+
+bool ARMAssemblerProxy::isValidImmediate(uint32_t immed)
+{
+ return mTarget->isValidImmediate(immed);
+}
+
+int ARMAssemblerProxy::buildImmediate(uint32_t i, uint32_t& rot, uint32_t& imm)
+{
+ return mTarget->buildImmediate(i, rot, imm);
+}
+
+
+
+uint32_t ARMAssemblerProxy::imm(uint32_t immediate)
+{
+ return mTarget->imm(immediate);
+}
+
+uint32_t ARMAssemblerProxy::reg_imm(int Rm, int type, uint32_t shift)
+{
+ return mTarget->reg_imm(Rm, type, shift);
+}
+
+uint32_t ARMAssemblerProxy::reg_rrx(int Rm)
+{
+ return mTarget->reg_rrx(Rm);
+}
+
+uint32_t ARMAssemblerProxy::reg_reg(int Rm, int type, int Rs)
+{
+ return mTarget->reg_reg(Rm, type, Rs);
+}
+
+
+// addressing modes...
+// LDR(B)/STR(B)/PLD
+// (immediate and Rm can be negative, which indicates U=0)
+uint32_t ARMAssemblerProxy::immed12_pre(int32_t immed12, int W)
+{
+ return mTarget->immed12_pre(immed12, W);
+}
+
+uint32_t ARMAssemblerProxy::immed12_post(int32_t immed12)
+{
+ return mTarget->immed12_post(immed12);
+}
+
+uint32_t ARMAssemblerProxy::reg_scale_pre(int Rm, int type, uint32_t shift, int W)
+{
+ return mTarget->reg_scale_pre(Rm, type, shift, W);
+}
+
+uint32_t ARMAssemblerProxy::reg_scale_post(int Rm, int type, uint32_t shift)
+{
+ return mTarget->reg_scale_post(Rm, type, shift);
+}
+
+
+// LDRH/LDRSB/LDRSH/STRH
+// (immediate and Rm can be negative, which indicates U=0)
+uint32_t ARMAssemblerProxy::immed8_pre(int32_t immed8, int W)
+{
+ return mTarget->immed8_pre(immed8, W);
+}
+
+uint32_t ARMAssemblerProxy::immed8_post(int32_t immed8)
+{
+ return mTarget->immed8_post(immed8);
+}
+
+uint32_t ARMAssemblerProxy::reg_pre(int Rm, int W)
+{
+ return mTarget->reg_pre(Rm, W);
+}
+
+uint32_t ARMAssemblerProxy::reg_post(int Rm)
+{
+ return mTarget->reg_post(Rm);
+}
+
+
+//------------------------------------------------------------------------
+
+
+
void ARMAssemblerProxy::dataProcessing( int opcode, int cc, int s,
int Rd, int Rn, uint32_t Op2)
{