summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLéo Lam <leo@innovatetechnologi.es>2019-06-16 16:19:30 +0200
committerGitHub <noreply@github.com>2019-06-16 16:19:30 +0200
commit1550c098d33a3832b59ece2dce1a526e34be6ff9 (patch)
treefdece3d3801508590482869bafac0c1195e79398 /Source/Core
parent2e3478a5425b69ba9ada66f3c9fd825ba53e196b (diff)
parent9952dfe2934640a81657bfab3d7010318180c3f3 (diff)
Merge pull request #8187 from lioncash/disasm
GekkoDisassmbler: Amend erroneous formatting specifiers
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/GekkoDisassembler.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/Core/Common/GekkoDisassembler.cpp b/Source/Core/Common/GekkoDisassembler.cpp
index 0fedea6652..ade9b761f7 100644
--- a/Source/Core/Common/GekkoDisassembler.cpp
+++ b/Source/Core/Common/GekkoDisassembler.cpp
@@ -153,10 +153,10 @@ static std::string ldst_offs(u32 val)
if (val & 0x8000)
{
- return fmt::format("-0x{:.4X}", ((~val) & 0xffff) + 1);
+ return fmt::format("-0x{:04X}", ((~val) & 0xffff) + 1);
}
- return fmt::format("0x{:.4X}", val);
+ return fmt::format("0x{:04X}", val);
}
static int SEX12(u32 x)
@@ -376,7 +376,7 @@ std::string GekkoDisassembler::imm(u32 in, int uimm, int type, bool hex)
case 1:
if (hex)
- return fmt::format("{}, {}, 0x{:.4X}", regnames[PPCGETA(in)], regnames[PPCGETD(in)], i);
+ return fmt::format("{}, {}, 0x{:04X}", regnames[PPCGETA(in)], regnames[PPCGETD(in)], i);
else
return fmt::format("{}, {}, {}", regnames[PPCGETA(in)], regnames[PPCGETD(in)], i);
@@ -385,7 +385,7 @@ std::string GekkoDisassembler::imm(u32 in, int uimm, int type, bool hex)
case 3:
if (hex)
- return fmt::format("{}, 0x{:.4X}", regnames[PPCGETD(in)], i);
+ return fmt::format("{}, 0x{:04X}", regnames[PPCGETD(in)], i);
else
return fmt::format("{}, {}", regnames[PPCGETD(in)], i);
@@ -569,9 +569,9 @@ void GekkoDisassembler::bc(u32 in)
branch(in, "", (in & 2) ? 1 : 0, d);
if (in & 2) // AA ?
- m_operands = fmt::format("{} ->0x{:.8X}", m_operands, d);
+ m_operands = fmt::format("{} ->0x{:08X}", m_operands, d);
else
- m_operands = fmt::format("{} ->0x{:.8X}", m_operands, *m_iaddr + d);
+ m_operands = fmt::format("{} ->0x{:08X}", m_operands, *m_iaddr + d);
m_type = PPCINSTR_BRANCH;
m_displacement = d;
@@ -587,9 +587,9 @@ void GekkoDisassembler::bli(u32 in)
m_opcode = fmt::format("b{}", b_ext[in & 3]);
if (in & 2) // AA ?
- m_operands = fmt::format("->0x{:.8X}", d);
+ m_operands = fmt::format("->0x{:08X}", d);
else
- m_operands = fmt::format("->0x{:.8X}", *m_iaddr + d);
+ m_operands = fmt::format("->0x{:08X}", *m_iaddr + d);
m_type = PPCINSTR_BRANCH;
m_displacement = d;