Lint cleanup.
This commit is contained in:
parent
5aeeed72b9
commit
a6e6f0f7bf
|
@ -2,7 +2,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Xenia : Xbox 360 Emulator Research Project *
|
* Xenia : Xbox 360 Emulator Research Project *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
* Copyright 2020 Ben Vanik. All rights reserved. *
|
||||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
@ -158,7 +158,9 @@ bool EmulatorWindow::Initialize() {
|
||||||
ShowCommitID();
|
ShowCommitID();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default: { handled = false; } break;
|
default: {
|
||||||
|
handled = false;
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
e->set_handled(handled);
|
e->set_handled(handled);
|
||||||
});
|
});
|
||||||
|
|
|
@ -89,7 +89,8 @@ class Factory {
|
||||||
|
|
||||||
void Add(const std::string& name,
|
void Add(const std::string& name,
|
||||||
std::function<std::unique_ptr<T>(Args...)> instantiate) {
|
std::function<std::unique_ptr<T>(Args...)> instantiate) {
|
||||||
Add(name, []() { return true; }, instantiate);
|
constexpr auto always_available = []() { return true; };
|
||||||
|
Add(name, always_available, instantiate);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename DT>
|
template <typename DT>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Xenia : Xbox 360 Emulator Research Project *
|
* Xenia : Xbox 360 Emulator Research Project *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Copyright 2019 Ben Vanik. All rights reserved. *
|
* Copyright 2020 Ben Vanik. All rights reserved. *
|
||||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
@ -891,44 +891,56 @@ EMITTER_OPCODE_TABLE(OPCODE_IS_NAN, IS_NAN_F32, IS_NAN_F64);
|
||||||
struct COMPARE_EQ_I8
|
struct COMPARE_EQ_I8
|
||||||
: Sequence<COMPARE_EQ_I8, I<OPCODE_COMPARE_EQ, I8Op, I8Op, I8Op>> {
|
: Sequence<COMPARE_EQ_I8, I<OPCODE_COMPARE_EQ, I8Op, I8Op, I8Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg8& src1,
|
e, i,
|
||||||
const Reg8& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg8& src1, const Reg8& src2) {
|
||||||
[](X64Emitter& e, const Reg8& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg8& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.sete(i.dest);
|
e.sete(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
struct COMPARE_EQ_I16
|
struct COMPARE_EQ_I16
|
||||||
: Sequence<COMPARE_EQ_I16, I<OPCODE_COMPARE_EQ, I8Op, I16Op, I16Op>> {
|
: Sequence<COMPARE_EQ_I16, I<OPCODE_COMPARE_EQ, I8Op, I16Op, I16Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg16& src1,
|
e, i,
|
||||||
const Reg16& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg16& src1, const Reg16& src2) {
|
||||||
[](X64Emitter& e, const Reg16& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg16& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.sete(i.dest);
|
e.sete(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
struct COMPARE_EQ_I32
|
struct COMPARE_EQ_I32
|
||||||
: Sequence<COMPARE_EQ_I32, I<OPCODE_COMPARE_EQ, I8Op, I32Op, I32Op>> {
|
: Sequence<COMPARE_EQ_I32, I<OPCODE_COMPARE_EQ, I8Op, I32Op, I32Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg32& src1,
|
e, i,
|
||||||
const Reg32& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg32& src1, const Reg32& src2) {
|
||||||
[](X64Emitter& e, const Reg32& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg32& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.sete(i.dest);
|
e.sete(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
struct COMPARE_EQ_I64
|
struct COMPARE_EQ_I64
|
||||||
: Sequence<COMPARE_EQ_I64, I<OPCODE_COMPARE_EQ, I8Op, I64Op, I64Op>> {
|
: Sequence<COMPARE_EQ_I64, I<OPCODE_COMPARE_EQ, I8Op, I64Op, I64Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg64& src1,
|
e, i,
|
||||||
const Reg64& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg64& src1, const Reg64& src2) {
|
||||||
[](X64Emitter& e, const Reg64& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg64& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.sete(i.dest);
|
e.sete(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -962,44 +974,56 @@ EMITTER_OPCODE_TABLE(OPCODE_COMPARE_EQ, COMPARE_EQ_I8, COMPARE_EQ_I16,
|
||||||
struct COMPARE_NE_I8
|
struct COMPARE_NE_I8
|
||||||
: Sequence<COMPARE_NE_I8, I<OPCODE_COMPARE_NE, I8Op, I8Op, I8Op>> {
|
: Sequence<COMPARE_NE_I8, I<OPCODE_COMPARE_NE, I8Op, I8Op, I8Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg8& src1,
|
e, i,
|
||||||
const Reg8& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg8& src1, const Reg8& src2) {
|
||||||
[](X64Emitter& e, const Reg8& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg8& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.setne(i.dest);
|
e.setne(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
struct COMPARE_NE_I16
|
struct COMPARE_NE_I16
|
||||||
: Sequence<COMPARE_NE_I16, I<OPCODE_COMPARE_NE, I8Op, I16Op, I16Op>> {
|
: Sequence<COMPARE_NE_I16, I<OPCODE_COMPARE_NE, I8Op, I16Op, I16Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg16& src1,
|
e, i,
|
||||||
const Reg16& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg16& src1, const Reg16& src2) {
|
||||||
[](X64Emitter& e, const Reg16& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg16& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.setne(i.dest);
|
e.setne(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
struct COMPARE_NE_I32
|
struct COMPARE_NE_I32
|
||||||
: Sequence<COMPARE_NE_I32, I<OPCODE_COMPARE_NE, I8Op, I32Op, I32Op>> {
|
: Sequence<COMPARE_NE_I32, I<OPCODE_COMPARE_NE, I8Op, I32Op, I32Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg32& src1,
|
e, i,
|
||||||
const Reg32& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg32& src1, const Reg32& src2) {
|
||||||
[](X64Emitter& e, const Reg32& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg32& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.setne(i.dest);
|
e.setne(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
struct COMPARE_NE_I64
|
struct COMPARE_NE_I64
|
||||||
: Sequence<COMPARE_NE_I64, I<OPCODE_COMPARE_NE, I8Op, I64Op, I64Op>> {
|
: Sequence<COMPARE_NE_I64, I<OPCODE_COMPARE_NE, I8Op, I64Op, I64Op>> {
|
||||||
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
static void Emit(X64Emitter& e, const EmitArgType& i) {
|
||||||
EmitCommutativeCompareOp(e, i,
|
EmitCommutativeCompareOp(
|
||||||
[](X64Emitter& e, const Reg64& src1,
|
e, i,
|
||||||
const Reg64& src2) { e.cmp(src1, src2); },
|
[](X64Emitter& e, const Reg64& src1, const Reg64& src2) {
|
||||||
[](X64Emitter& e, const Reg64& src1,
|
e.cmp(src1, src2);
|
||||||
int32_t constant) { e.cmp(src1, constant); });
|
},
|
||||||
|
[](X64Emitter& e, const Reg64& src1, int32_t constant) {
|
||||||
|
e.cmp(src1, constant);
|
||||||
|
});
|
||||||
e.setne(i.dest);
|
e.setne(i.dest);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Xenia : Xbox 360 Emulator Research Project *
|
* Xenia : Xbox 360 Emulator Research Project *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Copyright 2015 Ben Vanik. All rights reserved. *
|
* Copyright 2020 Ben Vanik. All rights reserved. *
|
||||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
@ -123,9 +123,9 @@ bool TraceViewer::Setup() {
|
||||||
|
|
||||||
// Create the emulator but don't initialize so we can setup the window.
|
// Create the emulator but don't initialize so we can setup the window.
|
||||||
emulator_ = std::make_unique<Emulator>(L"", L"");
|
emulator_ = std::make_unique<Emulator>(L"", L"");
|
||||||
X_STATUS result =
|
X_STATUS result = emulator_->Setup(
|
||||||
emulator_->Setup(window_.get(), nullptr,
|
window_.get(), nullptr, [this]() { return CreateGraphicsSystem(); },
|
||||||
[this]() { return CreateGraphicsSystem(); }, nullptr);
|
nullptr);
|
||||||
if (XFAILED(result)) {
|
if (XFAILED(result)) {
|
||||||
XELOGE("Failed to setup emulator: %.8X", result);
|
XELOGE("Failed to setup emulator: %.8X", result);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Xenia : Xbox 360 Emulator Research Project *
|
* Xenia : Xbox 360 Emulator Research Project *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
* Copyright 2013 Ben Vanik. All rights reserved. *
|
* Copyright 2020 Ben Vanik. All rights reserved. *
|
||||||
* Released under the BSD license - see LICENSE in the root for more details. *
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
@ -174,7 +174,9 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
|
||||||
case FS_Invalid:
|
case FS_Invalid:
|
||||||
case FS_Unknown:
|
case FS_Unknown:
|
||||||
case FS_End:
|
case FS_End:
|
||||||
default: { assert_always(); }
|
default: {
|
||||||
|
assert_always();
|
||||||
|
}
|
||||||
|
|
||||||
case FS_Start: {
|
case FS_Start: {
|
||||||
if (c == '%') {
|
if (c == '%') {
|
||||||
|
@ -220,7 +222,6 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
|
||||||
flags |= FF_AddPrefix;
|
flags |= FF_AddPrefix;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = FS_Width;
|
state = FS_Width;
|
||||||
// fall through, don't need to goto restart
|
// fall through, don't need to goto restart
|
||||||
}
|
}
|
||||||
|
@ -240,7 +241,6 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
|
||||||
width += c - '0';
|
width += c - '0';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = FS_PrecisionStart;
|
state = FS_PrecisionStart;
|
||||||
// fall through, don't need to goto restart
|
// fall through, don't need to goto restart
|
||||||
}
|
}
|
||||||
|
@ -252,7 +252,6 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
|
||||||
precision = 0;
|
precision = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = FS_Size;
|
state = FS_Size;
|
||||||
goto restart;
|
goto restart;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +270,6 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
|
||||||
precision += c - '0';
|
precision += c - '0';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
state = FS_Size;
|
state = FS_Size;
|
||||||
// fall through
|
// fall through
|
||||||
}
|
}
|
||||||
|
@ -310,7 +308,6 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// fall through
|
// fall through
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -581,7 +578,9 @@ int32_t format_core(PPCContext* ppc_context, FormatData& data, ArgList& args,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default: { assert_always(); }
|
default: {
|
||||||
|
assert_always();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue