Jit: Fix valgrind warnings.

The first time PrefixStart was entered with startDefaultPrefix = true, it would
call EatPrefix, which checks the so far entirely uninitialized prefixXFlags.
This commit is contained in:
Henrik Rydgard 2013-10-16 22:30:22 +02:00
parent 805bea5ec8
commit aa3cf34fc1
3 changed files with 16 additions and 0 deletions

View File

@ -70,6 +70,12 @@ struct ArmJitState
PrefixState prefixSFlag;
PrefixState prefixTFlag;
PrefixState prefixDFlag;
ArmJitState()
: prefixSFlag(PREFIX_UNKNOWN),
prefixTFlag(PREFIX_UNKNOWN),
prefixDFlag(PREFIX_UNKNOWN) {}
void PrefixStart() {
if (startDefaultPrefix) {
EatPrefix();

View File

@ -51,6 +51,11 @@ namespace MIPSComp
PREFIX_KNOWN_DIRTY = 0x11,
};
PpcJitState()
: prefixSFlag(PREFIX_UNKNOWN),
prefixTFlag(PREFIX_UNKNOWN),
prefixDFlag(PREFIX_UNKNOWN) {}
u32 compilerPC;
u32 blockStart;
bool cancel;

View File

@ -71,6 +71,11 @@ struct JitState
AFTER_REWIND_PC_BAD_STATE = 0x02,
};
JitState()
: prefixSFlag(PREFIX_UNKNOWN),
prefixTFlag(PREFIX_UNKNOWN),
prefixDFlag(PREFIX_UNKNOWN) {}
u32 compilerPC;
u32 blockStart;
int nextExit;