diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 058eb16400029..4cd42efe5a69c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites index b83fcc9db5dde..ce7efe1d1edc9 100755 --- a/contrib/download_prerequisites +++ b/contrib/download_prerequisites @@ -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}" diff --git a/gcc/config/i386/i386-rust-and-jit.inc b/gcc/config/i386/i386-rust-and-jit.inc index 998f44cfa3f52..0a701a0ba179e 100644 --- a/gcc/config/i386/i386-rust-and-jit.inc +++ b/gcc/config/i386/i386-rust-and-jit.inc @@ -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"); diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc index 347f9f9a78278..6901c24b14ddf 100644 --- a/gcc/jit/jit-playback.cc +++ b/gcc/jit/jit-playback.cc @@ -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; } diff --git a/gcc/jit/jit-recording.cc b/gcc/jit/jit-recording.cc index 4ac5d6b602f0a..b842d901c2eaf 100644 --- a/gcc/jit/jit-recording.cc +++ b/gcc/jit/jit-recording.cc @@ -2671,7 +2671,7 @@ 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: @@ -2679,11 +2679,11 @@ recording::memento_of_get_type::get_size () #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; @@ -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 diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 9ecd201c4d0cd..17bd85f920f2d 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -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, };