Fixed use of selector override with POP r/m - GTA now works again.

This commit is contained in:
TomW 2013-10-31 19:57:25 +00:00
commit f478ed3b96
2 changed files with 46 additions and 10 deletions

View file

@ -63,6 +63,38 @@ static inline uint32_t POP_L()
return ret;
}
static inline uint16_t POP_W_seg(uint32_t seg)
{
uint16_t ret;
if (stack32)
{
ret = readmemw(seg, ESP); if (abrt) return 0;
ESP += 2;
}
else
{
ret = readmemw(seg, SP); if (abrt) return 0;
SP += 2;
}
return ret;
}
static inline uint32_t POP_L_seg(uint32_t seg)
{
uint32_t ret;
if (stack32)
{
ret = readmeml(seg, ESP); if (abrt) return 0;
ESP += 4;
}
else
{
ret = readmeml(seg, SP); if (abrt) return 0;
SP += 4;
}
return ret;
}
#include "x86_ops_arith.h"
#include "x86_ops_atomic.h"
#include "x86_ops_bcd.h"