Skip to content

Commit 9995df1

Browse files
committed
tests
1 parent c1d9326 commit 9995df1

29 files changed

Lines changed: 4241 additions & 712 deletions

.github/scripts/config.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -x # echo on
55
set -o pipefail # fail of any command in pipeline is an error
66

77
BINUTILS_BRANCH=${BINUTILS_BRANCH:-woarm64}
8-
GCC_BRANCH=${GCC_BRANCH:-woarm64}
8+
GCC_BRANCH=${GCC_BRANCH:-fix-va-list}
99
MINGW_BRANCH=${MINGW_BRANCH:-woarm64}
1010
CYGWIN_BRANCH=${CYGWIN_BRANCH:-main}
1111
CYGWIN_PACKAGES_BRANCH=${CYGWIN_PACKAGES_BRANCH:-main}
@@ -14,7 +14,7 @@ COCOM_BRANCH=${COCOM_BRANCH:-master}
1414
ARCH=${ARCH:-aarch64}
1515
PLATFORM=${PLATFORM:-w64-mingw32}
1616
if [[ "$PLATFORM" =~ (mingw|cygwin) ]]; then
17-
CRT=${CRT:-msvcrt}
17+
CRT=${CRT:-ucrt}
1818
else
1919
CRT=${CRT:-libc}
2020
fi
@@ -71,11 +71,11 @@ else
7171
GCC_VERSION="15.0.0"
7272
fi
7373

74-
DEBUG=${DEBUG:-0} # Enable debug build.
75-
CCACHE=${CCACHE:-0} # Enable usage of ccache.
76-
RUN_BOOTSTRAP=${RUN_BOOTSTRAP:-0} # Bootstrap dependencies during the build.
77-
UPDATE_SOURCES=${UPDATE_SOURCES:-0} # Update source code repositories.
78-
RESET_SOURCES=${RESET_SOURCES:-0} # Reset source code repositories before update.
74+
DEBUG=${DEBUG:-1} # Enable debug build.
75+
CCACHE=${CCACHE:-1} # Enable usage of ccache.
76+
RUN_BOOTSTRAP=${RUN_BOOTSTRAP:-1} # Bootstrap dependencies during the build.
77+
UPDATE_SOURCES=${UPDATE_SOURCES:-1} # Update source code repositories.
78+
RESET_SOURCES=${RESET_SOURCES:-1} # Reset source code repositories before update.
7979
APPLY_PATCHES=${APPLY_PATCHES:-1} # Patch source repositories for targets requiring it.
8080
RUN_CONFIG=${RUN_CONFIG:-1} # Run configuration step.
8181
RUN_INSTALL=${RUN_INSTALL:-1} # Run installation step.

.github/scripts/toolchain/build-gcc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ if [[ "$RUN_CONFIG" = 1 ]] || [[ ! -f "$GCC_BUILD_PATH/Makefile" ]]; then
104104
--target=$TARGET \
105105
--enable-static \
106106
--enable-shared \
107-
--enable-languages=c,c++,d,fortran,lto,m2,objc,obj-c++ \
107+
--enable-languages=c,lto \
108108
--disable-bootstrap \
109109
--disable-multilib \
110110
--with-gnu-as \

.github/scripts/toolchain/execute-gcc-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ echo "::group::Execute GCC tests"
3535
make $BUILD_MAKE_OPTIONS -k $MAKE_TARGET \
3636
RUNTESTFLAGS="$FILTER $HOST_BOARD $TARGET_BOARD" \
3737
DEJAGNU="$DEJAGNU_FILE" \
38-
CHECK_TEST_FRAMEWORK=1 \
38+
CHECK_TEST_FRAMEWORK=0 \
3939
|| echo "Error"
4040

4141
mkdir -p $TEST_RESULTS_PATH

compare-test-results.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
.github/scripts/toolchain/compare-gcc-results.sh va-list-before va-list-after

