Skip to content

Commit

Permalink
Distribute version without 128-bit integers
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Feb 16, 2024
1 parent 7e92827 commit cdd8978
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 2 deletions.
13 changes: 11 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 @@ -52,14 +60,15 @@ jobs:
- name: Create tag
if: github.ref == 'refs/heads/master'
continue-on-error: true
uses: laputansoft/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create_annotated_tag: true
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 +82,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 <[email protected]>
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

0 comments on commit cdd8978

Please sign in to comment.