aboutsummaryrefslogtreecommitdiff
path: root/tcg/ppc/tcg-target.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2023-08-05 01:55:23 +0000
committerRichard Henderson <richard.henderson@linaro.org>2023-08-24 11:22:42 -0700
commitcba10bb3c8875f428821608f9dfb860a97a63aa1 (patch)
tree29f577d8748cda82cb5297d14d76de05cc26b684 /tcg/ppc/tcg-target.h
parentb0a433be48c120fdc2be676216a240a316f3613e (diff)
downloadqemu-cba10bb3c8875f428821608f9dfb860a97a63aa1.zip
qemu-cba10bb3c8875f428821608f9dfb860a97a63aa1.tar.gz
qemu-cba10bb3c8875f428821608f9dfb860a97a63aa1.tar.bz2
tcg/ppc: Implement negsetcond_*
In the general case we simply negate. However with isel we may load -1 instead of 1 with no extra effort. Consolidate EQ0 and NE0 logic. Replace the NE0 zero-extension with inversion+negation of EQ0, which is never worse and may eliminate one insn. Provide a special case for -EQ0. Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/ppc/tcg-target.h')
-rw-r--r--tcg/ppc/tcg-target.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h
index a2ca0b4..8bfb149 100644
--- a/tcg/ppc/tcg-target.h
+++ b/tcg/ppc/tcg-target.h
@@ -97,7 +97,7 @@ typedef enum {
#define TCG_TARGET_HAS_sextract_i32 0
#define TCG_TARGET_HAS_extract2_i32 0
#define TCG_TARGET_HAS_movcond_i32 1
-#define TCG_TARGET_HAS_negsetcond_i32 0
+#define TCG_TARGET_HAS_negsetcond_i32 1
#define TCG_TARGET_HAS_mulu2_i32 0
#define TCG_TARGET_HAS_muls2_i32 0
#define TCG_TARGET_HAS_muluh_i32 1
@@ -135,7 +135,7 @@ typedef enum {
#define TCG_TARGET_HAS_sextract_i64 0
#define TCG_TARGET_HAS_extract2_i64 0
#define TCG_TARGET_HAS_movcond_i64 1
-#define TCG_TARGET_HAS_negsetcond_i64 0
+#define TCG_TARGET_HAS_negsetcond_i64 1
#define TCG_TARGET_HAS_add2_i64 1
#define TCG_TARGET_HAS_sub2_i64 1
#define TCG_TARGET_HAS_mulu2_i64 0