aboutsummaryrefslogtreecommitdiffstats
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-06-11 20:03:02 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-06-11 20:03:03 -0700
commit870f03672ca3513fe5d666f425942fda651f30ec (patch)
treeedb8492d6181a99db7a38337ee2239c06d97661e /tcg/tcg.c
parent32167ca6cd795b619f4327d83f643a0805735ead (diff)
parent0b3979707c09e058442c22d046b326ce244edda1 (diff)
downloadexternal_qemu-870f03672ca3513fe5d666f425942fda651f30ec.zip
external_qemu-870f03672ca3513fe5d666f425942fda651f30ec.tar.gz
external_qemu-870f03672ca3513fe5d666f425942fda651f30ec.tar.bz2
Merge "Force emulator to quit if it's built w/o global register variable support"
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 5882f00..66529f5 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2030,6 +2030,15 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
unsigned int tpc2gpc_index = 0;
#endif // CONFIG_MEMCHECK
+#if !SUPPORT_GLOBAL_REGISTER_VARIABLE
+ printf("ERROR: This emulator is built by compiler without global register variable\n"
+ "support! Emulator reserves a register to point to target architecture state\n"
+ "for better code generation. LLVM-based compilers such as clang and llvm-gcc\n"
+ "currently don't support global register variable. Please see\n"
+ "http://source.android.com/source/initializing.html for detail.\n\n");
+ tcg_abort();
+#endif
+
#ifdef DEBUG_DISAS
if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP))) {
qemu_log("OP:\n");