Merge pull request #76 from Decompollaborate/develop

1.12.6
This commit is contained in:
Anghelo Carvajal 2025-02-06 16:38:06 -03:00 committed by GitHub
commit 5a112c5c01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 19 additions and 9 deletions

View File

@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [1.12.6] - 2025-02-06
### Fixed
- R5900: Fix decoding the `imm5` operand of the `viaddi` instruction as a signed
value instead of decoding it as an unsigned one.
## [1.12.5] - 2024-12-16 ## [1.12.5] - 2024-12-16
### Fixed ### Fixed
@ -702,6 +709,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- First version - First version
[unreleased]: https://github.com/Decompollaborate/rabbitizer/compare/master...develop [unreleased]: https://github.com/Decompollaborate/rabbitizer/compare/master...develop
[1.12.6]: https://github.com/Decompollaborate/rabbitizer/compare/1.12.5...1.12.6
[1.12.5]: https://github.com/Decompollaborate/rabbitizer/compare/1.12.4...1.12.5 [1.12.5]: https://github.com/Decompollaborate/rabbitizer/compare/1.12.4...1.12.5
[1.12.4]: https://github.com/Decompollaborate/rabbitizer/compare/1.12.3...1.12.4 [1.12.4]: https://github.com/Decompollaborate/rabbitizer/compare/1.12.3...1.12.4
[1.12.3]: https://github.com/Decompollaborate/rabbitizer/compare/1.12.2...1.12.3 [1.12.3]: https://github.com/Decompollaborate/rabbitizer/compare/1.12.2...1.12.3

2
Cargo.lock generated
View File

@ -102,7 +102,7 @@ dependencies = [
[[package]] [[package]]
name = "rabbitizer" name = "rabbitizer"
version = "1.12.5" version = "1.12.6"
dependencies = [ dependencies = [
"cc", "cc",
"glob", "glob",

View File

@ -4,7 +4,7 @@
[package] [package]
name = "rabbitizer" name = "rabbitizer"
# Version should be synced with include/common/RabbitizerVersion.h # Version should be synced with include/common/RabbitizerVersion.h
version = "1.12.5" version = "1.12.6"
edition = "2021" edition = "2021"
authors = ["Anghelo Carvajal <angheloalf95@gmail.com>"] authors = ["Anghelo Carvajal <angheloalf95@gmail.com>"]
description = "MIPS instruction decoder" description = "MIPS instruction decoder"

View File

@ -109,7 +109,7 @@ cargo add rabbitizer
Or you can add it manually to your `Cargo.toml`: Or you can add it manually to your `Cargo.toml`:
```toml ```toml
rabbitizer = "1.12.5" rabbitizer = "1.12.6"
``` ```
See this crate at <https://crates.io/crates/rabbitizer>. See this crate at <https://crates.io/crates/rabbitizer>.

View File

@ -33,7 +33,7 @@ namespace rabbitizer {
uint8_t GetR5900_l() const; uint8_t GetR5900_l() const;
uint8_t GetR5900_m() const; uint8_t GetR5900_m() const;
uint8_t GetR5900_imm5() const; int8_t GetR5900_imm5() const;
}; };
}; };

View File

@ -113,6 +113,6 @@ uint8_t InstructionR5900::GetR5900_m() const {
return RAB_INSTR_R5900_GET_m(&this->instr); return RAB_INSTR_R5900_GET_m(&this->instr);
} }
uint8_t InstructionR5900::GetR5900_imm5() const { int8_t InstructionR5900::GetR5900_imm5() const {
return RAB_INSTR_R5900_GET_imm5(&this->instr); return RabbitizerUtils_From2Complement(RAB_INSTR_R5900_GET_imm5(&this->instr), 5);
} }

View File

@ -14,7 +14,7 @@ extern "C" {
// Header version // Header version
#define RAB_VERSION_MAJOR 1 #define RAB_VERSION_MAJOR 1
#define RAB_VERSION_MINOR 12 #define RAB_VERSION_MINOR 12
#define RAB_VERSION_PATCH 5 #define RAB_VERSION_PATCH 6
#define RAB_VERSION_STR RAB_STRINGIFY(RAB_VERSION_MAJOR) "." RAB_STRINGIFY(RAB_VERSION_MINOR) "." RAB_STRINGIFY(RAB_VERSION_PATCH) #define RAB_VERSION_STR RAB_STRINGIFY(RAB_VERSION_MAJOR) "." RAB_STRINGIFY(RAB_VERSION_MINOR) "." RAB_STRINGIFY(RAB_VERSION_PATCH)

View File

@ -4,7 +4,7 @@
[project] [project]
name = "rabbitizer" name = "rabbitizer"
# Version should be synced with include/common/RabbitizerVersion.h # Version should be synced with include/common/RabbitizerVersion.h
version = "1.12.5" version = "1.12.6"
description = "MIPS instruction decoder" description = "MIPS instruction decoder"
# license = "MIT" # license = "MIT"
readme = "README.md" readme = "README.md"

View File

@ -515,7 +515,7 @@ size_t RabbitizerOperandType_process_r5900_immediate5(const RabbitizerInstructio
return immOverrideLength; return immOverrideLength;
} }
number = RAB_INSTR_R5900_GET_imm5(self); number = RabbitizerUtils_From2Complement(RAB_INSTR_R5900_GET_imm5(self), 5);
if (RabbitizerConfig_Cfg.misc.omit0XOnSmallImm) { if (RabbitizerConfig_Cfg.misc.omit0XOnSmallImm) {
if (number > -10 && number < 10) { if (number > -10 && number < 10) {
RABUTILS_BUFFER_SPRINTF(dst, totalSize, "%i", number); RABUTILS_BUFFER_SPRINTF(dst, totalSize, "%i", number);

View File

@ -40,6 +40,8 @@ const TestEntry test_entries[] = {
TEST_ENTRY_C(0x4A820BFF, NULL, "viswr.y $vi2, ($vi1)"), TEST_ENTRY_C(0x4A820BFF, NULL, "viswr.y $vi2, ($vi1)"),
TEST_ENTRY_C(0x4A420BFF, NULL, "viswr.z $vi2, ($vi1)"), TEST_ENTRY_C(0x4A420BFF, NULL, "viswr.z $vi2, ($vi1)"),
TEST_ENTRY_C(0x4A220BFF, NULL, "viswr.w $vi2, ($vi1)"), TEST_ENTRY_C(0x4A220BFF, NULL, "viswr.w $vi2, ($vi1)"),
TEST_ENTRY_C(0x4A0307B2, NULL, "viaddi $vi3, $vi0, -0x2"),
}; };
size_t test_entries_len = ARRAY_COUNT(test_entries); size_t test_entries_len = ARRAY_COUNT(test_entries);