1 # Copyright
2012-2024 Free Software Foundation
, Inc.
3 # This
program is free software
; you can redistribute it and
/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation
; either version
3 of the License
, or
6 #
(at your option
) any later version.
8 # This
program is distributed in the hope that it will be useful
,
9 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License
for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this
program.
If not
, see
<http
://www.gnu.org
/licenses
/>.
16 require is_x86_like_target
18 set testfile
"i386-sse-stack-align"
19 set srcfile $
{testfile
}.S
20 set csrcfile $
{testfile
}.c
21 set executable $
{testfile
}
22 set binfile
[standard_output_file $
{executable
}]
25 if [info exists COMPILE] {
26 set srcfile $
{csrcfile
}
27 lappend opts debug optimize
=-O2 additional_flags
=-msse
30 if { [gdb_compile
"${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
31 unsupported
"failed to compile"
35 clean_restart $executable
42 foreach i
{0 1 2 3 4} {
43 set test
"print (int) test_g$i ($args)"
44 gdb_test_multiple $test $test
{
45 -re
" = 2\r\n$gdb_prompt $" {
48 -re
"Program received signal SIGSEGV, Segmentation fault\\..*\r\n$gdb_prompt $" {
56 set args "$args[expr $i + 1]"