aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-09-29 18:52:11 +0200
committerBlue Swirl <blauwirbel@gmail.com>2011-10-01 06:42:46 +0000
commita4773324b4bc5f15fe9b438e4cfff05e1ab16dfa (patch)
treeca5efb7a06cf3f553b339b7a945447ae242ad6b3 /tcg/tcg.h
parent7e17a217061e402243499d96fc8dec92162d8b4a (diff)
downloadqemu-arm-a4773324b4bc5f15fe9b438e4cfff05e1ab16dfa.tar.gz
tcg-i386: Introduce limited deposit support
x86 cannot provide an optimized generic deposit implementation. But at least for a few special cases, namely for writing bits 0..7, 8..15, and 0..15, versions using only a single instruction are feasible. Introducing such limited support improves emulating 16-bit x86 code on x86, but also rarer cases where 32-bit or 64-bit code accesses bytes or words. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 1859faee00..de8a1d5e8f 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -81,6 +81,13 @@ typedef uint64_t TCGRegSet;
#define TCG_TARGET_HAS_deposit_i64 0
#endif
+#ifndef TCG_TARGET_deposit_i32_valid
+#define TCG_TARGET_deposit_i32_valid(ofs, len) 1
+#endif
+#ifndef TCG_TARGET_deposit_i64_valid
+#define TCG_TARGET_deposit_i64_valid(ofs, len) 1
+#endif
+
/* Only one of DIV or DIV2 should be defined. */
#if defined(TCG_TARGET_HAS_div_i32)
#define TCG_TARGET_HAS_div2_i32 0