| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 | 46 |
| 47 // We always generate arm code, never thumb code, even if V8 is compiled to | 47 // We always generate arm code, never thumb code, even if V8 is compiled to |
| 48 // thumb, so we require inter-working support | 48 // thumb, so we require inter-working support |
| 49 #if defined(__thumb__) && !defined(USE_THUMB_INTERWORK) | 49 #if defined(__thumb__) && !defined(USE_THUMB_INTERWORK) |
| 50 #error "flag -mthumb-interwork missing" | 50 #error "flag -mthumb-interwork missing" |
| 51 #endif | 51 #endif |
| 52 | 52 |
| 53 | 53 |
| 54 // We do not support thumb inter-working with an arm architecture not supporting | 54 // We do not support thumb inter-working with an arm architecture not supporting |
| 55 // the blx instruction (below v5t) | 55 // the blx instruction (below v5t). If you know what CPU you are compiling for |
| 56 #if defined(USE_THUMB_INTERWORK) | 56 // you can use -march=armv7 or similar. |
| 57 #if !defined(__ARM_ARCH_5T__) && \ | 57 #if defined(USE_THUMB_INTERWORK) && !defined(CAN_USE_THUMB_INSTRUCTIONS) |
| 58 !defined(__ARM_ARCH_5TE__) && \ | 58 # error "For thumb inter-working we require an architecture which supports blx" |
| 59 !defined(__ARM_ARCH_6__) && \ | |
| 60 !defined(__ARM_ARCH_7A__) && \ | |
| 61 !defined(__ARM_ARCH_7__) | |
| 62 // add tests for other versions above v5t as required | |
| 63 #error "for thumb inter-working we require architecture v5t or above" | |
| 64 #endif | |
| 65 #endif | 59 #endif |
| 66 | 60 |
| 67 | 61 |
| 68 // Using blx may yield better code, so use it when required or when available | 62 // Using blx may yield better code, so use it when required or when available |
| 69 #if defined(USE_THUMB_INTERWORK) || defined(__ARM_ARCH_5__) | 63 #if defined(USE_THUMB_INTERWORK) || defined(CAN_USE_ARMV5_INSTRUCTIONS) |
| 70 #define USE_BLX 1 | 64 #define USE_BLX 1 |
| 71 #endif | 65 #endif |
| 72 | 66 |
| 73 // Using bx does not yield better code, so use it only when required | 67 // Using bx does not yield better code, so use it only when required |
| 74 #if defined(USE_THUMB_INTERWORK) | 68 #if defined(USE_THUMB_INTERWORK) |
| 75 #define USE_BX 1 | 69 #define USE_BX 1 |
| 76 #endif | 70 #endif |
| 77 | 71 |
| 78 | 72 |
| 79 void MacroAssembler::Jump(Register target, Condition cond) { | 73 void MacroAssembler::Jump(Register target, Condition cond) { |
| (...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1181 } | 1175 } |
| 1182 | 1176 |
| 1183 | 1177 |
| 1184 void CodePatcher::Emit(Address addr) { | 1178 void CodePatcher::Emit(Address addr) { |
| 1185 masm()->emit(reinterpret_cast<Instr>(addr)); | 1179 masm()->emit(reinterpret_cast<Instr>(addr)); |
| 1186 } | 1180 } |
| 1187 #endif // ENABLE_DEBUGGER_SUPPORT | 1181 #endif // ENABLE_DEBUGGER_SUPPORT |
| 1188 | 1182 |
| 1189 | 1183 |
| 1190 } } // namespace v8::internal | 1184 } } // namespace v8::internal |
| OLD | NEW |