execute-valist-tests.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
FILTER="va-*\ *-va-*\ va_*\ *_va_*\ *var_copy*\ *varg*\ *vaarg*\ *vararg*\ *stdar*\ *printf*"
4+
5+
.github/scripts/toolchain/execute-gcc-tests.sh gcc-tests-va-list-after "" "\
6+
aapcs.exp=$FILTER \
7+
aapcs64.exp=$FILTER \
8+
aarch64-sve-pcs.exp=$FILTER \
9+
aarch64.exp=$FILTER \
10+
analyzer.exp=$FILTER \
11+
compile.exp=$FILTER \
12+
dfp.exp=$FILTER \
13+
dg.exp=$FILTER \
14+
fixed-point.exp=$FILTER \
15+
execute.exp=$FILTER \
16+
noncompile.exp=$FILTER \
17+
stackalign.exp=$FILTER \
18+
torture.exp=$FILTER \
19+
tree-prof.exp=$FILTER \
20+
tree-ssa.exp=$FILTER \
21+
vmx.exp=$FILTER \
22+
format.exp"
23+
.github/scripts/toolchain/create-gcc-summary.sh artifact/gcc-tests-va-list-after > artifact/gcc-tests-va-list-after/summary.md
24+
25+
#gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C
26+
#gcc/testsuite/gcc.dg/torture/c23-stdarg-split-1b.c
27+
#gcc/gcc/testsuite/gcc.dg/torture/va-arg-25.c
28+
#gcc/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c

tests/valist/.gitignore

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
*.exe
1+
*.bin
2+
*.cod
23
*.dll
3-
*.o
4-
*.obj
4+
*.exe
55
*.exp
6-
*.lib
6+
*.gimple
77
*.ilk
8+
*.lib
89
*.pdb
9-
*.gimple
10+
*.o
11+
*.obj
12+
*.so
13+
valist-all-*.s

tests/valist/types.h

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
#pragma once
2+
3+
// https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#definitions
4+
struct short_vector_8_bytes
5+
{
6+
int a;
7+
int b;
8+
};
9+
10+
struct short_vector_16_bytes
11+
{
12+
int a;
13+
int b;
14+
int c;
15+
int d;
16+
};
17+
18+
struct hfa_2_floats
19+
{
20+
float a;
21+
float b;
22+
};
23+
24+
struct hfa_4_floats
25+
{
26+
float a;
27+
float b;
28+
float c;
29+
float d;
30+
};
31+
32+
struct hfa_2_doubles
33+
{
34+
double a;
35+
double b;
36+
};
37+
38+
struct hfa_4_doubles
39+
{
40+
double a;
41+
double b;
42+
double c;
43+
double d;
44+
};
45+
46+
struct hva_2_short_vector_8_bytes
47+
{
48+
struct short_vector_8_bytes a;
49+
struct short_vector_8_bytes b;
50+
};
51+
52+
struct hva_4_short_vector_8_bytes
53+
{
54+
struct short_vector_8_bytes a;
55+
struct short_vector_8_bytes b;
56+
struct short_vector_8_bytes c;
57+
struct short_vector_8_bytes d;
58+
};
59+
60+
struct hva_2_short_vector_16_bytes
61+
{
62+
struct short_vector_16_bytes a;
63+
struct short_vector_16_bytes b;
64+
};
65+
66+
struct hva_4_short_vector_16_bytes
67+
{
68+
struct short_vector_16_bytes a;
69+
struct short_vector_16_bytes b;
70+
struct short_vector_16_bytes c;
71+
struct short_vector_16_bytes d;
72+
};
73+
74+
struct composite
75+
{
76+
char a;
77+
int b;
78+
const char *c;
79+
double d;
80+
long e;
81+
float f;
82+
char g;
83+
int h;
84+
const char *i;
85+
double j;
86+
long k;
87+
float l;
88+
};

0 commit comments

Comments
 (0)