summaryrefslogtreecommitdiff
path: root/src/compiler/codegen/codegen_util.h
diff options
context:
space:
mode:
author buzbee <buzbee@google.com> 2012-11-23 09:41:35 -0800
committer buzbee <buzbee@google.com> 2012-11-25 13:22:45 -0800
commit02031b185b4653e6c72e21f7a51238b903f6d638 (patch)
tree0fae8dbc0a15d4ed379768bdc7adf1910b1d46af /src/compiler/codegen/codegen_util.h
parent90ad9639047a8acbd563247f8869f825cf80e576 (diff)
Quick compiler: Single .so for all targets
With this CL, all targets can be built into a single .so (but we're not yet doing so - the compiler driver needs to be reworked). A new Codgen class is introduced (see compiler/codegen/codegen.h), along with target-specific sub-classes ArmCodegen, MipsCodegens and X86Codegen (see compiler/codegen/*/codegen_[Arm|Mips|X86].h). Additional minor code, comment and format refactoring. Some source files combined, temporary header files deleted and a few file renames to better identify their function. Next up is combining the Quick and Portable .so files. Note: building all targets into libdvm-compiler.so increases its size by 140K bytes. I'm inclined to not bother introducing conditional compilation to limit code to the specific target - the added build and testing complexity doesn't doesn't seem worth such a modest size savings. Change-Id: Id9c5b4502ad6b77cdb31f71d3126f51a4f2e9dfe
Diffstat (limited to 'src/compiler/codegen/codegen_util.h')
-rw-r--r--src/compiler/codegen/codegen_util.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/compiler/codegen/codegen_util.h b/src/compiler/codegen/codegen_util.h
index 380203a199..6a9b6cdb1f 100644
--- a/src/compiler/codegen/codegen_util.h
+++ b/src/compiler/codegen/codegen_util.h
@@ -19,19 +19,23 @@
namespace art {
+void MarkSafepointPC(CompilationUnit* cu, LIR* inst);
+bool FastInstance(CompilationUnit* cu, uint32_t field_idx,
+ int& field_offset, bool& is_volatile, bool is_put);
+void SetupResourceMasks(CompilationUnit* cu, LIR* lir);
inline int32_t s4FromSwitchData(const void* switch_data) { return *reinterpret_cast<const int32_t*>(switch_data); }
inline RegisterClass oat_reg_class_by_size(OpSize size) { return (size == kUnsignedHalf || size == kSignedHalf || size == kUnsignedByte || size == kSignedByte ) ? kCoreReg : kAnyReg; }
void AssembleLIR(CompilationUnit* cu);
-void SetMemRefType(LIR* lir, bool is_load, int mem_type);
-void AnnotateDalvikRegAccess(LIR* lir, int reg_id, bool is_load, bool is64bit);
+void SetMemRefType(CompilationUnit* cu, LIR* lir, bool is_load, int mem_type);
+void AnnotateDalvikRegAccess(CompilationUnit* cu, LIR* lir, int reg_id, bool is_load, bool is64bit);
uint64_t GetRegMaskCommon(CompilationUnit* cu, int reg);
void SetupRegMask(CompilationUnit* cu, uint64_t* mask, int reg);
void SetupResourceMasks(CompilationUnit* cu, LIR* lir);
void DumpLIRInsn(CompilationUnit* cu, LIR* arg, unsigned char* base_addr);
void DumpPromotionMap(CompilationUnit *cu);
void CodegenDump(CompilationUnit* cu);
-// TODO: remove default parameters
-LIR* RawLIR(CompilationUnit* cu, int dalvik_offset, int opcode, int op0 = 0, int op1 = 0, int op2 = 0, int op3 = 0, int op4 = 0, LIR* target = NULL);
+LIR* RawLIR(CompilationUnit* cu, int dalvik_offset, int opcode, int op0 = 0, int op1 = 0,
+ int op2 = 0, int op3 = 0, int op4 = 0, LIR* target = NULL);
LIR* NewLIR0(CompilationUnit* cu, int opcode);
LIR* NewLIR1(CompilationUnit* cu, int opcode, int dest);
LIR* NewLIR2(CompilationUnit* cu, int opcode, int dest, int src1);
@@ -46,6 +50,7 @@ void ProcessSwitchTables(CompilationUnit* cu);
void DumpSparseSwitchTable(const uint16_t* table);
void DumpPackedSwitchTable(const uint16_t* table);
LIR* MarkBoundary(CompilationUnit* cu, int offset, const char* inst_str);
+void NopLIR(LIR* lir);
} // namespace art