Skip to content

Commit

Permalink
Merge pull request #76 from Decompollaborate/develop
Browse files Browse the repository at this point in the history
1.12.6
  • Loading branch information
AngheloAlf authored Feb 6, 2025
2 parents b9242fe + 9ae964d commit 5a112c5
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 9 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [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

### Fixed
Expand Down Expand Up @@ -702,6 +709,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.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.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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[package]
name = "rabbitizer"
# Version should be synced with include/common/RabbitizerVersion.h
version = "1.12.5"
version = "1.12.6"
edition = "2021"
authors = ["Anghelo Carvajal <angheloalf95@gmail.com>"]
description = "MIPS instruction decoder"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ cargo add rabbitizer
Or you can add it manually to your `Cargo.toml`:

```toml
rabbitizer = "1.12.5"
rabbitizer = "1.12.6"
```

See this crate at <https://crates.io/crates/rabbitizer>.
Expand Down
2 changes: 1 addition & 1 deletion cplusplus/include/instructions/InstructionR5900.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace rabbitizer {
uint8_t GetR5900_l() const;
uint8_t GetR5900_m() const;

uint8_t GetR5900_imm5() const;
int8_t GetR5900_imm5() const;
};
};

Expand Down
4 changes: 2 additions & 2 deletions cplusplus/src/instructions/InstructionR5900.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ uint8_t InstructionR5900::GetR5900_m() const {
return RAB_INSTR_R5900_GET_m(&this->instr);
}

uint8_t InstructionR5900::GetR5900_imm5() const {
return RAB_INSTR_R5900_GET_imm5(&this->instr);
int8_t InstructionR5900::GetR5900_imm5() const {
return RabbitizerUtils_From2Complement(RAB_INSTR_R5900_GET_imm5(&this->instr), 5);
}
2 changes: 1 addition & 1 deletion include/common/RabbitizerVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extern "C" {
// Header version
#define RAB_VERSION_MAJOR 1
#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)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[project]
name = "rabbitizer"
# Version should be synced with include/common/RabbitizerVersion.h
version = "1.12.5"
version = "1.12.6"
description = "MIPS instruction decoder"
# license = "MIT"
readme = "README.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ size_t RabbitizerOperandType_process_r5900_immediate5(const RabbitizerInstructio
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 (number > -10 && number < 10) {
RABUTILS_BUFFER_SPRINTF(dst, totalSize, "%i", number);
Expand Down
2 changes: 2 additions & 0 deletions tests/c/instruction_checks/r5900_disasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ const TestEntry test_entries[] = {
TEST_ENTRY_C(0x4A820BFF, NULL, "viswr.y $vi2, ($vi1)"),
TEST_ENTRY_C(0x4A420BFF, NULL, "viswr.z $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);

0 comments on commit 5a112c5

Please sign in to comment.