Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 1 | #ifndef BCC_CONFIG_H |
| 2 | #define BCC_CONFIG_H |
| 3 | |
| 4 | //--------------------------------------------------------------------------- |
Shih-wei Liao | 898c5a9 | 2011-05-18 07:02:39 -0700 | [diff] [blame] | 5 | // Configuration for JIT & MC Assembler |
| 6 | //--------------------------------------------------------------------------- |
Joseph Wen | 739527e | 2011-07-07 10:04:54 -0700 | [diff] [blame] | 7 | #define USE_OLD_JIT 0 |
| 8 | #define USE_MCJIT 1 |
Logan Chien | b0ceca2 | 2011-06-12 13:34:49 +0800 | [diff] [blame] | 9 | |
| 10 | #if !USE_OLD_JIT && !USE_MCJIT |
| 11 | #error "You should choose at least one code generation method." |
| 12 | #endif |
Shih-wei Liao | 898c5a9 | 2011-05-18 07:02:39 -0700 | [diff] [blame] | 13 | |
| 14 | //--------------------------------------------------------------------------- |
Logan | 1dc6314 | 2011-02-25 17:14:51 +0800 | [diff] [blame] | 15 | // Configuration for libbcc |
| 16 | //--------------------------------------------------------------------------- |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 17 | |
| 18 | #define USE_CACHE 1 |
| 19 | |
| 20 | #define USE_DISASSEMBLER 1 |
Shih-wei Liao | 9f73de0 | 2011-07-01 04:40:24 -0700 | [diff] [blame] | 21 | #define DEBUG_OLD_JIT_DISASSEMBLE 0 |
| 22 | #define DEBUG_MCJIT_DISASSEMBLE 0 |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 23 | |
| 24 | #define USE_DISASSEMBLER_FILE 0 |
| 25 | |
Logan | 4dcd679 | 2011-02-28 05:12:00 +0800 | [diff] [blame] | 26 | #define USE_LOGGER 1 |
| 27 | |
| 28 | #define USE_FUNC_LOGGER 0 |
| 29 | |
Shih-wei Liao | 9f73de0 | 2011-07-01 04:40:24 -0700 | [diff] [blame] | 30 | #define DEBUG_BCC_REFLECT 0 |
| 31 | |
Joseph Wen | 739527e | 2011-07-07 10:04:54 -0700 | [diff] [blame] | 32 | #define DEBUG_MCJIT_REFLECT 0 |
| 33 | |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 34 | //--------------------------------------------------------------------------- |
Logan | 1dc6314 | 2011-02-25 17:14:51 +0800 | [diff] [blame] | 35 | // Configuration for ContextManager |
| 36 | //--------------------------------------------------------------------------- |
| 37 | |
| 38 | // Note: Most of the code should NOT use these constants. Use the public |
| 39 | // static member of ContextManager instead, which is type-safe. For example, |
| 40 | // if you need BCC_CONTEXT_FIXED_ADDR_, then you should write: |
| 41 | // ContextManager::ContextFixedAddr |
| 42 | |
| 43 | #define BCC_CONTEXT_FIXED_ADDR_ reinterpret_cast<char *>(0x7e000000) |
| 44 | |
| 45 | #define BCC_CONTEXT_SLOT_COUNT_ 8 |
| 46 | |
| 47 | #define BCC_CONTEXT_CODE_SIZE_ (128 * 1024) |
| 48 | |
| 49 | #define BCC_CONTEXT_DATA_SIZE_ (128 * 1024) |
| 50 | |
| 51 | //--------------------------------------------------------------------------- |
| 52 | // Configuration for CodeGen and CompilerRT |
| 53 | //--------------------------------------------------------------------------- |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 54 | |
| 55 | #if defined(__arm__) |
| 56 | #define DEFAULT_ARM_CODEGEN |
| 57 | #define PROVIDE_ARM_CODEGEN |
| 58 | #elif defined(__i386__) |
| 59 | #define DEFAULT_X86_CODEGEN |
| 60 | #define PROVIDE_X86_CODEGEN |
| 61 | #elif defined(__x86_64__) |
| 62 | #define DEFAULT_X64_CODEGEN |
| 63 | #define PROVIDE_X64_CODEGEN |
| 64 | #endif |
| 65 | |
| 66 | #if defined(FORCE_ARM_CODEGEN) |
| 67 | #define DEFAULT_ARM_CODEGEN |
| 68 | #undef DEFAULT_X86_CODEGEN |
| 69 | #undef DEFAULT_X64_CODEGEN |
| 70 | #define PROVIDE_ARM_CODEGEN |
| 71 | #undef PROVIDE_X86_CODEGEN |
| 72 | #undef PROVIDE_X64_CODEGEN |
| 73 | #elif defined(FORCE_X86_CODEGEN) |
| 74 | #undef DEFAULT_ARM_CODEGEN |
| 75 | #define DEFAULT_X86_CODEGEN |
| 76 | #undef DEFAULT_X64_CODEGEN |
| 77 | #undef PROVIDE_ARM_CODEGEN |
| 78 | #define PROVIDE_X86_CODEGEN |
| 79 | #undef PROVIDE_X64_CODEGEN |
| 80 | #elif defined(FORCE_X64_CODEGEN) |
| 81 | #undef DEFAULT_ARM_CODEGEN |
| 82 | #undef DEFAULT_X86_CODEGEN |
| 83 | #define DEFAULT_X64_CODEGEN |
| 84 | #undef PROVIDE_ARM_CODEGEN |
| 85 | #undef PROVIDE_X86_CODEGEN |
| 86 | #define PROVIDE_X64_CODEGEN |
| 87 | #endif |
| 88 | |
| 89 | #if defined(DEFAULT_ARM_CODEGEN) |
| 90 | #define TARGET_TRIPLE_STRING "armv7-none-linux-gnueabi" |
| 91 | #elif defined(DEFAULT_X86_CODEGEN) |
| 92 | #define TARGET_TRIPLE_STRING "i686-unknown-linux" |
| 93 | #elif defined(DEFAULT_X64_CODEGEN) |
| 94 | #define TARGET_TRIPLE_STRING "x86_64-unknown-linux" |
| 95 | #endif |
| 96 | |
| 97 | #if (defined(__VFP_FP__) && !defined(__SOFTFP__)) |
| 98 | #define ARM_USE_VFP |
| 99 | #endif |
| 100 | |
| 101 | //--------------------------------------------------------------------------- |
| 102 | |
| 103 | #endif // BCC_CONFIG_H |