From acf15a3852077a4db3ba75a62dbfc65b46508f48 Mon Sep 17 00:00:00 2001 From: angie Date: Mon, 18 Mar 2024 10:12:34 -0300 Subject: [PATCH 1/3] Always use named registers for R5900's VU instructions --- CHANGELOG.md | 4 ++ include/generated/Registers_Names_arrays.h | 64 +++++++++---------- .../registers/RabbitizerRegister_R5900VI.inc | 64 +++++++++---------- 3 files changed, 68 insertions(+), 64 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 755c8d34..f5456c63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Always use named registers for R5900's VU instructions. + ## [1.9.3] - 2024-03-17 ### Fixed diff --git a/include/generated/Registers_Names_arrays.h b/include/generated/Registers_Names_arrays.h index cf47c460..5eba8f1f 100644 --- a/include/generated/Registers_Names_arrays.h +++ b/include/generated/Registers_Names_arrays.h @@ -467,38 +467,38 @@ const char *RabbitizerRegister_R5900VF_Names[][2] = { [RABBITIZER_REG_R5900_VF_vf31] = { "$" "vf31", "$" "vf31" }, }; const char *RabbitizerRegister_R5900VI_Names[][2] = { - [RABBITIZER_REG_R5900_VI_vi0] = { "$" "0", "$" "vi0" }, - [RABBITIZER_REG_R5900_VI_vi1] = { "$" "1", "$" "vi1" }, - [RABBITIZER_REG_R5900_VI_vi2] = { "$" "2", "$" "vi2" }, - [RABBITIZER_REG_R5900_VI_vi3] = { "$" "3", "$" "vi3" }, - [RABBITIZER_REG_R5900_VI_vi4] = { "$" "4", "$" "vi4" }, - [RABBITIZER_REG_R5900_VI_vi5] = { "$" "5", "$" "vi5" }, - [RABBITIZER_REG_R5900_VI_vi6] = { "$" "6", "$" "vi6" }, - [RABBITIZER_REG_R5900_VI_vi7] = { "$" "7", "$" "vi7" }, - [RABBITIZER_REG_R5900_VI_vi8] = { "$" "8", "$" "vi8" }, - [RABBITIZER_REG_R5900_VI_vi9] = { "$" "9", "$" "vi9" }, - [RABBITIZER_REG_R5900_VI_vi10] = { "$" "10", "$" "vi10" }, - [RABBITIZER_REG_R5900_VI_vi11] = { "$" "11", "$" "vi11" }, - [RABBITIZER_REG_R5900_VI_vi12] = { "$" "12", "$" "vi12" }, - [RABBITIZER_REG_R5900_VI_vi13] = { "$" "13", "$" "vi13" }, - [RABBITIZER_REG_R5900_VI_vi14] = { "$" "14", "$" "vi14" }, - [RABBITIZER_REG_R5900_VI_vi15] = { "$" "15", "$" "vi15" }, - [RABBITIZER_REG_R5900_VI_vi16] = { "$" "16", "$" "vi16" }, - [RABBITIZER_REG_R5900_VI_vi17] = { "$" "17", "$" "vi17" }, - [RABBITIZER_REG_R5900_VI_vi18] = { "$" "18", "$" "vi18" }, - [RABBITIZER_REG_R5900_VI_vi19] = { "$" "19", "$" "vi19" }, - [RABBITIZER_REG_R5900_VI_vi20] = { "$" "20", "$" "vi20" }, - [RABBITIZER_REG_R5900_VI_vi21] = { "$" "21", "$" "vi21" }, - [RABBITIZER_REG_R5900_VI_vi22] = { "$" "22", "$" "vi22" }, - [RABBITIZER_REG_R5900_VI_vi23] = { "$" "23", "$" "vi23" }, - [RABBITIZER_REG_R5900_VI_vi24] = { "$" "24", "$" "vi24" }, - [RABBITIZER_REG_R5900_VI_vi25] = { "$" "25", "$" "vi25" }, - [RABBITIZER_REG_R5900_VI_vi26] = { "$" "26", "$" "vi26" }, - [RABBITIZER_REG_R5900_VI_vi27] = { "$" "27", "$" "vi27" }, - [RABBITIZER_REG_R5900_VI_vi28] = { "$" "28", "$" "vi28" }, - [RABBITIZER_REG_R5900_VI_vi29] = { "$" "29", "$" "vi29" }, - [RABBITIZER_REG_R5900_VI_vi30] = { "$" "30", "$" "vi30" }, - [RABBITIZER_REG_R5900_VI_vi31] = { "$" "31", "$" "vi31" }, + [RABBITIZER_REG_R5900_VI_vi0] = { "$" "vi0", "$" "vi0" }, + [RABBITIZER_REG_R5900_VI_vi1] = { "$" "vi1", "$" "vi1" }, + [RABBITIZER_REG_R5900_VI_vi2] = { "$" "vi2", "$" "vi2" }, + [RABBITIZER_REG_R5900_VI_vi3] = { "$" "vi3", "$" "vi3" }, + [RABBITIZER_REG_R5900_VI_vi4] = { "$" "vi4", "$" "vi4" }, + [RABBITIZER_REG_R5900_VI_vi5] = { "$" "vi5", "$" "vi5" }, + [RABBITIZER_REG_R5900_VI_vi6] = { "$" "vi6", "$" "vi6" }, + [RABBITIZER_REG_R5900_VI_vi7] = { "$" "vi7", "$" "vi7" }, + [RABBITIZER_REG_R5900_VI_vi8] = { "$" "vi8", "$" "vi8" }, + [RABBITIZER_REG_R5900_VI_vi9] = { "$" "vi9", "$" "vi9" }, + [RABBITIZER_REG_R5900_VI_vi10] = { "$" "vi10", "$" "vi10" }, + [RABBITIZER_REG_R5900_VI_vi11] = { "$" "vi11", "$" "vi11" }, + [RABBITIZER_REG_R5900_VI_vi12] = { "$" "vi12", "$" "vi12" }, + [RABBITIZER_REG_R5900_VI_vi13] = { "$" "vi13", "$" "vi13" }, + [RABBITIZER_REG_R5900_VI_vi14] = { "$" "vi14", "$" "vi14" }, + [RABBITIZER_REG_R5900_VI_vi15] = { "$" "vi15", "$" "vi15" }, + [RABBITIZER_REG_R5900_VI_vi16] = { "$" "vi16", "$" "vi16" }, + [RABBITIZER_REG_R5900_VI_vi17] = { "$" "vi17", "$" "vi17" }, + [RABBITIZER_REG_R5900_VI_vi18] = { "$" "vi18", "$" "vi18" }, + [RABBITIZER_REG_R5900_VI_vi19] = { "$" "vi19", "$" "vi19" }, + [RABBITIZER_REG_R5900_VI_vi20] = { "$" "vi20", "$" "vi20" }, + [RABBITIZER_REG_R5900_VI_vi21] = { "$" "vi21", "$" "vi21" }, + [RABBITIZER_REG_R5900_VI_vi22] = { "$" "vi22", "$" "vi22" }, + [RABBITIZER_REG_R5900_VI_vi23] = { "$" "vi23", "$" "vi23" }, + [RABBITIZER_REG_R5900_VI_vi24] = { "$" "vi24", "$" "vi24" }, + [RABBITIZER_REG_R5900_VI_vi25] = { "$" "vi25", "$" "vi25" }, + [RABBITIZER_REG_R5900_VI_vi26] = { "$" "vi26", "$" "vi26" }, + [RABBITIZER_REG_R5900_VI_vi27] = { "$" "vi27", "$" "vi27" }, + [RABBITIZER_REG_R5900_VI_vi28] = { "$" "vi28", "$" "vi28" }, + [RABBITIZER_REG_R5900_VI_vi29] = { "$" "vi29", "$" "vi29" }, + [RABBITIZER_REG_R5900_VI_vi30] = { "$" "vi30", "$" "vi30" }, + [RABBITIZER_REG_R5900_VI_vi31] = { "$" "vi31", "$" "vi31" }, }; #endif diff --git a/tables/tables/registers/RabbitizerRegister_R5900VI.inc b/tables/tables/registers/RabbitizerRegister_R5900VI.inc index e81acac8..fde4caff 100644 --- a/tables/tables/registers/RabbitizerRegister_R5900VI.inc +++ b/tables/tables/registers/RabbitizerRegister_R5900VI.inc @@ -2,130 +2,130 @@ /* SPDX-License-Identifier: MIT */ RABBITIZER_DEF_REG( - R5900_VI, vi0, 0, + R5900_VI, vi0, vi0, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi1, 1, + R5900_VI, vi1, vi1, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi2, 2, + R5900_VI, vi2, vi2, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi3, 3, + R5900_VI, vi3, vi3, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi4, 4, + R5900_VI, vi4, vi4, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi5, 5, + R5900_VI, vi5, vi5, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi6, 6, + R5900_VI, vi6, vi6, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi7, 7, + R5900_VI, vi7, vi7, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi8, 8, + R5900_VI, vi8, vi8, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi9, 9, + R5900_VI, vi9, vi9, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi10, 10, + R5900_VI, vi10, vi10, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi11, 11, + R5900_VI, vi11, vi11, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi12, 12, + R5900_VI, vi12, vi12, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi13, 13, + R5900_VI, vi13, vi13, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi14, 14, + R5900_VI, vi14, vi14, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi15, 15, + R5900_VI, vi15, vi15, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi16, 16, + R5900_VI, vi16, vi16, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi17, 17, + R5900_VI, vi17, vi17, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi18, 18, + R5900_VI, vi18, vi18, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi19, 19, + R5900_VI, vi19, vi19, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi20, 20, + R5900_VI, vi20, vi20, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi21, 21, + R5900_VI, vi21, vi21, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi22, 22, + R5900_VI, vi22, vi22, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi23, 23, + R5900_VI, vi23, vi23, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi24, 24, + R5900_VI, vi24, vi24, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi25, 25, + R5900_VI, vi25, vi25, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi26, 26, + R5900_VI, vi26, vi26, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi27, 27, + R5900_VI, vi27, vi27, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi28, 28, + R5900_VI, vi28, vi28, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi29, 29, + R5900_VI, vi29, vi29, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi30, 30, + R5900_VI, vi30, vi30, 0 ) RABBITIZER_DEF_REG( - R5900_VI, vi31, 31, + R5900_VI, vi31, vi31, 0 ) From a701f616bfcdc672a009e2177e73845fc94ec508 Mon Sep 17 00:00:00 2001 From: angie Date: Mon, 18 Mar 2024 10:16:51 -0300 Subject: [PATCH 2/3] cleanups --- Cargo.toml | 2 +- README.md | 20 +++++++++++++++++--- include/common/RabbitizerVersion.h | 2 +- pyproject.toml | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 233ab704..179ab182 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ [package] name = "rabbitizer" # Version should be synced with include/common/RabbitizerVersion.h -version = "1.9.3" +version = "1.9.4" edition = "2021" authors = ["Anghelo Carvajal "] description = "MIPS instruction decoder" diff --git a/README.md b/README.md index dd9bfe37..8950a284 100644 --- a/README.md +++ b/README.md @@ -56,14 +56,28 @@ In order to keep it simple and fast the following features will not be added: The recommended way to install is using from the PyPi release, via `pip`: ```bash -pip install -U rabbitizer +python3 -m pip install -U rabbitizer ``` +If you use a `requirements.txt` file in your repository, then you can add this +library with the following line: + +```txt +rabbitizer>=1.9.4,<2.0.0 +``` + +### Development version + +The unstable development version is located at the +[develop](https://github.com/Decompollaborate/rabbitizer/tree/develop) +branch. PRs should be made into that branch instead of the main one. + In case you want to mess with the latest development version without wanting to clone the repository, then you could use the following command: ```bash -pip install git+https://github.com/Decompollaborate/rabbitizer.git@develop +python3 -m pip uninstall rabbitizer +python3 -m pip install git+https://github.com/Decompollaborate/rabbitizer.git@develop ``` NOTE: Installing the development version is not recommended. Proceed at your own @@ -82,7 +96,7 @@ cargo add rabbitizer Or you can add it manually to your `Cargo.toml`: ```toml -rabbitizer = "1.9.3" +rabbitizer = "1.9.4" ``` See this crate at . diff --git a/include/common/RabbitizerVersion.h b/include/common/RabbitizerVersion.h index 9007187d..e2bc205f 100644 --- a/include/common/RabbitizerVersion.h +++ b/include/common/RabbitizerVersion.h @@ -14,7 +14,7 @@ extern "C" { // Header version #define RAB_VERSION_MAJOR 1 #define RAB_VERSION_MINOR 9 -#define RAB_VERSION_PATCH 3 +#define RAB_VERSION_PATCH 4 #define RAB_VERSION_STR RAB_STRINGIFY(RAB_VERSION_MAJOR) "." RAB_STRINGIFY(RAB_VERSION_MINOR) "." RAB_STRINGIFY(RAB_VERSION_PATCH) diff --git a/pyproject.toml b/pyproject.toml index 05c9a7ba..eb517d85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ [project] name = "rabbitizer" # Version should be synced with include/common/RabbitizerVersion.h -version = "1.9.3" +version = "1.9.4" description = "MIPS instruction decoder" # license = "MIT" readme = "README.md" From 5c85374ba23f251349b1ddfe2345e1b60de89e87 Mon Sep 17 00:00:00 2001 From: Angie Date: Mon, 18 Mar 2024 16:39:16 -0300 Subject: [PATCH 3/3] version bump --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5456c63..fcd1e02c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.9.4] - 2024-03-18 + ### Changed - Always use named registers for R5900's VU instructions. @@ -566,6 +568,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - First version [unreleased]: https://github.com/Decompollaborate/rabbitizer/compare/master...develop +[1.9.4]: https://github.com/Decompollaborate/rabbitizer/compare/1.9.3...1.9.4 [1.9.3]: https://github.com/Decompollaborate/rabbitizer/compare/1.9.2...1.9.3 [1.9.2]: https://github.com/Decompollaborate/rabbitizer/compare/1.9.1...1.9.2 [1.9.1]: https://github.com/Decompollaborate/rabbitizer/compare/1.9.0...1.9.1