Skip to content

Commit

Permalink
Merge pull request #12020 from Dentomologist/gekkodisassembler_remove…
Browse files Browse the repository at this point in the history
…_unread_variables

GekkoDisassembler: Remove unread variables
  • Loading branch information
JosJuice committed Jul 9, 2023
2 parents 80c44ea + c8e276c commit 90b1f5c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions Source/Core/Common/GekkoDisassembler.cpp
Expand Up @@ -154,8 +154,6 @@ u32* GekkoDisassembler::m_iaddr = nullptr;
std::string GekkoDisassembler::m_opcode;
std::string GekkoDisassembler::m_operands;
unsigned char GekkoDisassembler::m_flags = PPCF_ILLEGAL;
unsigned short GekkoDisassembler::m_sreg = 0;
u32 GekkoDisassembler::m_displacement = 0;

static u32 HelperRotateMask(int r, int mb, int me)
{
Expand Down Expand Up @@ -393,7 +391,6 @@ std::string GekkoDisassembler::imm(u32 in, int uimm, int type, bool hex)
{
m_flags |= PPCF_UNSIGNED;
}
m_displacement = i;

switch (type)
{
Expand Down Expand Up @@ -583,8 +580,6 @@ void GekkoDisassembler::bc(u32 in)
m_operands = fmt::format("{} ->0x{:08X}", m_operands, d);
else
m_operands = fmt::format("{} ->0x{:08X}", m_operands, *m_iaddr + d);

m_displacement = d;
}

void GekkoDisassembler::bli(u32 in)
Expand All @@ -600,8 +595,6 @@ void GekkoDisassembler::bli(u32 in)
m_operands = fmt::format("->0x{:08X}", d);
else
m_operands = fmt::format("->0x{:08X}", *m_iaddr + d);

m_displacement = d;
}

void GekkoDisassembler::mcrf(u32 in, std::string_view suffix)
Expand Down Expand Up @@ -927,10 +920,6 @@ void GekkoDisassembler::ldst(u32 in, std::string_view name, char reg, unsigned c
int d = (u32)(in & 0xffff);

m_flags |= dmode;
m_sreg = (short)a;
// if (d >= 0x8000)
// d -= 0x10000;
m_displacement = (u32)d;
m_opcode = name;

if (reg == 'r')
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/Common/GekkoDisassembler.h
Expand Up @@ -105,7 +105,5 @@ class GekkoDisassembler final
static std::string m_opcode; // Buffer for opcode, min. 10 chars.
static std::string m_operands; // Operand buffer, min. 24 chars.
static unsigned char m_flags; // Additional flags
static unsigned short m_sreg; // Register in load/store instructions
static u32 m_displacement; // Branch- or load/store displacement
};
} // namespace Common

0 comments on commit 90b1f5c

Please sign in to comment.