1#ifndef BCC_CONFIG_H 2#define BCC_CONFIG_H 3 4#include "ConfigFromMk.h" 5 6//--------------------------------------------------------------------------- 7// Configuration for JIT & MC Assembler 8//--------------------------------------------------------------------------- 9#if !USE_OLD_JIT && !USE_MCJIT 10#error "You should choose at least one code generation method." 11#endif 12 13//--------------------------------------------------------------------------- 14// Configuration for Disassembler 15//--------------------------------------------------------------------------- 16 17#if !USE_OLD_JIT 18#undef DEBUG_OLD_JIT_DISASSEMBLER 19#define DEBUG_OLD_JIT_DISASSEMBLER 0 20#endif 21 22#if !USE_MCJIT 23#undef DEBUG_MCJIT_DISASSEMBLER 24#define DEBUG_MCJIT_DISASSEMBLER 0 25#endif 26 27#if DEBUG_OLD_JIT_DISASSEMBLER || DEBUG_MCJIT_DISASSEMBLER 28#define USE_DISASSEMBLER 1 29#else 30#define USE_DISASSEMBLER 0 31#endif 32 33#define DEBUG_OLD_JIT_DISASSEMBLER_FILE "/data/local/tmp/oldjit-dis.s" 34#define DEBUG_MCJIT_DISASSEMBLER_FILE "/data/local/tmp/mcjit-dis.s" 35 36//--------------------------------------------------------------------------- 37// Configuration for ContextManager 38//--------------------------------------------------------------------------- 39 40// Note: Most of the code should NOT use these constants. Use the public 41// static member of ContextManager instead, which is type-safe. For example, 42// if you need BCC_CONTEXT_FIXED_ADDR_, then you should write: 43// ContextManager::ContextFixedAddr 44 45#define BCC_CONTEXT_FIXED_ADDR_ reinterpret_cast<char *>(0x7e000000) 46 47#define BCC_CONTEXT_SLOT_COUNT_ 8 48 49#define BCC_CONTEXT_CODE_SIZE_ (128 * 1024) 50 51#define BCC_CONTEXT_DATA_SIZE_ (128 * 1024) 52 53//--------------------------------------------------------------------------- 54// Configuration for CodeGen and CompilerRT 55//--------------------------------------------------------------------------- 56 57#if defined(FORCE_ARM_CODEGEN) 58 #define PROVIDE_ARM_CODEGEN 59 #define DEFAULT_ARM_CODEGEN 60 61#elif defined(FORCE_X86_CODEGEN) 62 #define PROVIDE_X86_CODEGEN 63 64 #if defined(__i386__) 65 #define DEFAULT_X86_CODEGEN 66 #elif defined(__x86_64__) 67 #define DEFAULT_X86_64_CODEGEN 68 #endif 69 70#else 71 #define PROVIDE_ARM_CODEGEN 72 #define PROVIDE_X86_CODEGEN 73 74 #if defined(__arm__) 75 #define DEFAULT_ARM_CODEGEN 76 #elif defined(__i386__) 77 #define DEFAULT_X86_CODEGEN 78 #elif defined(__x86_64__) 79 #define DEFAULT_X86_64_CODEGEN 80 #endif 81#endif 82 83#if defined(DEFAULT_ARM_CODEGEN) 84 #define TARGET_TRIPLE_STRING "armv7-none-linux-gnueabi" 85#elif defined(DEFAULT_X86_CODEGEN) 86 #define TARGET_TRIPLE_STRING "i686-unknown-linux" 87#elif defined(DEFAULT_X86_64_CODEGEN) 88 #define TARGET_TRIPLE_STRING "x86_64-unknown-linux" 89#endif 90 91#if (defined(__VFP_FP__) && !defined(__SOFTFP__)) 92 #define ARM_USE_VFP 93#endif 94 95//--------------------------------------------------------------------------- 96 97#endif // BCC_CONFIG_H 98