mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 13:57:35 +00:00
Use new format functions in remaining DevTools. (#3755)
* AK: Add formatter for JsonValue. * Inspector: Use new format functions. * Profiler: Use new format functions. * UserspaceEmulator: Use new format functions.
This commit is contained in:
parent
626bb1be9c
commit
d94f674bbb
11 changed files with 45 additions and 37 deletions
|
@ -1342,13 +1342,13 @@ void SoftCPU::DIV_RM16(const X86::Instruction& insn)
|
|||
{
|
||||
auto divisor = insn.modrm().read16(*this, insn);
|
||||
if (divisor.value() == 0) {
|
||||
warn() << "Divide by zero";
|
||||
warnln("Divide by zero");
|
||||
TODO();
|
||||
}
|
||||
u32 dividend = ((u32)dx().value() << 16) | ax().value();
|
||||
auto quotient = dividend / divisor.value();
|
||||
if (quotient > NumericLimits<u16>::max()) {
|
||||
warn() << "Divide overflow";
|
||||
warnln("Divide overflow");
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
@ -1363,13 +1363,13 @@ void SoftCPU::DIV_RM32(const X86::Instruction& insn)
|
|||
{
|
||||
auto divisor = insn.modrm().read32(*this, insn);
|
||||
if (divisor.value() == 0) {
|
||||
warn() << "Divide by zero";
|
||||
warnln("Divide by zero");
|
||||
TODO();
|
||||
}
|
||||
u64 dividend = ((u64)edx().value() << 32) | eax().value();
|
||||
auto quotient = dividend / divisor.value();
|
||||
if (quotient > NumericLimits<u32>::max()) {
|
||||
warn() << "Divide overflow";
|
||||
warnln("Divide overflow");
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
@ -1384,13 +1384,13 @@ void SoftCPU::DIV_RM8(const X86::Instruction& insn)
|
|||
{
|
||||
auto divisor = insn.modrm().read8(*this, insn);
|
||||
if (divisor.value() == 0) {
|
||||
warn() << "Divide by zero";
|
||||
warnln("Divide by zero");
|
||||
TODO();
|
||||
}
|
||||
u16 dividend = ax().value();
|
||||
auto quotient = dividend / divisor.value();
|
||||
if (quotient > NumericLimits<u8>::max()) {
|
||||
warn() << "Divide overflow";
|
||||
warnln("Divide overflow");
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
@ -1405,7 +1405,7 @@ void SoftCPU::ENTER32(const X86::Instruction&) { TODO_INSN(); }
|
|||
|
||||
void SoftCPU::ESCAPE(const X86::Instruction&)
|
||||
{
|
||||
dbg() << "FIXME: x87 floating-point support";
|
||||
dbgln("FIXME: x87 floating-point support");
|
||||
m_emulator.dump_backtrace();
|
||||
TODO();
|
||||
}
|
||||
|
@ -1546,13 +1546,13 @@ void SoftCPU::IDIV_RM16(const X86::Instruction& insn)
|
|||
auto divisor_with_shadow = insn.modrm().read16(*this, insn);
|
||||
auto divisor = (i16)divisor_with_shadow.value();
|
||||
if (divisor == 0) {
|
||||
warn() << "Divide by zero";
|
||||
warnln("Divide by zero");
|
||||
TODO();
|
||||
}
|
||||
i32 dividend = (i32)(((u32)dx().value() << 16) | (u32)ax().value());
|
||||
i32 result = dividend / divisor;
|
||||
if (result > NumericLimits<i16>::max() || result < NumericLimits<i16>::min()) {
|
||||
warn() << "Divide overflow";
|
||||
warnln("Divide overflow");
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
@ -1566,13 +1566,13 @@ void SoftCPU::IDIV_RM32(const X86::Instruction& insn)
|
|||
auto divisor_with_shadow = insn.modrm().read32(*this, insn);
|
||||
auto divisor = (i32)divisor_with_shadow.value();
|
||||
if (divisor == 0) {
|
||||
warn() << "Divide by zero";
|
||||
warnln("Divide by zero");
|
||||
TODO();
|
||||
}
|
||||
i64 dividend = (i64)(((u64)edx().value() << 32) | (u64)eax().value());
|
||||
i64 result = dividend / divisor;
|
||||
if (result > NumericLimits<i32>::max() || result < NumericLimits<i32>::min()) {
|
||||
warn() << "Divide overflow";
|
||||
warnln("Divide overflow");
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
@ -1586,13 +1586,13 @@ void SoftCPU::IDIV_RM8(const X86::Instruction& insn)
|
|||
auto divisor_with_shadow = insn.modrm().read8(*this, insn);
|
||||
auto divisor = (i8)divisor_with_shadow.value();
|
||||
if (divisor == 0) {
|
||||
warn() << "Divide by zero";
|
||||
warnln("Divide by zero");
|
||||
TODO();
|
||||
}
|
||||
i16 dividend = ax().value();
|
||||
i16 result = dividend / divisor;
|
||||
if (result > NumericLimits<i8>::max() || result < NumericLimits<i8>::min()) {
|
||||
warn() << "Divide overflow";
|
||||
warnln("Divide overflow");
|
||||
TODO();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue