Merge pull request #4946 from lioncash/naming

JitInterface: Amend ExceptionType enum value names
This commit is contained in:
Markus Wick 2017-02-23 10:23:37 +01:00 committed by GitHub
commit d4453db2ea
5 changed files with 12 additions and 13 deletions

View File

@ -98,7 +98,7 @@ void CheckGatherPipe()
UpdateGatherPipe(); UpdateGatherPipe();
// Profile where slow FIFO writes are occurring. // Profile where slow FIFO writes are occurring.
JitInterface::CompileExceptionCheck(JitInterface::ExceptionType::EXCEPTIONS_FIFO_WRITE); JitInterface::CompileExceptionCheck(JitInterface::ExceptionType::FIFOWrite);
} }
} }

View File

@ -692,7 +692,7 @@ const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer* code_buf, JitBloc
MOV(32, PPCSTATE(pc), Imm32(js.blockStart)); MOV(32, PPCSTATE(pc), Imm32(js.blockStart));
ABI_PushRegistersAndAdjustStack({}, 0); ABI_PushRegistersAndAdjustStack({}, 0);
ABI_CallFunctionC(JitInterface::CompileExceptionCheck, ABI_CallFunctionC(JitInterface::CompileExceptionCheck,
(u32)JitInterface::ExceptionType::EXCEPTIONS_PAIRED_QUANTIZE); static_cast<u32>(JitInterface::ExceptionType::PairedQuantize));
ABI_PopRegistersAndAdjustStack({}, 0); ABI_PopRegistersAndAdjustStack({}, 0);
JMP(asm_routines.dispatcherNoCheck, true); JMP(asm_routines.dispatcherNoCheck, true);
SwitchToNearCode(); SwitchToNearCode();
@ -1015,9 +1015,8 @@ void Jit64::IntializeSpeculativeConstants()
target = GetCodePtr(); target = GetCodePtr();
MOV(32, PPCSTATE(pc), Imm32(js.blockStart)); MOV(32, PPCSTATE(pc), Imm32(js.blockStart));
ABI_PushRegistersAndAdjustStack({}, 0); ABI_PushRegistersAndAdjustStack({}, 0);
ABI_CallFunctionC( ABI_CallFunctionC(JitInterface::CompileExceptionCheck,
JitInterface::CompileExceptionCheck, static_cast<u32>(JitInterface::ExceptionType::SpeculativeConstants));
static_cast<u32>(JitInterface::ExceptionType::EXCEPTIONS_SPECULATIVE_CONSTANTS));
ABI_PopRegistersAndAdjustStack({}, 0); ABI_PopRegistersAndAdjustStack({}, 0);
JMP(asm_routines.dispatcher, true); JMP(asm_routines.dispatcher, true);
SwitchToNearCode(); SwitchToNearCode();

View File

@ -699,7 +699,7 @@ void JitArm64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer* code_buf, JitBlock*
SetJumpTarget(fail); SetJumpTarget(fail);
MOVI2R(DISPATCHER_PC, js.blockStart); MOVI2R(DISPATCHER_PC, js.blockStart);
STR(INDEX_UNSIGNED, DISPATCHER_PC, PPC_REG, PPCSTATE_OFF(pc)); STR(INDEX_UNSIGNED, DISPATCHER_PC, PPC_REG, PPCSTATE_OFF(pc));
MOVI2R(W0, (u32)JitInterface::ExceptionType::EXCEPTIONS_PAIRED_QUANTIZE); MOVI2R(W0, static_cast<u32>(JitInterface::ExceptionType::PairedQuantize));
MOVP2R(X1, &JitInterface::CompileExceptionCheck); MOVP2R(X1, &JitInterface::CompileExceptionCheck);
BLR(X1); BLR(X1);
B(dispatcher); B(dispatcher);

View File

@ -220,20 +220,20 @@ void CompileExceptionCheck(ExceptionType type)
switch (type) switch (type)
{ {
case ExceptionType::EXCEPTIONS_FIFO_WRITE: case ExceptionType::FIFOWrite:
exception_addresses = &g_jit->js.fifoWriteAddresses; exception_addresses = &g_jit->js.fifoWriteAddresses;
break; break;
case ExceptionType::EXCEPTIONS_PAIRED_QUANTIZE: case ExceptionType::PairedQuantize:
exception_addresses = &g_jit->js.pairedQuantizeAddresses; exception_addresses = &g_jit->js.pairedQuantizeAddresses;
break; break;
case ExceptionType::EXCEPTIONS_SPECULATIVE_CONSTANTS: case ExceptionType::SpeculativeConstants:
exception_addresses = &g_jit->js.noSpeculativeConstantsAddresses; exception_addresses = &g_jit->js.noSpeculativeConstantsAddresses;
break; break;
} }
if (PC != 0 && (exception_addresses->find(PC)) == (exception_addresses->end())) if (PC != 0 && (exception_addresses->find(PC)) == (exception_addresses->end()))
{ {
if (type == ExceptionType::EXCEPTIONS_FIFO_WRITE) if (type == ExceptionType::FIFOWrite)
{ {
// Check in case the code has been replaced since: do we need to do this? // Check in case the code has been replaced since: do we need to do this?
int optype = GetOpInfo(PowerPC::HostRead_U32(PC))->type; int optype = GetOpInfo(PowerPC::HostRead_U32(PC))->type;

View File

@ -14,9 +14,9 @@ namespace JitInterface
{ {
enum class ExceptionType enum class ExceptionType
{ {
EXCEPTIONS_FIFO_WRITE, FIFOWrite,
EXCEPTIONS_PAIRED_QUANTIZE, PairedQuantize,
EXCEPTIONS_SPECULATIVE_CONSTANTS SpeculativeConstants
}; };
void DoState(PointerWrap& p); void DoState(PointerWrap& p);