aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2012-10-11 05:00:35 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2012-10-11 05:00:35 -0300
commit6b852ae04e3aa1adfeac5a62d6ab71870bcc7c5d (patch)
treecdf94fdf09a6b4abecff647784d82bc1ad1758c5 /tcg/tcg.h
parent8ed1d2756d3347c2b021748d8c272ff650f57dd0 (diff)
parentf430694188293f99a316bfa375b7cc17d23a06ed (diff)
Merge commit 'f430694188293f99a316bfa375b7cc17d23a06ed' into upstream-merge
* commit 'f430694188293f99a316bfa375b7cc17d23a06ed': (248 commits) add pc-1.3 machine type Cleanup unused global var qemu_system_powerdown target-sparc: use notifier for signaling guest system_powerdown command target-arm: use notifier for signaling guest system_powerdown command acpi: use notifier for signaling guest system_powerdown command Introduce powerdown_notifiers tcg/i386: fix build with -march < i686 tcg: Streamline movcond_i64 using movcond_i32 tcg: Streamline movcond_i64 using 32-bit arithmetic tcg: Sanity check goto_tb input tcg: Sanity check deposit inputs tcg: Add tcg_debug_assert tcg: Implement concat*_i64 with deposit_i64 tcg: Emit XORI as NOT for appropriate constants tcg: Optimize initial inputs for ori_i64 tcg: Emit ANDI as EXTU for appropriate constants tcg: Adjust descriptions of *cond opcodes tcg/mips: fix MIPS32(R2) detection block: remove keep_read_only flag from BlockDriverState struct block: convert bdrv_commit() to use bdrv_reopen() ... Conflicts: hw/pc_piix.c Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 7a72729f3..af7464a65 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -79,6 +79,7 @@ typedef uint64_t TCGRegSet;
#define TCG_TARGET_HAS_nand_i64 0
#define TCG_TARGET_HAS_nor_i64 0
#define TCG_TARGET_HAS_deposit_i64 0
+#define TCG_TARGET_HAS_movcond_i64 0
#endif
#ifndef TCG_TARGET_deposit_i32_valid
@@ -343,7 +344,7 @@ struct TCGContext {
/* goto_tb support */
uint8_t *code_buf;
- unsigned long *tb_next;
+ uintptr_t *tb_next;
uint16_t *tb_next_offset;
uint16_t *tb_jmp_offset; /* != NULL if USE_DIRECT_JUMP */
@@ -389,6 +390,7 @@ struct TCGContext {
#ifdef CONFIG_DEBUG_TCG
int temps_in_use;
+ int goto_tb_issue_mask;
#endif
};
@@ -459,11 +461,6 @@ static inline TCGv_i64 tcg_temp_local_new_i64(void)
void tcg_temp_free_i64(TCGv_i64 arg);
char *tcg_get_arg_str_i64(TCGContext *s, char *buf, int buf_size, TCGv_i64 arg);
-static inline bool tcg_arg_is_local(TCGContext *s, TCGArg arg)
-{
- return s->temps[arg].temp_local;
-}
-
#if defined(CONFIG_DEBUG_TCG)
/* If you call tcg_clear_temp_count() at the start of a section of
* code which is not supposed to leak any TCG temporaries, then
@@ -534,6 +531,15 @@ do {\
abort();\
} while (0)
+#ifdef CONFIG_DEBUG_TCG
+# define tcg_debug_assert(X) do { assert(X); } while (0)
+#elif QEMU_GNUC_PREREQ(4, 5)
+# define tcg_debug_assert(X) \
+ do { if (!(X)) { __builtin_unreachable(); } } while (0)
+#else
+# define tcg_debug_assert(X) do { (void)(X); } while (0)
+#endif
+
void tcg_add_target_add_op_defs(const TCGTargetOpDef *tdefs);
#if TCG_TARGET_REG_BITS == 32