Skip to content

Distribute version without 128-bit integers #41

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

Merged
merged 1 commit into from
Feb 16, 2024
Merged
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
12 changes: 10 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,21 @@ jobs:

strategy:
fail-fast: false
matrix:
version:
- { use_patch: true, asset_name: "gcc-13-without-int128.deb" }
- { use_path: false, asset_name: "gcc-13.deb" }

steps:
- uses: actions/checkout@v2

- name: Install mpfr
run: sudo apt-get install gcc-10 libmpfr-dev libmpc-dev

- name: Apply patch to disable 128-bit integers
if: matrix.version.use_patch
run: git apply patches/0001-Disable-128-bit-integers-for-testing-purposes.patch

- name: Build libgccjit
run: |
cd ..
Expand Down Expand Up @@ -59,7 +67,7 @@ jobs:
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}

- name: Create release
if: github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master' && !matrix.version.use_patch
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -73,5 +81,5 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/gcc/gcc-13.deb
asset_name: gcc-13.deb
asset_name: ${{ matrix.version.asset_name }}
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}
52 changes: 52 additions & 0 deletions patches/0001-Disable-128-bit-integers-for-testing-purposes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
From f8f19b4749ef849c814cb24c104e53c991488310 Mon Sep 17 00:00:00 2001
From: Antoni Boucher <bouanto@zoho.com>
Date: Fri, 16 Feb 2024 12:04:40 -0500
Subject: [PATCH] Disable 128-bit integers for testing purposes

---
gcc/config/i386/i386-jit.cc | 2 +-
gcc/jit/jit-playback.cc | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/config/i386/i386-jit.cc b/gcc/config/i386/i386-jit.cc
index 49e54aa7990..67c50bdc6dd 100644
--- a/gcc/config/i386/i386-jit.cc
+++ b/gcc/config/i386/i386-jit.cc
@@ -68,7 +68,7 @@ ix86_jit_register_target_info (void)
std::string cpu = arch.substr (arg_pos, end_pos - arg_pos);
jit_target_set_arch (cpu);

- jit_target_set_128bit_int_support (targetm.scalar_mode_supported_p (TImode));
+ //jit_target_set_128bit_int_support (targetm.scalar_mode_supported_p (TImode));

if (TARGET_MMX)
jit_add_target_info ("target_feature", "mmx");
diff --git a/gcc/jit/jit-playback.cc b/gcc/jit/jit-playback.cc
index 6b0522d6f88..73efa6b5bc0 100644
--- a/gcc/jit/jit-playback.cc
+++ b/gcc/jit/jit-playback.cc
@@ -249,8 +249,8 @@ get_tree_node_for_type (enum gcc_jit_types type_)
case GCC_JIT_TYPE_UINT64_T:
return uint64_type_node;
case GCC_JIT_TYPE_UINT128_T:
- if (targetm.scalar_mode_supported_p (TImode))
- return uint128_type_node;
+ /*if (targetm.scalar_mode_supported_p (TImode))
+ return uint128_type_node;*/

add_error (NULL, "gcc_jit_types value unsupported on this target: %i",
type_);
@@ -265,8 +265,8 @@ get_tree_node_for_type (enum gcc_jit_types type_)
case GCC_JIT_TYPE_INT64_T:
return intDI_type_node;
case GCC_JIT_TYPE_INT128_T:
- if (targetm.scalar_mode_supported_p (TImode))
- return intTI_type_node;
+ /*if (targetm.scalar_mode_supported_p (TImode))
+ return intTI_type_node;*/

add_error (NULL, "gcc_jit_types value unsupported on this target: %i",
type_);
--
2.43.0