Skip to content

Run libgccjit checks #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ jobs:
make -j4
make install

- name: Test libgccjit
run: |
cd gcc
make check-jit -j4

- name: Build Debian package
run: |
cd ..
cd ../..
mkdir install/DEBIAN
cat > install/DEBIAN/control << EOF
Package: gcc-15
Expand Down
6 changes: 5 additions & 1 deletion contrib/download_prerequisites
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ mpc='mpc-1.2.1.tar.gz'
isl='isl-0.24.tar.bz2'
gettext='gettext-0.22.tar.gz'

base_url='http://gcc.gnu.org/pub/gcc/infrastructure/'
#base_url='http://gcc.gnu.org/pub/gcc/infrastructure/'
# We use rust-lang mirrors because the GCC infrastructure is unreliable.
# When dependencies are changed, we have to modify our mirrors.
# Please contact t-infra for that.
base_url='https://ci-mirrors.rust-lang.org/rustc/gcc/'

echo_archives() {
echo "${gettext}"
Expand Down
2 changes: 2 additions & 0 deletions gcc/config/i386/i386-rust-and-jit.inc
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,5 @@ if (TARGET_CMPXCHG16B)
ADD_TARGET_INFO ("target_feature", "cmpxchg16b");
if (TARGET_MOVBE)
ADD_TARGET_INFO ("target_feature", "movbe");
if (TARGET_80387)
ADD_TARGET_INFO ("target_feature", "x87");
4 changes: 4 additions & 0 deletions gcc/jit/jit-playback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,10 @@ const char* fn_attribute_to_string (gcc_jit_fn_attribute attr)
return "weak";
case GCC_JIT_FN_ATTRIBUTE_NONNULL:
return "nonnull";
case GCC_JIT_FN_ATTRIBUTE_MS_ABI:
return "ms_abi";
case GCC_JIT_FN_ATTRIBUTE_SYSV_ABI:
return "sysv_abi";
case GCC_JIT_FN_ATTRIBUTE_MAX:
return NULL;
}
Expand Down
8 changes: 5 additions & 3 deletions gcc/jit/jit-recording.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2671,19 +2671,19 @@ recording::memento_of_get_type::get_size ()
break;
case GCC_JIT_TYPE_FLOAT:
m = targetm.c.mode_for_floating_type (TI_FLOAT_TYPE);
size = GET_MODE_PRECISION (m).to_constant ();
size = GET_MODE_UNIT_SIZE (m) * BITS_PER_UNIT;
break;
#ifdef HAVE_BFmode
case GCC_JIT_TYPE_BFLOAT16:
return GET_MODE_UNIT_SIZE (BFmode);
#endif
case GCC_JIT_TYPE_DOUBLE:
m = targetm.c.mode_for_floating_type (TI_DOUBLE_TYPE);
size = GET_MODE_PRECISION (m).to_constant ();
size = GET_MODE_UNIT_SIZE (m) * BITS_PER_UNIT;
break;
case GCC_JIT_TYPE_LONG_DOUBLE:
m = targetm.c.mode_for_floating_type (TI_LONG_DOUBLE_TYPE);
size = GET_MODE_PRECISION (m).to_constant ();
size = GET_MODE_UNIT_SIZE (m) * BITS_PER_UNIT;
break;
case GCC_JIT_TYPE_FLOAT16:
size = 16;
Expand Down Expand Up @@ -4954,6 +4954,8 @@ static const char * const fn_attribute_reproducer_strings[] =
"GCC_JIT_FN_ATTRIBUTE_CONST",
"GCC_JIT_FN_ATTRIBUTE_WEAK",
"GCC_JIT_FN_ATTRIBUTE_NONNULL",
"GCC_JIT_FN_ATTRIBUTE_MS_ABI",
"GCC_JIT_FN_ATTRIBUTE_SYSV_ABI",
};

std::string
Expand Down
4 changes: 4 additions & 0 deletions gcc/jit/libgccjit.h
Original file line number Diff line number Diff line change
Expand Up @@ -2169,6 +2169,10 @@ enum gcc_jit_fn_attribute
GCC_JIT_FN_ATTRIBUTE_WEAK,
GCC_JIT_FN_ATTRIBUTE_NONNULL,

// x86 attributes.
GCC_JIT_FN_ATTRIBUTE_MS_ABI,
GCC_JIT_FN_ATTRIBUTE_SYSV_ABI,

/* Maximum value of this enum, should always be last. */
GCC_JIT_FN_ATTRIBUTE_MAX,
};
Expand Down
Loading