From 5db79dcf118da092f466b0dbed0e063f465aa812 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 29 Jun 2014 18:55:23 -0700 Subject: [PATCH 1/3] Fix some missing semicolons on log statements. --- Core/HLE/sceDisplay.cpp | 4 ++-- Core/HLE/sceIo.cpp | 2 +- Core/HLE/sceKernelModule.cpp | 10 +++++----- Core/HLE/sceSas.cpp | 6 +++--- Core/MIPS/ARM/ArmJit.cpp | 2 +- Core/MIPS/x86/Jit.cpp | 2 +- GPU/Directx9/FramebufferDX9.cpp | 12 ++++++------ GPU/Directx9/VertexDecoderDX9.cpp | 5 +++-- GPU/GLES/Framebuffer.cpp | 6 +++--- UI/DevScreens.cpp | 2 +- 10 files changed, 26 insertions(+), 25 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index f0813caf16..e1a8b48a03 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -335,7 +335,7 @@ void __DisplayVblankBeginCallback(SceUID threadID, SceUID prevCallbackId) { } vblankPausedWaits[pauseKey] = vCount + waitData.vcountUnblock; - DEBUG_LOG(SCEDISPLAY, "sceDisplayWaitVblankCB: Suspending vblank wait for callback") + DEBUG_LOG(SCEDISPLAY, "sceDisplayWaitVblankCB: Suspending vblank wait for callback"); } void __DisplayVblankEndCallback(SceUID threadID, SceUID prevCallbackId) { @@ -356,7 +356,7 @@ void __DisplayVblankEndCallback(SceUID threadID, SceUID prevCallbackId) { // Still have to wait a bit longer. vblankWaitingThreads.push_back(WaitVBlankInfo(__KernelGetCurThread(), vcountUnblock - vCount)); - DEBUG_LOG(SCEDISPLAY, "sceDisplayWaitVblankCB: Resuming vblank wait from callback") + DEBUG_LOG(SCEDISPLAY, "sceDisplayWaitVblankCB: Resuming vblank wait from callback"); } // TODO: Also average actualFps diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 42467ae9c5..97e726a1d3 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -366,7 +366,7 @@ void __IoSyncNotify(u64 userdata, int cyclesLate) { void __IoAsyncBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, -1); if (result == HLEKernel::WAIT_CB_SUCCESS) { - DEBUG_LOG(SCEIO, "sceIoWaitAsync: Suspending wait for callback") + DEBUG_LOG(SCEIO, "sceIoWaitAsync: Suspending wait for callback"); } else if (result == HLEKernel::WAIT_CB_BAD_WAIT_ID) { WARN_LOG_REPORT(SCEIO, "sceIoWaitAsync: beginning callback with bad wait id?"); } diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index aca52c6793..8307b642f5 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -531,10 +531,10 @@ void WriteVarSymbol(u32 exportAddress, u32 relocAddress, u8 type, bool reverse = // The ABI requires that these come in pairs, at least. if (lastHI16Relocs.empty()) { - ERROR_LOG_REPORT(LOADER, "LO16 without any HI16 variable import at %08x for %08x", relocAddress, exportAddress) + ERROR_LOG_REPORT(LOADER, "LO16 without any HI16 variable import at %08x for %08x", relocAddress, exportAddress); // Try to process at least the low relocation... } else if (lastHI16ExportAddress != exportAddress) { - ERROR_LOG_REPORT(LOADER, "HI16 and LO16 imports do not match at %08x for %08x (should be %08x)", relocAddress, lastHI16ExportAddress, exportAddress) + ERROR_LOG_REPORT(LOADER, "HI16 and LO16 imports do not match at %08x for %08x (should be %08x)", relocAddress, lastHI16ExportAddress, exportAddress); } else { // Process each of the HI16. Usually there's only one. for (auto it = lastHI16Relocs.begin(), end = lastHI16Relocs.end(); it != end; ++it) @@ -1365,7 +1365,7 @@ Module *__KernelLoadModule(u8 *fileptr, SceKernelLMOption *options, std::string size_t size = offsets[6] - offsets[5]; temp = new u8[size]; memcpy(temp, fileptr + offsets[5], size); - INFO_LOG(LOADER, "Elf unaligned, aligning!") + INFO_LOG(LOADER, "Elf unaligned, aligning!"); } module = __KernelLoadELFFromPtr(temp ? temp : fileptr + offsets[5], PSP_GetDefaultLoadAddress(), error_string, &magic); @@ -1621,14 +1621,14 @@ u32 sceKernelLoadModule(const char *name, u32 flags, u32 optionAddr) if (info.name == "BOOT.BIN") { - NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we try __KernelLoadExec", name) + NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we try __KernelLoadExec", name); return __KernelLoadExec(name, 0, &error_string); } else { // Module was blacklisted or couldn't be decrypted, which means it's a kernel module we don't want to run.. // Let's just act as if it worked. - NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we lie about success", name) + NOTICE_LOG(LOADER, "Module %s is blacklisted or undecryptable - we lie about success", name); return 1; } } diff --git a/Core/HLE/sceSas.cpp b/Core/HLE/sceSas.cpp index 84c71b1a59..08a4583bda 100644 --- a/Core/HLE/sceSas.cpp +++ b/Core/HLE/sceSas.cpp @@ -248,7 +248,7 @@ u32 sceSasGetPauseFlag(u32 core) { pauseFlag |= (1 << i); } - DEBUG_LOG(SCESAS, "sceSasGetPauseFlag(%08x)", pauseFlag) + DEBUG_LOG(SCESAS, "sceSasGetPauseFlag(%08x)", pauseFlag); return pauseFlag; } @@ -376,11 +376,11 @@ u32 sceSasSetADSR(u32 core, int voiceNum, int flag, int a, int d, int s, int r) // Create a mask like flag for the invalid values. int invalid = (a < 0 ? 0x1 : 0) | (d < 0 ? 0x2 : 0) | (s < 0 ? 0x4 : 0) | (r < 0 ? 0x8 : 0); if (invalid & flag) { - WARN_LOG_REPORT(SCESAS, "sceSasSetADSR(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid value", core, voiceNum, flag, a, d, s, r) + WARN_LOG_REPORT(SCESAS, "sceSasSetADSR(%08x, %i, %i, %08x, %08x, %08x, %08x): invalid value", core, voiceNum, flag, a, d, s, r); return ERROR_SAS_INVALID_ADSR_RATE; } - DEBUG_LOG(SCESAS, "0=sceSasSetADSR(%08x, %i, %i, %08x, %08x, %08x, %08x)", core, voiceNum, flag, a, d, s, r) + DEBUG_LOG(SCESAS, "0=sceSasSetADSR(%08x, %i, %i, %08x, %08x, %08x, %08x)", core, voiceNum, flag, a, d, s, r); SasVoice &v = sas->voices[voiceNum]; if ((flag & 0x1) != 0) v.envelope.attackRate = a; diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 3e6d8134b4..450551ba98 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -162,7 +162,7 @@ void Jit::EatInstruction(MIPSOpcode op) { ERROR_LOG_REPORT_ONCE(ateDelaySlot, JIT, "Ate a branch op."); } if (js.inDelaySlot) { - ERROR_LOG_REPORT_ONCE(ateInDelaySlot, JIT, "Ate an instruction inside a delay slot.") + ERROR_LOG_REPORT_ONCE(ateInDelaySlot, JIT, "Ate an instruction inside a delay slot."); } js.numInstructions++; diff --git a/Core/MIPS/x86/Jit.cpp b/Core/MIPS/x86/Jit.cpp index 929481c7ba..e907b56af8 100644 --- a/Core/MIPS/x86/Jit.cpp +++ b/Core/MIPS/x86/Jit.cpp @@ -260,7 +260,7 @@ void Jit::EatInstruction(MIPSOpcode op) ERROR_LOG_REPORT_ONCE(ateDelaySlot, JIT, "Ate a branch op."); } if (js.inDelaySlot) { - ERROR_LOG_REPORT_ONCE(ateInDelaySlot, JIT, "Ate an instruction inside a delay slot.") + ERROR_LOG_REPORT_ONCE(ateInDelaySlot, JIT, "Ate an instruction inside a delay slot."); } CheckJitBreakpoint(js.compilerPC + 4, 0); diff --git a/GPU/Directx9/FramebufferDX9.cpp b/GPU/Directx9/FramebufferDX9.cpp index 92a4bec3a0..aa85937bf6 100644 --- a/GPU/Directx9/FramebufferDX9.cpp +++ b/GPU/Directx9/FramebufferDX9.cpp @@ -948,8 +948,8 @@ void FramebufferManagerDX9::DecimateFBOs() { } if (age > FBO_OLD_AGE) { - INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age) - DestroyFramebuf(vfb); + INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age); + DestroyFramebuf(vfb); vfbs_.erase(vfbs_.begin() + i--); } } @@ -959,8 +959,8 @@ void FramebufferManagerDX9::DecimateFBOs() { VirtualFramebufferDX9 *vfb = bvfbs_[i]; int age = frameLastFramebufUsed - vfb->last_frame_render; if (age > FBO_OLD_AGE) { - INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age) - DestroyFramebuf(vfb); + INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age); + DestroyFramebuf(vfb); bvfbs_.erase(bvfbs_.begin() + i--); } } @@ -1006,8 +1006,8 @@ void FramebufferManagerDX9::UpdateFromMemory(u32 addr, int size) { needUnbind = true; DrawPixels(Memory::GetPointer(addr), vfb->format, vfb->fb_stride); } else { - INFO_LOG(SCEGE, "Invalidating FBO for %08x (%i x %i x %i)", vfb->fb_address, vfb->width, vfb->height, vfb->format) - DestroyFramebuf(vfb); + INFO_LOG(SCEGE, "Invalidating FBO for %08x (%i x %i x %i)", vfb->fb_address, vfb->width, vfb->height, vfb->format); + DestroyFramebuf(vfb); vfbs_.erase(vfbs_.begin() + i--); } } diff --git a/GPU/Directx9/VertexDecoderDX9.cpp b/GPU/Directx9/VertexDecoderDX9.cpp index 16f9600195..d60f51e506 100644 --- a/GPU/Directx9/VertexDecoderDX9.cpp +++ b/GPU/Directx9/VertexDecoderDX9.cpp @@ -906,8 +906,9 @@ void VertexDecoderDX9::SetVertexType(u32 fmt) { } decFmt.posoff = decOff; decOff += DecFmtSize(decFmt.posfmt); - } else - ERROR_LOG_REPORT(G3D, "Vertices without position found") + } else { + ERROR_LOG_REPORT(G3D, "Vertices without position found"); + } decFmt.stride = decOff; diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 84ff3920c9..fb152c5fdb 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -2003,7 +2003,7 @@ void FramebufferManager::DecimateFBOs() { } if (age > FBO_OLD_AGE) { - INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age) + INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age); DestroyFramebuf(vfb); vfbs_.erase(vfbs_.begin() + i--); } @@ -2024,7 +2024,7 @@ void FramebufferManager::DecimateFBOs() { VirtualFramebuffer *vfb = bvfbs_[i]; int age = frameLastFramebufUsed - vfb->last_frame_render; if (age > FBO_OLD_AGE) { - INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age) + INFO_LOG(SCEGE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age); DestroyFramebuf(vfb); bvfbs_.erase(bvfbs_.begin() + i--); } @@ -2078,7 +2078,7 @@ void FramebufferManager::UpdateFromMemory(u32 addr, int size, bool safe) { DrawPixels(vfb, 0, 0, Memory::GetPointer(addr | 0x04000000), fmt, vfb->fb_stride, vfb->width, vfb->height); SetColorUpdated(vfb); } else { - INFO_LOG(SCEGE, "Invalidating FBO for %08x (%i x %i x %i)", vfb->fb_address, vfb->width, vfb->height, vfb->format) + INFO_LOG(SCEGE, "Invalidating FBO for %08x (%i x %i x %i)", vfb->fb_address, vfb->width, vfb->height, vfb->format); DestroyFramebuf(vfb); vfbs_.erase(vfbs_.begin() + i--); } diff --git a/UI/DevScreens.cpp b/UI/DevScreens.cpp index 815179d682..71908a2d04 100644 --- a/UI/DevScreens.cpp +++ b/UI/DevScreens.cpp @@ -506,7 +506,7 @@ UI::EventReturn JitCompareScreen::OnRandomVFPUBlock(UI::EventParams &e) { if (MIPSGetInfo(opcode) & IS_VFPU) { char temp[256]; MIPSDisAsm(opcode, addr, temp); - INFO_LOG(HLE, "Stopping VFPU instruction: %s", temp) + INFO_LOG(HLE, "Stopping VFPU instruction: %s", temp); anyVFPU = true; break; } From 0078faef8b0e1da5a731cb0c5bbbd89efb98eb4a Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 29 Jun 2014 19:02:41 -0700 Subject: [PATCH 2/3] Fix some log semicolons that might affect logic. But, these should all be right. --- Core/HLE/sceKernelMsgPipe.cpp | 23 +++++++++------------ Core/HLE/sceKernelThread.cpp | 36 ++++++++++++++++----------------- Core/MIPS/ARM/ArmCompBranch.cpp | 16 +++++++-------- Core/MIPS/x86/CompBranch.cpp | 16 +++++++-------- 4 files changed, 40 insertions(+), 51 deletions(-) diff --git a/Core/HLE/sceKernelMsgPipe.cpp b/Core/HLE/sceKernelMsgPipe.cpp index 7799569969..f3b3a5a0b7 100644 --- a/Core/HLE/sceKernelMsgPipe.cpp +++ b/Core/HLE/sceKernelMsgPipe.cpp @@ -603,30 +603,26 @@ bool __KernelCheckResumeMsgPipeReceive(MsgPipe *m, MsgPipeWaitingThread &waitInf return true; } -void __KernelMsgPipeEndCallback(SceUID threadID, SceUID prevCallbackId) -{ +void __KernelMsgPipeEndCallback(SceUID threadID, SceUID prevCallbackId) { u32 error; u32 waitValue = __KernelGetWaitValue(threadID, error); u32 timeoutPtr = __KernelGetWaitTimeoutPtr(threadID, error); SceUID uid = __KernelGetWaitID(threadID, WAITTYPE_MSGPIPE, error); MsgPipe *ko = uid == 0 ? NULL : kernelObjects.Get(uid, error); - if (ko == NULL) - { + if (ko == NULL) { ERROR_LOG_REPORT(SCEKERNEL, "__KernelMsgPipeEndCallback: Invalid object"); return; } - switch (waitValue) - { + switch (waitValue) { case MSGPIPE_WAIT_VALUE_SEND: { MsgPipeWaitingThread dummy; auto result = HLEKernel::WaitEndCallback(threadID, prevCallbackId, waitTimer, __KernelCheckResumeMsgPipeSend, dummy, ko->sendWaitingThreads, ko->pausedSendWaits); - if (result == HLEKernel::WAIT_CB_RESUMED_WAIT) - DEBUG_LOG(SCEKERNEL, "sceKernelSendMsgPipeCB: Resuming wait from callback") - else if (result == HLEKernel::WAIT_CB_TIMED_OUT) - { + if (result == HLEKernel::WAIT_CB_RESUMED_WAIT) { + DEBUG_LOG(SCEKERNEL, "sceKernelSendMsgPipeCB: Resuming wait from callback"); + } else if (result == HLEKernel::WAIT_CB_TIMED_OUT) { // It was re-added to the the waiting threads list, but it timed out. Let's remove it. ko->RemoveSendWaitingThread(threadID); } @@ -637,10 +633,9 @@ void __KernelMsgPipeEndCallback(SceUID threadID, SceUID prevCallbackId) { MsgPipeWaitingThread dummy; auto result = HLEKernel::WaitEndCallback(threadID, prevCallbackId, waitTimer, __KernelCheckResumeMsgPipeReceive, dummy, ko->receiveWaitingThreads, ko->pausedReceiveWaits); - if (result == HLEKernel::WAIT_CB_RESUMED_WAIT) - DEBUG_LOG(SCEKERNEL, "sceKernelReceiveMsgPipeCB: Resuming wait from callback") - else if (result == HLEKernel::WAIT_CB_TIMED_OUT) - { + if (result == HLEKernel::WAIT_CB_RESUMED_WAIT) { + DEBUG_LOG(SCEKERNEL, "sceKernelReceiveMsgPipeCB: Resuming wait from callback"); + } else if (result == HLEKernel::WAIT_CB_TIMED_OUT) { // It was re-added to the the waiting threads list, but it timed out. Let's remove it. ko->RemoveReceiveWaitingThread(threadID); } diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index d916f4ed84..384f3e157d 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -2507,32 +2507,30 @@ int sceKernelChangeCurrentThreadAttr(u32 clearAttr, u32 setAttr) return 0; } -int sceKernelChangeThreadPriority(SceUID threadID, int priority) -{ - if (threadID == 0) +int sceKernelChangeThreadPriority(SceUID threadID, int priority) { + if (threadID == 0) { threadID = currentThread; + } + // 0 means the current (running) thread's priority, not target's. - if (priority == 0) - { + if (priority == 0) { Thread *cur = __GetCurrentThread(); - if (!cur) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelChangeThreadPriority(%i, %i): no current thread?", threadID, priority) - else + if (!cur) { + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelChangeThreadPriority(%i, %i): no current thread?", threadID, priority); + } else { priority = cur->nt.currentPriority; + } } u32 error; Thread *thread = kernelObjects.Get(threadID, error); - if (thread) - { - if (thread->isStopped()) - { + if (thread) { + if (thread->isStopped()) { ERROR_LOG_REPORT(SCEKERNEL, "sceKernelChangeThreadPriority(%i, %i): thread is dormant", threadID, priority); return SCE_KERNEL_ERROR_DORMANT; } - if (priority < 0x08 || priority > 0x77) - { + if (priority < 0x08 || priority > 0x77) { ERROR_LOG_REPORT(SCEKERNEL, "sceKernelChangeThreadPriority(%i, %i): bogus priority", threadID, priority); return SCE_KERNEL_ERROR_ILLEGAL_PRIORITY; } @@ -2544,17 +2542,17 @@ int sceKernelChangeThreadPriority(SceUID threadID, int priority) thread->nt.currentPriority = priority; threadReadyQueue.prepare(thread->nt.currentPriority); - if (thread->isRunning()) + if (thread->isRunning()) { thread->nt.status = (thread->nt.status & ~THREADSTATUS_RUNNING) | THREADSTATUS_READY; - if (thread->isReady()) + } + if (thread->isReady()) { threadReadyQueue.push_back(thread->nt.currentPriority, threadID); + } hleEatCycles(450); hleReSchedule("change thread priority"); return 0; - } - else - { + } else { ERROR_LOG(SCEKERNEL, "%08x=sceKernelChangeThreadPriority(%i, %i) failed - no such thread", error, threadID, priority); return error; } diff --git a/Core/MIPS/ARM/ArmCompBranch.cpp b/Core/MIPS/ARM/ArmCompBranch.cpp index f186574e4e..77270651a6 100644 --- a/Core/MIPS/ARM/ArmCompBranch.cpp +++ b/Core/MIPS/ARM/ArmCompBranch.cpp @@ -398,8 +398,7 @@ void Jit::Comp_VBranch(MIPSOpcode op) } } -void Jit::Comp_Jump(MIPSOpcode op) -{ +void Jit::Comp_Jump(MIPSOpcode op) { if (js.inDelaySlot) { ERROR_LOG_REPORT(JIT, "Branch in Jump delay slot at %08x in block starting at %08x", js.compilerPC, js.blockStart); return; @@ -408,18 +407,17 @@ void Jit::Comp_Jump(MIPSOpcode op) u32 targetAddr = (js.compilerPC & 0xF0000000) | off; // Might be a stubbed address or something? - if (!Memory::IsValidAddress(targetAddr)) - { - if (js.nextExit == 0) - ERROR_LOG_REPORT(JIT, "Jump to invalid address: %08x", targetAddr) - else + if (!Memory::IsValidAddress(targetAddr)) { + if (js.nextExit == 0) { + ERROR_LOG_REPORT(JIT, "Jump to invalid address: %08x", targetAddr); + } else { js.compiling = false; + } // TODO: Mark this block dirty or something? May be indication it will be changed by imports. return; } - switch (op >> 26) - { + switch (op >> 26) { case 2: //j CompileDelaySlot(DELAYSLOT_NICE); if (jo.continueJumps && js.numInstructions < jo.continueMaxInstructions) { diff --git a/Core/MIPS/x86/CompBranch.cpp b/Core/MIPS/x86/CompBranch.cpp index 165943a016..3849c58ffe 100644 --- a/Core/MIPS/x86/CompBranch.cpp +++ b/Core/MIPS/x86/CompBranch.cpp @@ -516,8 +516,7 @@ void Jit::Comp_VBranch(MIPSOpcode op) } } -void Jit::Comp_Jump(MIPSOpcode op) -{ +void Jit::Comp_Jump(MIPSOpcode op) { CONDITIONAL_LOG; if (js.inDelaySlot) { ERROR_LOG_REPORT(JIT, "Branch in Jump delay slot at %08x in block starting at %08x", js.compilerPC, js.blockStart); @@ -527,18 +526,17 @@ void Jit::Comp_Jump(MIPSOpcode op) u32 targetAddr = (js.compilerPC & 0xF0000000) | off; // Might be a stubbed address or something? - if (!Memory::IsValidAddress(targetAddr)) - { - if (js.nextExit == 0) - ERROR_LOG_REPORT(JIT, "Jump to invalid address: %08x", targetAddr) - else + if (!Memory::IsValidAddress(targetAddr)) { + if (js.nextExit == 0) { + ERROR_LOG_REPORT(JIT, "Jump to invalid address: %08x", targetAddr); + } else { js.compiling = false; + } // TODO: Mark this block dirty or something? May be indication it will be changed by imports. return; } - switch (op >> 26) - { + switch (op >> 26) { case 2: //j CompileDelaySlot(DELAYSLOT_NICE); if (jo.continueJumps && js.numInstructions < jo.continueMaxInstructions) From 0a33eb4c42cfd599b908484f7dcb0e4bcd9d1137 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 29 Jun 2014 19:03:35 -0700 Subject: [PATCH 3/3] Fix missing log semicolons only affecting logging. --- Common/Log.h | 12 ++++++------ Core/HLE/sceKernelEventFlag.cpp | 4 ++-- Core/HLE/sceKernelMbx.cpp | 4 ++-- Core/HLE/sceKernelMemory.cpp | 10 +++++----- Core/HLE/sceKernelModule.cpp | 2 +- Core/HLE/sceKernelMsgPipe.cpp | 8 ++++---- Core/HLE/sceKernelMutex.cpp | 4 ++-- Core/HLE/sceKernelSemaphore.cpp | 10 +++++----- Core/HLE/sceKernelThread.cpp | 4 ++-- Core/Reporting.h | 28 ++++++++++++++-------------- GPU/Directx9/GPU_DX9.cpp | 2 +- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Common/Log.h b/Common/Log.h index 695f1b83a4..2ab1057258 100644 --- a/Common/Log.h +++ b/Common/Log.h @@ -110,12 +110,12 @@ void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type, GenericLog(v, t, __FILE__, __LINE__, __VA_ARGS__); \ } -#define ERROR_LOG(t,...) { GENERIC_LOG(LogTypes::t, LogTypes::LERROR, __VA_ARGS__) } -#define WARN_LOG(t,...) { GENERIC_LOG(LogTypes::t, LogTypes::LWARNING, __VA_ARGS__) } -#define NOTICE_LOG(t,...) { GENERIC_LOG(LogTypes::t, LogTypes::LNOTICE, __VA_ARGS__) } -#define INFO_LOG(t,...) { GENERIC_LOG(LogTypes::t, LogTypes::LINFO, __VA_ARGS__) } -#define DEBUG_LOG(t,...) { GENERIC_LOG(LogTypes::t, LogTypes::LDEBUG, __VA_ARGS__) } -#define VERBOSE_LOG(t,...) { GENERIC_LOG(LogTypes::t, LogTypes::LVERBOSE, __VA_ARGS__) } +#define ERROR_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LERROR, __VA_ARGS__) } while (false) +#define WARN_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LWARNING, __VA_ARGS__) } while (false) +#define NOTICE_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LNOTICE, __VA_ARGS__) } while (false) +#define INFO_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LINFO, __VA_ARGS__) } while (false) +#define DEBUG_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LDEBUG, __VA_ARGS__) } while (false) +#define VERBOSE_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LVERBOSE, __VA_ARGS__) } while (false) #if MAX_LOGLEVEL >= DEBUG_LEVEL #define _dbg_assert_(_t_, _a_) \ diff --git a/Core/HLE/sceKernelEventFlag.cpp b/Core/HLE/sceKernelEventFlag.cpp index d9194a1525..41cb7d921b 100644 --- a/Core/HLE/sceKernelEventFlag.cpp +++ b/Core/HLE/sceKernelEventFlag.cpp @@ -207,9 +207,9 @@ void __KernelEventFlagBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, eventFlagWaitTimer); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelWaitEventFlagCB: Suspending lock wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelWaitEventFlagCB: Suspending lock wait for callback"); else if (result == HLEKernel::WAIT_CB_BAD_WAIT_DATA) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelWaitEventFlagCB: wait not found to pause for callback") + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelWaitEventFlagCB: wait not found to pause for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelWaitEventFlagCB: beginning callback with bad wait id?"); } diff --git a/Core/HLE/sceKernelMbx.cpp b/Core/HLE/sceKernelMbx.cpp index 502e05a0a7..37706c39d5 100644 --- a/Core/HLE/sceKernelMbx.cpp +++ b/Core/HLE/sceKernelMbx.cpp @@ -234,9 +234,9 @@ void __KernelMbxBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, mbxWaitTimer); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelReceiveMbxCB: Suspending mbx wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelReceiveMbxCB: Suspending mbx wait for callback"); else if (result == HLEKernel::WAIT_CB_BAD_WAIT_DATA) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelReceiveMbxCB: wait not found to pause for callback") + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelReceiveMbxCB: wait not found to pause for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelReceiveMbxCB: beginning callback with bad wait id?"); } diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index 561289fed6..a82fceeecc 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -517,9 +517,9 @@ void __KernelFplBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, fplWaitTimer); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelAllocateFplCB: Suspending fpl wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelAllocateFplCB: Suspending fpl wait for callback"); else if (result == HLEKernel::WAIT_CB_BAD_WAIT_DATA) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelAllocateFplCB: wait not found to pause for callback") + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelAllocateFplCB: wait not found to pause for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelAllocateFplCB: beginning callback with bad wait id?"); } @@ -1136,7 +1136,7 @@ int sceKernelPrintf(const char *formatString) result.resize(result.size() - 1); if (supported) - INFO_LOG(SCEKERNEL, "sceKernelPrintf: %s", result.c_str()) + INFO_LOG(SCEKERNEL, "sceKernelPrintf: %s", result.c_str()); else ERROR_LOG(SCEKERNEL, "UNIMPL sceKernelPrintf(%s, %08x, %08x, %08x)", format.c_str(), PARAM(1), PARAM(2), PARAM(3)); return 0; @@ -1381,9 +1381,9 @@ void __KernelVplBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, vplWaitTimer); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelAllocateVplCB: Suspending vpl wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelAllocateVplCB: Suspending vpl wait for callback"); else if (result == HLEKernel::WAIT_CB_BAD_WAIT_DATA) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelAllocateVplCB: wait not found to pause for callback") + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelAllocateVplCB: wait not found to pause for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelAllocateVplCB: beginning callback with bad wait id?"); } diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 8307b642f5..0ff8b6859e 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -1984,7 +1984,7 @@ u32 sceKernelGetModuleIdByAddress(u32 moduleAddr) kernelObjects.Iterate(&__GetModuleIdByAddressIterator, &state); if (state.result == (SceUID)SCE_KERNEL_ERROR_UNKNOWN_MODULE) - ERROR_LOG(SCEMODULE, "sceKernelGetModuleIdByAddress(%08x): module not found", moduleAddr) + ERROR_LOG(SCEMODULE, "sceKernelGetModuleIdByAddress(%08x): module not found", moduleAddr); else DEBUG_LOG(SCEMODULE, "%x=sceKernelGetModuleIdByAddress(%08x)", state.result, moduleAddr); return state.result; diff --git a/Core/HLE/sceKernelMsgPipe.cpp b/Core/HLE/sceKernelMsgPipe.cpp index f3b3a5a0b7..ef4ecb3e28 100644 --- a/Core/HLE/sceKernelMsgPipe.cpp +++ b/Core/HLE/sceKernelMsgPipe.cpp @@ -534,9 +534,9 @@ void __KernelMsgPipeBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, waitTimer, ko->sendWaitingThreads, ko->pausedSendWaits, timeoutPtr != 0); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelSendMsgPipeCB: Suspending wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelSendMsgPipeCB: Suspending wait for callback"); else if (result == HLEKernel::WAIT_CB_BAD_WAIT_DATA) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelSendMsgPipeCB: wait not found to pause for callback") + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelSendMsgPipeCB: wait not found to pause for callback"); } else WARN_LOG_REPORT(SCEKERNEL, "sceKernelSendMsgPipeCB: beginning callback with bad wait id?"); @@ -547,9 +547,9 @@ void __KernelMsgPipeBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, waitTimer, ko->receiveWaitingThreads, ko->pausedReceiveWaits, timeoutPtr != 0); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelReceiveMsgPipeCB: Suspending wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelReceiveMsgPipeCB: Suspending wait for callback"); else if (result == HLEKernel::WAIT_CB_BAD_WAIT_DATA) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelReceiveMsgPipeCB: wait not found to pause for callback") + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelReceiveMsgPipeCB: wait not found to pause for callback"); } else WARN_LOG_REPORT(SCEKERNEL, "sceKernelReceiveMsgPipeCB: beginning callback with bad wait id?"); diff --git a/Core/HLE/sceKernelMutex.cpp b/Core/HLE/sceKernelMutex.cpp index 19946ecd4c..77a2c857d3 100644 --- a/Core/HLE/sceKernelMutex.cpp +++ b/Core/HLE/sceKernelMutex.cpp @@ -293,7 +293,7 @@ void __KernelMutexBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, mutexWaitTimer); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelLockMutexCB: Suspending lock wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelLockMutexCB: Suspending lock wait for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelLockMutexCB: beginning callback with bad wait id?"); } @@ -915,7 +915,7 @@ void __KernelLwMutexBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, lwMutexWaitTimer); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelLockLwMutexCB: Suspending lock wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelLockLwMutexCB: Suspending lock wait for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelLockLwMutexCB: beginning callback with bad wait id?"); } diff --git a/Core/HLE/sceKernelSemaphore.cpp b/Core/HLE/sceKernelSemaphore.cpp index 1a88499c86..ae2f728d6c 100644 --- a/Core/HLE/sceKernelSemaphore.cpp +++ b/Core/HLE/sceKernelSemaphore.cpp @@ -141,7 +141,7 @@ void __KernelSemaBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, semaWaitTimer); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelWaitSemaCB: Suspending sema wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelWaitSemaCB: Suspending sema wait for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelWaitSemaCB: beginning callback with bad wait id?"); } @@ -409,9 +409,9 @@ int sceKernelWaitSema(SceUID id, int wantedCount, u32 timeoutPtr) { int result = __KernelWaitSema(id, wantedCount, timeoutPtr, false); if (result == (int)SCE_KERNEL_ERROR_ILLEGAL_COUNT) - DEBUG_LOG(SCEKERNEL, "SCE_KERNEL_ERROR_ILLEGAL_COUNT=sceKernelWaitSema(%i, %i, %i)", id, wantedCount, timeoutPtr) + DEBUG_LOG(SCEKERNEL, "SCE_KERNEL_ERROR_ILLEGAL_COUNT=sceKernelWaitSema(%i, %i, %i)", id, wantedCount, timeoutPtr); else if (result == 0) - DEBUG_LOG(SCEKERNEL, "0=sceKernelWaitSema(%i, %i, %i)", id, wantedCount, timeoutPtr) + DEBUG_LOG(SCEKERNEL, "0=sceKernelWaitSema(%i, %i, %i)", id, wantedCount, timeoutPtr); else DEBUG_LOG(SCEKERNEL, "%08x=sceKernelWaitSema(%i, %i, %i)", result, id, wantedCount, timeoutPtr); return result; @@ -421,9 +421,9 @@ int sceKernelWaitSemaCB(SceUID id, int wantedCount, u32 timeoutPtr) { int result = __KernelWaitSema(id, wantedCount, timeoutPtr, true); if (result == (int)SCE_KERNEL_ERROR_ILLEGAL_COUNT) - DEBUG_LOG(SCEKERNEL, "SCE_KERNEL_ERROR_ILLEGAL_COUNT=sceKernelWaitSemaCB(%i, %i, %i)", id, wantedCount, timeoutPtr) + DEBUG_LOG(SCEKERNEL, "SCE_KERNEL_ERROR_ILLEGAL_COUNT=sceKernelWaitSemaCB(%i, %i, %i)", id, wantedCount, timeoutPtr); else if (result == 0) - DEBUG_LOG(SCEKERNEL, "0=sceKernelWaitSemaCB(%i, %i, %i)", id, wantedCount, timeoutPtr) + DEBUG_LOG(SCEKERNEL, "0=sceKernelWaitSemaCB(%i, %i, %i)", id, wantedCount, timeoutPtr); else DEBUG_LOG(SCEKERNEL, "%08x=sceKernelWaitSemaCB(%i, %i, %i)", result, id, wantedCount, timeoutPtr); return result; diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 384f3e157d..8bee52f1f2 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -1067,9 +1067,9 @@ void __KernelThreadEndBeginCallback(SceUID threadID, SceUID prevCallbackId) { auto result = HLEKernel::WaitBeginCallback(threadID, prevCallbackId, eventThreadEndTimeout); if (result == HLEKernel::WAIT_CB_SUCCESS) - DEBUG_LOG(SCEKERNEL, "sceKernelWaitThreadEndCB: Suspending wait for callback") + DEBUG_LOG(SCEKERNEL, "sceKernelWaitThreadEndCB: Suspending wait for callback"); else if (result == HLEKernel::WAIT_CB_BAD_WAIT_DATA) - ERROR_LOG_REPORT(SCEKERNEL, "sceKernelWaitThreadEndCB: wait not found to pause for callback") + ERROR_LOG_REPORT(SCEKERNEL, "sceKernelWaitThreadEndCB: wait not found to pause for callback"); else WARN_LOG_REPORT(SCEKERNEL, "sceKernelWaitThreadEndCB: beginning callback with bad wait id?"); } diff --git a/Core/Reporting.h b/Core/Reporting.h index 31694d3168..95c6aca4e7 100644 --- a/Core/Reporting.h +++ b/Core/Reporting.h @@ -19,22 +19,22 @@ #include "Common/Log.h" #include -#define DEBUG_LOG_REPORT(t,...) { DEBUG_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } -#define ERROR_LOG_REPORT(t,...) { ERROR_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } -#define WARN_LOG_REPORT(t,...) { WARN_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } -#define NOTICE_LOG_REPORT(t,...) { NOTICE_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } -#define INFO_LOG_REPORT(t,...) { INFO_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } +#define DEBUG_LOG_REPORT(t,...) do { DEBUG_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } while (false) +#define ERROR_LOG_REPORT(t,...) do { ERROR_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } while (false) +#define WARN_LOG_REPORT(t,...) do { WARN_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } while (false) +#define NOTICE_LOG_REPORT(t,...) do { NOTICE_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } while (false) +#define INFO_LOG_REPORT(t,...) do { INFO_LOG(t, __VA_ARGS__); Reporting::ReportMessage(__VA_ARGS__); } while (false) -#define DEBUG_LOG_REPORT_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { DEBUG_LOG_REPORT(t, __VA_ARGS__); } } -#define ERROR_LOG_REPORT_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { ERROR_LOG_REPORT(t, __VA_ARGS__); } } -#define WARN_LOG_REPORT_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { WARN_LOG_REPORT(t, __VA_ARGS__); } } -#define NOTICE_LOG_REPORT_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { NOTICE_LOG_REPORT(t, __VA_ARGS__); } } -#define INFO_LOG_REPORT_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { INFO_LOG_REPORT(t, __VA_ARGS__); } } +#define DEBUG_LOG_REPORT_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { DEBUG_LOG_REPORT(t, __VA_ARGS__); } } while (false) +#define ERROR_LOG_REPORT_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { ERROR_LOG_REPORT(t, __VA_ARGS__); } } while (false) +#define WARN_LOG_REPORT_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { WARN_LOG_REPORT(t, __VA_ARGS__); } } while (false) +#define NOTICE_LOG_REPORT_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { NOTICE_LOG_REPORT(t, __VA_ARGS__); } } while (false) +#define INFO_LOG_REPORT_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { INFO_LOG_REPORT(t, __VA_ARGS__); } } while (false) -#define ERROR_LOG_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { ERROR_LOG(t, __VA_ARGS__); } } -#define WARN_LOG_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { WARN_LOG(t, __VA_ARGS__); } } -#define NOTICE_LOG_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { NOTICE_LOG(t, __VA_ARGS__); } } -#define INFO_LOG_ONCE(n,t,...) { if (Reporting::ShouldLogOnce(#n)) { INFO_LOG(t, __VA_ARGS__); } } +#define ERROR_LOG_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { ERROR_LOG(t, __VA_ARGS__); } } while (false) +#define WARN_LOG_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { WARN_LOG(t, __VA_ARGS__); } } while (false) +#define NOTICE_LOG_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { NOTICE_LOG(t, __VA_ARGS__); } } while (false) +#define INFO_LOG_ONCE(n,t,...) do { if (Reporting::ShouldLogOnce(#n)) { INFO_LOG(t, __VA_ARGS__); } } while (false) class PointerWrap; diff --git a/GPU/Directx9/GPU_DX9.cpp b/GPU/Directx9/GPU_DX9.cpp index 4ff0d0c137..4c7815fde8 100644 --- a/GPU/Directx9/GPU_DX9.cpp +++ b/GPU/Directx9/GPU_DX9.cpp @@ -1214,7 +1214,7 @@ void DIRECTX9_GPU::ExecuteOp(u32 op, u32 diff) { case GE_CMD_TEXLEVEL: if (data == 1) - WARN_LOG_REPORT_ONCE(texLevel1, G3D, "Unsupported texture level bias settings: %06x", data) + WARN_LOG_REPORT_ONCE(texLevel1, G3D, "Unsupported texture level bias settings: %06x", data); else if (data != 0) WARN_LOG_REPORT_ONCE(texLevel2, G3D, "Unsupported texture level bias settings: %06x", data); break;