summaryrefslogtreecommitdiff
path: root/tcg/arm/tcg-target.h
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2010-04-09 20:52:48 +0200
committerAurelien Jarno <aurelien@aurel32.net>2010-04-19 07:03:02 +0200
commit9517094f720097b51854ef458ffb1971720dddfa (patch)
tree0b9c04e908d799fdc171887f0925fcfe68dcdce7 /tcg/arm/tcg-target.h
parent293579e55c40d78353ecd3e48d67f744ba579c12 (diff)
downloadqemu-9517094f720097b51854ef458ffb1971720dddfa.tar.gz
tcg/arm: add ext16u op
Add an ext16u op, either using the uxth instruction on ARMv6+ or two shifts on previous ARM versions. In both cases the result use the same number or less instructions than the pure TCG version. Also move all sign extension code to separate functions, so that they can be reused in other parts of the code. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/arm/tcg-target.h')
-rw-r--r--tcg/arm/tcg-target.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
index bc08f91fe6..1f6d665673 100644
--- a/tcg/arm/tcg-target.h
+++ b/tcg/arm/tcg-target.h
@@ -60,8 +60,8 @@ enum {
/* optional instructions */
#define TCG_TARGET_HAS_ext8s_i32
#define TCG_TARGET_HAS_ext16s_i32
-// #define TCG_TARGET_HAS_ext8u_i32
-// #define TCG_TARGET_HAS_ext16u_i32
+#undef TCG_TARGET_HAS_ext8u_i32 /* and r0, r1, #0xff */
+#define TCG_TARGET_HAS_ext16u_i32
// #define TCG_TARGET_HAS_bswap16_i32
// #define TCG_TARGET_HAS_bswap32_i32
#define TCG_TARGET_HAS_not_i32