Fixed RtlCompareString and RtlCompareStringN, they were very wrong, for CompareString the params are struct ptrs not char ptrs
Fixed a ton of clang-cl compiler warnings about unused variables, still many left. Fixed a lot of inconsistent override ones too
This commit is contained in:
@@ -808,7 +808,7 @@ static const hir::Instr* GetFirstPrecedingInstrWithPossibleFlagEffects(
|
||||
go_further:
|
||||
i = i->GetNonFakePrev();
|
||||
if (!i) {
|
||||
return false;
|
||||
return nullptr;
|
||||
}
|
||||
iop = i->opcode->num;
|
||||
// context/local loads are just movs from mem. we know they will not spoil the
|
||||
@@ -989,7 +989,7 @@ struct COMPARE_EQ_F32
|
||||
if (!HasPrecedingCmpOfSameValues(i.instr)) {
|
||||
EmitCommutativeBinaryXmmOp(
|
||||
e, i,
|
||||
[&i](X64Emitter& e, I8Op dest, const Xmm& src1, const Xmm& src2) {
|
||||
[](X64Emitter& e, I8Op dest, const Xmm& src1, const Xmm& src2) {
|
||||
e.vcomiss(src1, src2);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ bool ConditionalGroupPass::Initialize(Compiler* compiler) {
|
||||
|
||||
bool ConditionalGroupPass::Run(HIRBuilder* builder) {
|
||||
bool dirty;
|
||||
int loops = 0;
|
||||
do {
|
||||
assert_true(loops < 20); // arbitrary number
|
||||
dirty = false;
|
||||
@@ -68,7 +67,6 @@ bool ConditionalGroupPass::Run(HIRBuilder* builder) {
|
||||
dirty |= result;
|
||||
}
|
||||
}
|
||||
loops++;
|
||||
} while (dirty);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define XENIA_CPU_HIR_OPCODES_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "xenia/base/platform.h"
|
||||
namespace xe {
|
||||
namespace cpu {
|
||||
namespace hir {
|
||||
@@ -361,13 +361,16 @@ enum OpcodeSignature {
|
||||
#define GET_OPCODE_SIG_TYPE_SRC1(sig) (OpcodeSignatureType)((sig >> 3) & 0x7)
|
||||
#define GET_OPCODE_SIG_TYPE_SRC2(sig) (OpcodeSignatureType)((sig >> 6) & 0x7)
|
||||
#define GET_OPCODE_SIG_TYPE_SRC3(sig) (OpcodeSignatureType)((sig >> 9) & 0x7)
|
||||
XE_MAYBE_UNUSED
|
||||
static bool IsOpcodeBinaryValue(uint32_t signature) {
|
||||
return (signature & ~(0x7)) ==
|
||||
((OPCODE_SIG_TYPE_V << 3) | (OPCODE_SIG_TYPE_V << 6));
|
||||
}
|
||||
XE_MAYBE_UNUSED
|
||||
static bool IsOpcodeUnaryValue(uint32_t signature) {
|
||||
return (signature & ~(0x7)) == ((OPCODE_SIG_TYPE_V << 3));
|
||||
}
|
||||
XE_MAYBE_UNUSED
|
||||
static void UnpackOpcodeSig(uint32_t sig, OpcodeSignatureType& dest,
|
||||
OpcodeSignatureType& src1,
|
||||
OpcodeSignatureType& src2,
|
||||
|
||||
@@ -185,7 +185,7 @@ bool MMIOHandler::TryDecodeLoadStore(const uint8_t* p,
|
||||
uint8_t rex_b = rex & 0b0001;
|
||||
uint8_t rex_x = rex & 0b0010;
|
||||
uint8_t rex_r = rex & 0b0100;
|
||||
uint8_t rex_w = rex & 0b1000;
|
||||
//uint8_t rex_w = rex & 0b1000;
|
||||
|
||||
// http://www.sandpile.org/x86/opc_rm.htm
|
||||
// http://www.sandpile.org/x86/opc_sib.htm
|
||||
@@ -418,7 +418,6 @@ bool MMIOHandler::ExceptionCallback(Exception* ex) {
|
||||
// Quick kill anything outside our mapping.
|
||||
return false;
|
||||
}
|
||||
uint64_t hostip = ex->pc();
|
||||
|
||||
void* fault_host_address = reinterpret_cast<void*>(ex->fault_address());
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ struct PPCDecodeData {
|
||||
uint32_t LEV() const { return bits_.LEV; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -74,6 +75,7 @@ struct PPCDecodeData {
|
||||
uint32_t L() const { return bits_.RT & 0x1; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -95,6 +97,7 @@ struct PPCDecodeData {
|
||||
int32_t ds() const { return static_cast<int32_t>(XEEXTS16(DS() << 2)); }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -174,6 +177,7 @@ struct PPCDecodeData {
|
||||
uint32_t CRFS() const { return bits_.RA >> 2; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -200,6 +204,7 @@ struct PPCDecodeData {
|
||||
uint32_t CRFS() const { return CRBA() >> 2; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -223,6 +228,7 @@ struct PPCDecodeData {
|
||||
}
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -244,6 +250,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -266,6 +273,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -289,6 +297,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -314,6 +323,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -339,6 +349,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -363,6 +374,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -389,6 +401,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -412,6 +425,7 @@ struct PPCDecodeData {
|
||||
int32_t SIMM() const { return static_cast<int32_t>(XEEXTS16(VA())); }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -431,6 +445,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -452,6 +467,7 @@ struct PPCDecodeData {
|
||||
uint32_t SHB() const { return VC() & 0xF; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -473,6 +489,7 @@ struct PPCDecodeData {
|
||||
uint32_t VB() const { return bits_.VB128l | (bits_.VB128h << 5); }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -498,6 +515,7 @@ struct PPCDecodeData {
|
||||
uint32_t RB() const { return bits_.RB; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -521,6 +539,7 @@ struct PPCDecodeData {
|
||||
uint32_t VC() const { return bits_.VC; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -546,6 +565,7 @@ struct PPCDecodeData {
|
||||
int32_t SIMM() const { return static_cast<int32_t>(XEEXTS16(bits_.UIMM)); }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -567,6 +587,7 @@ struct PPCDecodeData {
|
||||
uint32_t z() const { return bits_.z; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -592,6 +613,7 @@ struct PPCDecodeData {
|
||||
uint32_t SH() const { return bits_.SH; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -618,6 +640,7 @@ struct PPCDecodeData {
|
||||
bool Rc() const { return bits_.Rc ? true : false; }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
@@ -642,6 +665,7 @@ struct PPCDecodeData {
|
||||
uint32_t UIMM() const { return bits_.PERMl | (bits_.PERMh << 5); }
|
||||
|
||||
private:
|
||||
XE_MAYBE_UNUSED
|
||||
uint32_t address_;
|
||||
union {
|
||||
uint32_t value_;
|
||||
|
||||
@@ -2014,8 +2014,7 @@ int InstrEmit_vupkhsh(PPCHIRBuilder& f, const InstrData& i) {
|
||||
return InstrEmit_vupkhsh_(f, i.VX.VD, i.VX.VB);
|
||||
}
|
||||
int InstrEmit_vupkhsh128(PPCHIRBuilder& f, const InstrData& i) {
|
||||
uint32_t va = VX128_VA128;
|
||||
assert_zero(va);
|
||||
assert_zero(VX128_VA128);
|
||||
return InstrEmit_vupkhsh_(f, VX128_VD128, VX128_VB128);
|
||||
}
|
||||
|
||||
@@ -2032,8 +2031,7 @@ int InstrEmit_vupklsh(PPCHIRBuilder& f, const InstrData& i) {
|
||||
return InstrEmit_vupklsh_(f, i.VX.VD, i.VX.VB);
|
||||
}
|
||||
int InstrEmit_vupklsh128(PPCHIRBuilder& f, const InstrData& i) {
|
||||
uint32_t va = VX128_VA128;
|
||||
assert_zero(va);
|
||||
assert_zero(VX128_VA128);
|
||||
return InstrEmit_vupklsh_(f, VX128_VD128, VX128_VB128);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user