diff options
author | Oxore <oxore@protonmail.com> | 2024-02-18 21:18:23 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2024-02-18 21:18:23 +0300 |
commit | fec4c1684e8680285f51ebd4898fe35127c7e098 (patch) | |
tree | 62d4191931edd6584c77049d0ca653005065fc8d /src/disasm.cpp | |
parent | 21a9aa92a7cf8767a0fcb33858546dea744c4071 (diff) |
Refactor CMakeLists.txt and fix new warnings
Diffstat (limited to 'src/disasm.cpp')
-rw-r--r-- | src/disasm.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/disasm.cpp b/src/disasm.cpp index 2b2ea81..be4a9a8 100644 --- a/src/disasm.cpp +++ b/src/disasm.cpp @@ -83,9 +83,9 @@ constexpr Arg FetchArg( } // Xi number (lower 3 bits, mask 0x7) with An/Dn bit (mask 0x8) const uint8_t xi = (briefext >> 12) & 0xf; - const OpSize s = ((briefext >> 11) & 1) ? OpSize::kLong : OpSize::kWord; + const OpSize s2 = ((briefext >> 11) & 1) ? OpSize::kLong : OpSize::kWord; const int8_t d8 = briefext & 0xff; - return Arg::D8AnXiAddr(xn, xi, s, d8); + return Arg::D8AnXiAddr(xn, xi, s2, d8); } break; case 7: @@ -118,9 +118,9 @@ constexpr Arg FetchArg( } // Xi number (lower 3 bits, mask 0x7) with An/Dn bit (mask 0x8) const uint8_t xi = (briefext >> 12) & 0xf; - const OpSize s = ((briefext >> 11) & 1) ? OpSize::kLong : OpSize::kWord; + const OpSize s2 = ((briefext >> 11) & 1) ? OpSize::kLong : OpSize::kWord; const int8_t d8 = briefext & 0xff; - return Arg::D8PCXiAddr(xn, xi, s, d8); + return Arg::D8PCXiAddr(xn, xi, s2, d8); } break; case 4: // #imm @@ -1979,7 +1979,7 @@ int Op::FPrint( } } -void DisasmNode::AddReferencedBy(const uint32_t address, const ReferenceType type) +void DisasmNode::AddReferencedBy(const uint32_t address_from, const ReferenceType ref_type) { ReferenceNode *node{}; if (this->last_ref_by) { @@ -1989,7 +1989,7 @@ void DisasmNode::AddReferencedBy(const uint32_t address, const ReferenceType typ assert(node); this->ref_by = this->last_ref_by = node; } - node->refs[node->refs_count] = ReferenceRecord{type, address}; + node->refs[node->refs_count] = ReferenceRecord{ref_type, address_from}; node->refs_count++; if (node->refs_count >= kRefsCountPerBuffer) { ReferenceNode *new_node = new ReferenceNode{}; |