Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhex committed Nov 18, 2024
1 parent c1d9326 commit 9995df1
Show file tree
Hide file tree
Showing 29 changed files with 4,241 additions and 712 deletions.
14 changes: 7 additions & 7 deletions .github/scripts/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -x # echo on
set -o pipefail # fail of any command in pipeline is an error

BINUTILS_BRANCH=${BINUTILS_BRANCH:-woarm64}
GCC_BRANCH=${GCC_BRANCH:-woarm64}
GCC_BRANCH=${GCC_BRANCH:-fix-va-list}
MINGW_BRANCH=${MINGW_BRANCH:-woarm64}
CYGWIN_BRANCH=${CYGWIN_BRANCH:-main}
CYGWIN_PACKAGES_BRANCH=${CYGWIN_PACKAGES_BRANCH:-main}
Expand All @@ -14,7 +14,7 @@ COCOM_BRANCH=${COCOM_BRANCH:-master}
ARCH=${ARCH:-aarch64}
PLATFORM=${PLATFORM:-w64-mingw32}
if [[ "$PLATFORM" =~ (mingw|cygwin) ]]; then
CRT=${CRT:-msvcrt}
CRT=${CRT:-ucrt}
else
CRT=${CRT:-libc}
fi
Expand Down Expand Up @@ -71,11 +71,11 @@ else
GCC_VERSION="15.0.0"
fi

DEBUG=${DEBUG:-0} # Enable debug build.
CCACHE=${CCACHE:-0} # Enable usage of ccache.
RUN_BOOTSTRAP=${RUN_BOOTSTRAP:-0} # Bootstrap dependencies during the build.
UPDATE_SOURCES=${UPDATE_SOURCES:-0} # Update source code repositories.
RESET_SOURCES=${RESET_SOURCES:-0} # Reset source code repositories before update.
DEBUG=${DEBUG:-1} # Enable debug build.
CCACHE=${CCACHE:-1} # Enable usage of ccache.
RUN_BOOTSTRAP=${RUN_BOOTSTRAP:-1} # Bootstrap dependencies during the build.
UPDATE_SOURCES=${UPDATE_SOURCES:-1} # Update source code repositories.
RESET_SOURCES=${RESET_SOURCES:-1} # Reset source code repositories before update.
APPLY_PATCHES=${APPLY_PATCHES:-1} # Patch source repositories for targets requiring it.
RUN_CONFIG=${RUN_CONFIG:-1} # Run configuration step.
RUN_INSTALL=${RUN_INSTALL:-1} # Run installation step.
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/toolchain/build-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if [[ "$RUN_CONFIG" = 1 ]] || [[ ! -f "$GCC_BUILD_PATH/Makefile" ]]; then
--target=$TARGET \
--enable-static \
--enable-shared \
--enable-languages=c,c++,d,fortran,lto,m2,objc,obj-c++ \
--enable-languages=c,lto \
--disable-bootstrap \
--disable-multilib \
--with-gnu-as \
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/toolchain/execute-gcc-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ echo "::group::Execute GCC tests"
make $BUILD_MAKE_OPTIONS -k $MAKE_TARGET \
RUNTESTFLAGS="$FILTER $HOST_BOARD $TARGET_BOARD" \
DEJAGNU="$DEJAGNU_FILE" \
CHECK_TEST_FRAMEWORK=1 \
CHECK_TEST_FRAMEWORK=0 \
|| echo "Error"

mkdir -p $TEST_RESULTS_PATH
Expand Down
3 changes: 3 additions & 0 deletions compare-test-results.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

.github/scripts/toolchain/compare-gcc-results.sh va-list-before va-list-after
28 changes: 28 additions & 0 deletions execute-valist-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

FILTER="va-*\ *-va-*\ va_*\ *_va_*\ *var_copy*\ *varg*\ *vaarg*\ *vararg*\ *stdar*\ *printf*"

.github/scripts/toolchain/execute-gcc-tests.sh gcc-tests-va-list-after "" "\
aapcs.exp=$FILTER \
aapcs64.exp=$FILTER \
aarch64-sve-pcs.exp=$FILTER \
aarch64.exp=$FILTER \
analyzer.exp=$FILTER \
compile.exp=$FILTER \
dfp.exp=$FILTER \
dg.exp=$FILTER \
fixed-point.exp=$FILTER \
execute.exp=$FILTER \
noncompile.exp=$FILTER \
stackalign.exp=$FILTER \
torture.exp=$FILTER \
tree-prof.exp=$FILTER \
tree-ssa.exp=$FILTER \
vmx.exp=$FILTER \
format.exp"
.github/scripts/toolchain/create-gcc-summary.sh artifact/gcc-tests-va-list-after > artifact/gcc-tests-va-list-after/summary.md

#gcc/testsuite/g++.dg/torture/stackalign/eh-vararg-1.C
#gcc/testsuite/gcc.dg/torture/c23-stdarg-split-1b.c
#gcc/gcc/testsuite/gcc.dg/torture/va-arg-25.c
#gcc/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c
14 changes: 9 additions & 5 deletions tests/valist/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
*.exe
*.bin
*.cod
*.dll
*.o
*.obj
*.exe
*.exp
*.lib
*.gimple
*.ilk
*.lib
*.pdb
*.gimple
*.o
*.obj
*.so
valist-all-*.s
88 changes: 88 additions & 0 deletions tests/valist/types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#pragma once

// https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=msvc-170#definitions
struct short_vector_8_bytes
{
int a;
int b;
};

struct short_vector_16_bytes
{
int a;
int b;
int c;
int d;
};

struct hfa_2_floats
{
float a;
float b;
};

struct hfa_4_floats
{
float a;
float b;
float c;
float d;
};

struct hfa_2_doubles
{
double a;
double b;
};

struct hfa_4_doubles
{
double a;
double b;
double c;
double d;
};

struct hva_2_short_vector_8_bytes
{
struct short_vector_8_bytes a;
struct short_vector_8_bytes b;
};

struct hva_4_short_vector_8_bytes
{
struct short_vector_8_bytes a;
struct short_vector_8_bytes b;
struct short_vector_8_bytes c;
struct short_vector_8_bytes d;
};

struct hva_2_short_vector_16_bytes
{
struct short_vector_16_bytes a;
struct short_vector_16_bytes b;
};

struct hva_4_short_vector_16_bytes
{
struct short_vector_16_bytes a;
struct short_vector_16_bytes b;
struct short_vector_16_bytes c;
struct short_vector_16_bytes d;
};

struct composite
{
char a;
int b;
const char *c;
double d;
long e;
float f;
char g;
int h;
const char *i;
double j;
long k;
float l;
};
Loading

0 comments on commit 9995df1

Please sign in to comment.