summaryrefslogtreecommitdiff
path: root/tcg/tcg.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2011-08-17 14:11:46 -0700
committerBlue Swirl <blauwirbel@gmail.com>2011-08-21 18:52:24 +0000
commit25c4d9cc845fb58f624dae8c0f690e20c70e7a1d (patch)
tree79ff5484f3fe9995d2e28c9e0931fe855b099a6c /tcg/tcg.c
parent8399ad59e73a0f48af3edef62f021e2cb6220e12 (diff)
downloadqemu-25c4d9cc845fb58f624dae8c0f690e20c70e7a1d.tar.gz
tcg: Always define all of the TCGOpcode enum members.
By always defining these symbols, we can eliminate a lot of ifdefs. To allow this to be checked reliably, the semantics of the TCG_TARGET_HAS_* macros must be changed from def/undef to true/false. This allows even more ifdefs to be removed, converting them into C if statements. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tcg/tcg.c')
-rw-r--r--tcg/tcg.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tcg/tcg.c b/tcg/tcg.c
index 70f19e4e9e..06ce214881 100644
--- a/tcg/tcg.c
+++ b/tcg/tcg.c
@@ -2124,6 +2124,10 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf,
case INDEX_op_end:
goto the_end;
default:
+ /* Sanity check that we've not introduced any unhandled opcodes. */
+ if (def->flags & TCG_OPF_NOT_PRESENT) {
+ tcg_abort();
+ }
/* Note: in order to speed up the code, it would be much
faster to have specialized register allocator functions for
some common argument patterns */