fixed a couple remaining 64-bit pointer truncations

This commit is contained in:
unknown 2015-10-30 16:08:18 -04:00
parent 354cf1bf5d
commit a53526163b
2 changed files with 12 additions and 4 deletions

View File

@ -754,9 +754,10 @@ void CompilerLinkBlocks(void) {
x86_SetBranch32b(RecompPos - 4, KnownCode);
}
void CompilerRSPBlock ( void ) {
DWORD Count, Padding, X86BaseAddress = (DWORD)RecompPos;
void CompilerRSPBlock(void)
{
BYTE * IMEM_SAVE = (BYTE *)malloc(0x1000);
const size_t X86BaseAddress = (size_t)RecompPos;
NextInstruction = NORMAL;
CompilePC = *PrgCount;
@ -766,8 +767,11 @@ void CompilerRSPBlock ( void ) {
CurrentBlock.CurrPC = CompilePC;
/* Align the block to a boundary */
if (X86BaseAddress & 7) {
Padding = (8 - (X86BaseAddress & 7)) & 7;
if (X86BaseAddress & 7)
{
register size_t Count;
const size_t Padding = (8 - (X86BaseAddress & 7)) & 7;
for (Count = 0; Count < Padding; Count++) {
CPU_Message("%08X: nop", RecompPos);
*(RecompPos++) = 0x90;

View File

@ -427,7 +427,11 @@ void BreakPointNotification (const char * const FileName, const int LineNumber)
void X86BreakPoint (LPCSTR FileName, int LineNumber) {
Pushad();
PushImm32("LineNumber",LineNumber);
#if defined(_M_IX86)
PushImm32("FileName",(DWORD)FileName);
#else
DisplayError("PushImm64\nUnimplemented.");
#endif
Call_Direct(BreakPointNotification,"BreakPointNotification");
AddConstToX86Reg(x86_ESP, 8);
Popad();