Skip to content

Commit

Permalink
fix 128 bit type
Browse files Browse the repository at this point in the history
  • Loading branch information
dawa79 committed Oct 24, 2024
1 parent b360f05 commit 5185f6c
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 13 deletions.
62 changes: 49 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,61 @@
name: "Build"
on: [push]
on: [push, pull_request]
jobs:
linux-clang-ASanAndUBSan-build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-20.04]
clang: [8]
steps:
- uses: actions/checkout@v3
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v18
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
extra_nix_config: |
experimental-features = nix-command flakes ca-references
- name: nix build hobbesPackages/clang-${{ matrix.clang }}-ASanAndUBSan/hobbes
run: |
nix build .#hobbesPackages/clang-${{ matrix.clang }}-ASanAndUBSan/hobbes
- name: nix log hobbesPackages/clang-${{ matrix.clang }}-ASanAndUBSan/hobbes
if: ${{ always() }}
run: |
nix log .#hobbesPackages/clang-${{ matrix.clang }}-ASanAndUBSan/hobbes &> ${{ matrix.os }}-clang-${{ matrix.clang }}-ASanAndUBSan-hobbes.log
- name: upload log ${{ matrix.os }}-clang-${{ matrix.clang }}-ASanAndUBSan-hobbes.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: output-log-file
path: ${{ matrix.os }}-clang-${{ matrix.clang }}-ASanAndUBSan-hobbes.log
linux-clang-build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-20.04]
clang: [6, 8, 10, 11]
clang: [6, 8, 10, 11, 12]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v12
- uses: cachix/install-nix-action@v18
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
extra_nix_config: |
experimental-features = nix-command flakes ca-references
- name: nix build hobbesPackages/clang-${{ matrix.clang }}/hobbes
run: |
nix build .#hobbesPackages/clang-${{ matrix.clang }}/hobbes
- name: nix log hobbesPackages/clang-${{ matrix.clang }}/hobbes
if: ${{ always() }}
run: |
nix log .#hobbesPackages/clang-${{ matrix.clang }}/hobbes &> ${{ matrix.os }}-clang-${{ matrix.clang }}-hobbes.log
- name: upload log ${{ matrix.os }}-clang-${{ matrix.clang }}-hobbes.log
uses: actions/upload-artifact@v1
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: output-log-file
path: ${{ matrix.os }}-clang-${{ matrix.clang }}-hobbes.log
Expand All @@ -32,24 +65,27 @@ jobs:
matrix:
os: [ubuntu-20.04]
gcc: [10]
llvm: [6, 8, 10, 11]
llvm: [6, 8, 10, 11, 12]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v12
- uses: cachix/install-nix-action@v18
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
extra_nix_config: |
experimental-features = nix-command flakes ca-references
- name: nix build hobbesPackages/clang-${{ matrix.clang }}/hobbes
- name: nix build hobbesPackages/gcc-${{ matrix.gcc }}/llvm-${{ matrix.llvm }}/hobbes
run: |
nix build .#hobbesPackages/gcc-${{ matrix.gcc }}/llvm-${{ matrix.llvm }}/hobbes
- name: nix log hobbesPackages/gcc-${{ matrix.gcc }}/llvm-${{ matrix.llvm }}/hobbes
if: ${{ always() }}
run: |
nix log .#hobbesPackages/gcc-${{ matrix.gcc }}/llvm-${{ matrix.llvm }}/hobbes &> ${{ matrix.os }}-gcc-${{ matrix.gcc }}-llvm-${{ matrix.llvm }}-hobbes.log
- name: upload log ${{ matrix.os }}-gcc-${{ matrix.gcc }}-llvm-${{ matrix.llvm }}-hobbes.log
uses: actions/upload-artifact@v1
- name: upload log ${{ matrix.os }}-gcc-${{ matrix.gcc }}-llvm-${{ matrix.gitllvm }}-hobbes.log
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: output-log-file
path: ${{ matrix.os }}-gcc-${{ matrix.gcc }}-llvm-${{ matrix.llvm }}-hobbes.log

path: ${{ matrix.os }}-gcc-${{ matrix.gcc }}-llvm-${{ matrix.llvm }}-hobbes.log
9 changes: 9 additions & 0 deletions lib/hobbes/eval/func.C
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ BOP(i16mul, CreateMul, int128_t, int128_t, int128_t);
BOP(i16div, CreateSDiv, int128_t, int128_t, int128_t);
BOP(i16rem, CreateSRem, int128_t, int128_t, int128_t);

BOP(i16shl, CreateShl, int128_t, int128_t, int128_t);
BOP(i16lshr, CreateLShr, int128_t, int128_t, int128_t);
BOP(i16ashr, CreateAShr, int128_t, int128_t, int128_t);
BOP(i16and, CreateAnd, int128_t, int128_t, int128_t);
BOP(i16or, CreateOr, int128_t, int128_t, int128_t);
BOP(i16xor, CreateXor, int128_t, int128_t, int128_t);

BOP(i16eq, CreateICmpEQ, int128_t, int128_t, bool);
BOP(i16neq, CreateICmpNE, int128_t, int128_t, bool);
BOP(i16lt, CreateICmpSLT, int128_t, int128_t, bool);
Expand Down Expand Up @@ -1015,6 +1022,8 @@ void initDefOperators(cc* c) {
DEC(iadd); DEC(isub); DEC(imul); DEC(idiv); DEC(irem);
DEC(ladd); DEC(lsub); DEC(lmul); DEC(ldiv); DEC(lrem);
DEC(i16add); DEC(i16sub); DEC(i16mul); DEC(i16div); DEC(i16rem);
DEC(i16shl); DEC(i16lshr); DEC(i16ashr); DEC(i16and); DEC(i16or);DEC(i16xor);

DEC(fadd); DEC(fsub); DEC(fmul); DEC(fdiv);
DEC(dadd); DEC(dsub); DEC(dmul); DEC(ddiv);

Expand Down

0 comments on commit 5185f6c

Please sign in to comment.