aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.reverse/i386-avx-reverse.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.reverse/i386-avx-reverse.c')
-rw-r--r--gdb/testsuite/gdb.reverse/i386-avx-reverse.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.reverse/i386-avx-reverse.c b/gdb/testsuite/gdb.reverse/i386-avx-reverse.c
index 8156575..f559d69 100644
--- a/gdb/testsuite/gdb.reverse/i386-avx-reverse.c
+++ b/gdb/testsuite/gdb.reverse/i386-avx-reverse.c
@@ -1,6 +1,6 @@
/* This testcase is part of GDB, the GNU debugger.
- Copyright 2023 Free Software Foundation, Inc.
+ Copyright 2023-2025 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -419,6 +419,37 @@ arith_test ()
return 0; /* end arith_test */
}
+int
+vaddsubpd_test ()
+{
+ /* start vaddsubpd_test */
+ /* YMM test. */
+ asm volatile ("vaddsubpd %ymm15,%ymm1,%ymm0");
+ asm volatile ("vaddsubpd %ymm0,%ymm1,%ymm15");
+ asm volatile ("vaddsubpd %ymm2,%ymm3,%ymm4");
+
+ /* XMM test. */
+ asm volatile ("vaddsubpd %xmm15,%xmm1,%xmm2");
+ asm volatile ("vaddsubpd %xmm0,%xmm1,%xmm10");
+ return 0; /* end vaddsubpd_test */
+}
+
+int
+vaddsubps_test ()
+{
+ /* start vaddsubps_test */
+ /* YMM test. */
+ asm volatile ("vaddsubps %ymm15,%ymm1,%ymm2");
+ asm volatile ("vaddsubps %ymm0,%ymm1,%ymm10");
+ asm volatile ("vaddsubps %ymm2,%ymm3,%ymm4");
+
+ /* XMM test. */
+ asm volatile ("vaddsubps %xmm0,%xmm1,%xmm15");
+ asm volatile ("vaddsubps %xmm15,%xmm1,%xmm0");
+ return 0; /* end vaddsubps_test */
+}
+
+
/* This include is used to allocate the dynamic buffer and have
the pointers aligned to a 32-bit boundary, so we can test instructions
that require aligned memory. */
@@ -449,5 +480,7 @@ main ()
vpcmpeq_test ();
vpmovmskb_test ();
arith_test ();
+ vaddsubpd_test ();
+ vaddsubps_test ();
return 0; /* end of main */
}