aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.arch/i386-avx.c5
-rw-r--r--gdb/testsuite/gdb.arch/i386-avx.exp11
-rw-r--r--gdb/testsuite/gdb.arch/i386-sse.c5
-rw-r--r--gdb/testsuite/gdb.arch/i386-sse.exp11
4 files changed, 24 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.arch/i386-avx.c b/gdb/testsuite/gdb.arch/i386-avx.c
index 4e93839..765026c 100644
--- a/gdb/testsuite/gdb.arch/i386-avx.c
+++ b/gdb/testsuite/gdb.arch/i386-avx.c
@@ -20,8 +20,11 @@
#include <stdio.h>
#include "nat/x86-cpuid.h"
+/* Align sufficient to be able to use vmovaps. */
+#define ALIGN 32
+
typedef struct {
- float f[8];
+ _Alignas (ALIGN) float f[8];
} v8sf_t;
diff --git a/gdb/testsuite/gdb.arch/i386-avx.exp b/gdb/testsuite/gdb.arch/i386-avx.exp
index 1b61a65..d721b8c 100644
--- a/gdb/testsuite/gdb.arch/i386-avx.exp
+++ b/gdb/testsuite/gdb.arch/i386-avx.exp
@@ -35,12 +35,17 @@ if [get_compiler_info] {
return -1
}
-set additional_flags ""
+set flags { debug }
+
+# C11 for _Alignas, gnu for asm.
+lappend flags additional_flags=-std=gnu11
+
if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
- set additional_flags "additional_flags=-mavx -I${srcdir}/.."
+ lappend flags "additional_flags=-mavx -I${srcdir}/.."
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
+ $flags] != "" } {
unsupported "compiler does not support AVX"
return
}
diff --git a/gdb/testsuite/gdb.arch/i386-sse.c b/gdb/testsuite/gdb.arch/i386-sse.c
index a5941a4..10bd4b6 100644
--- a/gdb/testsuite/gdb.arch/i386-sse.c
+++ b/gdb/testsuite/gdb.arch/i386-sse.c
@@ -20,8 +20,11 @@
#include <stdio.h>
#include "nat/x86-cpuid.h"
+/* Align sufficient to be able to use movaps. */
+#define ALIGN 16
+
typedef struct {
- float f[4];
+ _Alignas (ALIGN) float f[4];
} v4sf_t;
diff --git a/gdb/testsuite/gdb.arch/i386-sse.exp b/gdb/testsuite/gdb.arch/i386-sse.exp
index 1ee3a84..15649e4 100644
--- a/gdb/testsuite/gdb.arch/i386-sse.exp
+++ b/gdb/testsuite/gdb.arch/i386-sse.exp
@@ -30,12 +30,17 @@ if [get_compiler_info] {
return -1
}
-set additional_flags ""
+set flags { debug }
+
+# C11 for _Alignas, gnu for asm.
+lappend flags additional_flags=-std=gnu11
+
if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
- set additional_flags "additional_flags=-msse -I${srcdir}/.."
+ lappend flags "additional_flags=-msse -I${srcdir}/.."
}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug $additional_flags]] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
+ $flags] != "" } {
unsupported "compiler does not support SSE"
return
}