mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Revert "x64: build a Position-Independent Executable (PIE)"
This commit is contained in:
@ -43,18 +43,6 @@
|
||||
// to address as much as possible in a one-byte offset form.
|
||||
#define RPPCSTATE RBP
|
||||
|
||||
namespace Gen
|
||||
{
|
||||
|
||||
inline OpArg MPIC(const void* address, X64Reg scale_reg, int scale = SCALE_1)
|
||||
{
|
||||
ptrdiff_t offset = PPCSTATE_OFS(address);
|
||||
_dbg_assert_(DYNA_REC, FitsInS32(offset));
|
||||
return MComplex(RPPCSTATE, scale_reg, scale, offset);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Use these to control the instruction selection
|
||||
// #define INSTRUCTION_START FallBackToInterpreter(inst); return;
|
||||
// #define INSTRUCTION_START PPCTables::CountInstruction(inst);
|
||||
|
@ -173,11 +173,11 @@ private:
|
||||
u32 all_ones = (1ULL << sbits) - 1;
|
||||
if ((all_ones & mask) == all_ones)
|
||||
{
|
||||
MoveOpArgToReg(sbits, MatR(RSCRATCH));
|
||||
MoveOpArgToReg(sbits, MDisp(RSCRATCH, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_code->MOVZX(32, sbits, m_dst_reg, MatR(RSCRATCH));
|
||||
m_code->MOVZX(32, sbits, m_dst_reg, MDisp(RSCRATCH, 0));
|
||||
m_code->AND(32, R(m_dst_reg), Imm32(mask));
|
||||
if (m_sign_extend)
|
||||
m_code->MOVSX(32, sbits, m_dst_reg, R(m_dst_reg));
|
||||
|
@ -9,15 +9,15 @@
|
||||
#include "Common/BitSet.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
#include "Common/x64Emitter.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
|
||||
namespace MMIO { class Mapping; }
|
||||
|
||||
// We offset by 0x80 because the range of one byte memory offsets is
|
||||
// -0x80..0x7f.
|
||||
#define PPCSTATE_BASE ((u8*)&PowerPC::ppcState + 0x80)
|
||||
#define PPCSTATE_OFS(x) ((u8*)(x) - PPCSTATE_BASE)
|
||||
#define PPCSTATE(x) MDisp(RPPCSTATE, PPCSTATE_OFS(&PowerPC::ppcState.x))
|
||||
#define PPCSTATE(x) MDisp(RPPCSTATE, \
|
||||
(int) ((char *) &PowerPC::ppcState.x - (char *) &PowerPC::ppcState) - 0x80)
|
||||
// In case you want to disable the ppcstate register:
|
||||
// #define PPCSTATE(x) M(&PowerPC::ppcState.x)
|
||||
#define PPCSTATE_LR PPCSTATE(spr[SPR_LR])
|
||||
#define PPCSTATE_CTR PPCSTATE(spr[SPR_CTR])
|
||||
#define PPCSTATE_SRR0 PPCSTATE(spr[SPR_SRR0])
|
||||
@ -31,7 +31,7 @@ private:
|
||||
bool m_enabled = false;
|
||||
public:
|
||||
bool Enabled() { return m_enabled; }
|
||||
void Init(int size) { AllocCodeSpace(size, PPCSTATE_BASE); m_enabled = true; }
|
||||
void Init(int size) { AllocCodeSpace(size); m_enabled = true; }
|
||||
void Shutdown() { FreeCodeSpace(); m_enabled = false; }
|
||||
};
|
||||
|
||||
|
@ -22,7 +22,7 @@ using namespace Gen;
|
||||
|
||||
void TrampolineCache::Init(int size)
|
||||
{
|
||||
AllocCodeSpace(size, PPCSTATE_BASE);
|
||||
AllocCodeSpace(size);
|
||||
}
|
||||
|
||||
void TrampolineCache::ClearCodeSpace()
|
||||
|
Reference in New Issue
Block a user