[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/27] tests/tcg: cover lzcnt/tzcnt/popcnt
From: |
Paolo Bonzini |
Subject: |
[PULL 06/27] tests/tcg: cover lzcnt/tzcnt/popcnt |
Date: |
Sun, 12 May 2024 12:49:24 +0200 |
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tests/tcg/i386/test-i386.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index 864c4e620d5..ce3bf74b5a8 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -715,6 +715,30 @@ void test_mul(void)
printf("%-10s A=" FMTLX " R=" FMTLX " %ld\n", #op, val, res, resz);\
}
+void test_xcnt(void)
+{
+ TEST_BSX(tzcntw, "w", 0);
+ TEST_BSX(tzcntw, "w", 0x12340128);
+ TEST_BSX(lzcntw, "w", 0);
+ TEST_BSX(lzcntw, "w", 0x12340128);
+ TEST_BSX(popcntw, "w", 0);
+ TEST_BSX(popcntw, "w", 0x12340128);
+ TEST_BSX(tzcntl, "k", 0);
+ TEST_BSX(tzcntl, "k", 0x00340128);
+ TEST_BSX(lzcntl, "k", 0);
+ TEST_BSX(lzcntl, "k", 0x00340128);
+ TEST_BSX(popcntl, "k", 0);
+ TEST_BSX(popcntl, "k", 0x00340128);
+#if defined(__x86_64__)
+ TEST_BSX(tzcntq, "", 0);
+ TEST_BSX(tzcntq, "", 0x003401281234);
+ TEST_BSX(lzcntq, "", 0);
+ TEST_BSX(lzcntq, "", 0x003401281234);
+ TEST_BSX(popcntq, "", 0);
+ TEST_BSX(popcntq, "", 0x003401281234);
+#endif
+}
+
void test_bsx(void)
{
TEST_BSX(bsrw, "w", 0);
@@ -2162,6 +2186,7 @@ int main(int argc, char **argv)
func();
}
test_bsx();
+ test_xcnt();
test_mul();
test_jcc();
test_loop();
--
2.45.0
- [PULL 00/27] Build/arch cleanups, target/i386 fixes for 2024-05-10, Paolo Bonzini, 2024/05/12
- [PULL 02/27] target/i386: fix operand size for DATA16 REX.W POPCNT, Paolo Bonzini, 2024/05/12
- [PULL 04/27] target/i386: move prefetch and multi-byte UD/NOP to new decoder, Paolo Bonzini, 2024/05/12
- [PULL 05/27] target/i386: fix feature dependency for WAITPKG, Paolo Bonzini, 2024/05/12
- [PULL 06/27] tests/tcg: cover lzcnt/tzcnt/popcnt,
Paolo Bonzini <=
- [PULL 03/27] target/i386: rdpkru/wrpkru are no-prefix instructions, Paolo Bonzini, 2024/05/12
- [PULL 09/27] s390x: move s390_cpu_addr2state to target/s390x/sigp.c, Paolo Bonzini, 2024/05/12
- [PULL 07/27] configure: quote -D options that are passed through to meson, Paolo Bonzini, 2024/05/12
- [PULL 10/27] s390_flic: add migration-enabled property, Paolo Bonzini, 2024/05/12
- [PULL 11/27] s390: move css_migration_enabled from machine to css.c, Paolo Bonzini, 2024/05/12
- [PULL 12/27] s390x: select correct components for no-board build, Paolo Bonzini, 2024/05/12
- [PULL 14/27] xen: initialize legacy backends from xen_bus_init(), Paolo Bonzini, 2024/05/12
- [PULL 15/27] xen: register legacy backends via xen_backend_init, Paolo Bonzini, 2024/05/12
- [PULL 13/27] tests/qtest: s390x: fix operation in a build without any boards or devices, Paolo Bonzini, 2024/05/12
- [PULL 19/27] hw/i386: move rtc-reset-reinjection command out of hw/rtc, Paolo Bonzini, 2024/05/12