-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from Decompollaborate/develop
1.5.0: Rust bindings
- Loading branch information
Showing
91 changed files
with
8,312 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build and upload Rust crate | ||
|
||
# Build on every branch push, tag push, and pull request change: | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_rust: | ||
name: Build rust stuff | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout reposistory | ||
uses: actions/checkout@v3 | ||
|
||
- name: Build C library | ||
run: make -j $(nproc) WERROR=1 | ||
|
||
- name: Run logic checks | ||
run: ./tests/c/logic_checks/run_logic_checks.sh | ||
|
||
- name: Setup Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Build Rust bindings | ||
run: cd rust && cargo build --release | ||
|
||
- name: Upload crate | ||
uses: katyo/publish-crates@v1 | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
with: | ||
path: './rust' | ||
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
cplusplus/include/instructions/AccessType_enum_class.table.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
/* Automatically generated. DO NOT MODIFY */ | ||
|
||
#ifndef AccessType_enum_class_table_h_automatic | ||
#define AccessType_enum_class_table_h_automatic | ||
|
||
enum class AccessType { | ||
INVALID, | ||
BYTE, | ||
SHORT, | ||
WORD, | ||
DOUBLEWORD, | ||
FLOAT, | ||
DOUBLEFLOAT, | ||
MAX, | ||
}; | ||
|
||
#endif |
12 changes: 12 additions & 0 deletions
12
cplusplus/include/instructions/AccessType_enum_class.table.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
#define RAB_DEF_ACCESSTYPE(name) name, | ||
|
||
enum class AccessType { | ||
#include "instructions/AccessType.inc" | ||
|
||
RAB_DEF_ACCESSTYPE(MAX) | ||
}; | ||
|
||
#undef RAB_DEF_ACCESSTYPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
cplusplus/include/instructions/OperandType_enum_class.table.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
/* Automatically generated. DO NOT MODIFY */ | ||
|
||
#ifndef OperandType_enum_class_table_h_automatic | ||
#define OperandType_enum_class_table_h_automatic | ||
|
||
enum class OperandType { | ||
ALL_INVALID, | ||
cpu_rs, | ||
cpu_rt, | ||
cpu_rd, | ||
cpu_sa, | ||
cpu_zero, | ||
cpu_cop0d, | ||
cpu_fs, | ||
cpu_ft, | ||
cpu_fd, | ||
cpu_cop1cs, | ||
cpu_cop2t, | ||
cpu_op, | ||
cpu_code, | ||
cpu_code_lower, | ||
cpu_copraw, | ||
cpu_label, | ||
cpu_immediate, | ||
cpu_branch_target_label, | ||
cpu_immediate_base, | ||
rsp_rs, | ||
rsp_rt, | ||
rsp_rd, | ||
rsp_cop0d, | ||
rsp_cop2t, | ||
rsp_cop2cd, | ||
rsp_vs, | ||
rsp_vt, | ||
rsp_vd, | ||
rsp_vt_elementhigh, | ||
rsp_vt_elementlow, | ||
rsp_vd_de, | ||
rsp_vs_index, | ||
rsp_offset_rs, | ||
rsp_immediate_base, | ||
r5900_I, | ||
r5900_Q, | ||
r5900_R, | ||
r5900_ACC, | ||
r5900_ACCxyzw, | ||
r5900_vfs, | ||
r5900_vft, | ||
r5900_vfd, | ||
r5900_vfsxyzw, | ||
r5900_vftxyzw, | ||
r5900_vfdxyzw, | ||
r5900_vfsn, | ||
r5900_vftn, | ||
r5900_vfdn, | ||
r5900_vfsl, | ||
r5900_vftl, | ||
r5900_vfdl, | ||
r5900_vfsm, | ||
r5900_vftm, | ||
r5900_vfdm, | ||
r5900_vis, | ||
r5900_vit, | ||
r5900_vid, | ||
r5900_vis_predecr, | ||
r5900_vit_predecr, | ||
r5900_vid_predecr, | ||
r5900_vis_postincr, | ||
r5900_vit_postincr, | ||
r5900_vid_postincr, | ||
r5900_immediate5, | ||
ALL_MAX, | ||
}; | ||
|
||
#endif |
17 changes: 17 additions & 0 deletions
17
cplusplus/include/instructions/OperandType_enum_class.table.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* SPDX-FileCopyrightText: © 2022 Decompollaborate */ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
#define RAB_DEF_OPERAND(prefix, operand) \ | ||
prefix##_##operand, | ||
|
||
enum class OperandType { | ||
RAB_DEF_OPERAND(ALL, INVALID) | ||
|
||
#include "instructions/operands/RabbitizerOperandType_cpu.inc" | ||
#include "instructions/operands/RabbitizerOperandType_rsp.inc" | ||
#include "instructions/operands/RabbitizerOperandType_r5900.inc" | ||
|
||
RAB_DEF_OPERAND(ALL, MAX) | ||
}; | ||
|
||
#undef RAB_DEF_OPERAND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.