Core/PowerPC/JitCommon: Put the quantized paired/single load/store tables into the code memory.

This makes sure they are below 2G on 64bit systems,
allowing us to continue using the simpler 32bit accesses.

Fixes issue 4357 and issue 4397.



git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7465 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
pierre 2011-04-16 14:08:36 +00:00
parent 9b697ed28f
commit 4e4a613b8b
2 changed files with 12 additions and 3 deletions

View File

@ -287,6 +287,9 @@ void CommonAsmRoutines::GenQuantizedStores() {
RET();
pairedStoreQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
ReserveCodeSpace(8 * sizeof(u8*));
pairedStoreQuantized[0] = storePairedFloat;
pairedStoreQuantized[1] = storePairedIllegal;
pairedStoreQuantized[2] = storePairedIllegal;
@ -361,6 +364,9 @@ void CommonAsmRoutines::GenQuantizedSingleStores() {
SafeWriteRegToReg(EAX, ECX, 16, 0, true);
RET();
singleStoreQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
ReserveCodeSpace(8 * sizeof(u8*));
singleStoreQuantized[0] = storeSingleFloat;
singleStoreQuantized[1] = storeSingleIllegal;
singleStoreQuantized[2] = storeSingleIllegal;
@ -538,6 +544,9 @@ void CommonAsmRoutines::GenQuantizedLoads() {
UNPCKLPS(XMM0, M((void*)m_one));
RET();
pairedLoadQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
ReserveCodeSpace(16 * sizeof(u8*));
pairedLoadQuantized[0] = loadPairedFloatTwo;
pairedLoadQuantized[1] = loadPairedIllegal;
pairedLoadQuantized[2] = loadPairedIllegal;

View File

@ -56,19 +56,19 @@ public:
// Out: XMM0: Bottom two 32-bit slots hold the read value,
// converted to a pair of floats.
// Trashes: EAX ECX EDX
const u8 GC_ALIGNED16(*pairedLoadQuantized[16]);
const u8 **pairedLoadQuantized;
// In: array index: GQR to use.
// In: ECX: Address to write to.
// In: XMM0: Bottom two 32-bit slots hold the pair of floats to be written.
// Out: Nothing.
// Trashes: EAX ECX EDX
const u8 GC_ALIGNED16(*pairedStoreQuantized[8]);
const u8 **pairedStoreQuantized;
// In: array index: GQR to use.
// In: ECX: Address to write to.
// In: XMM0: Bottom 32-bit slot holds the float to be written.
const u8 GC_ALIGNED16(*singleStoreQuantized[8]);
const u8 **singleStoreQuantized;
private:
ThunkManager thunks;