summaryrefslogtreecommitdiffstats
path: root/src/common/x64
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-03-09 08:25:00 +0100
committerLioncash <mathew1800@gmail.com>2016-03-09 08:25:00 +0100
commit77bcdafc94927afeb4555be42d4b638dfb1470f2 (patch)
tree83e8f72d2381413a404c045ade06c7cdda794885 /src/common/x64
parentemitter: Remove unimplemented prototype (diff)
downloadyuzu-77bcdafc94927afeb4555be42d4b638dfb1470f2.tar
yuzu-77bcdafc94927afeb4555be42d4b638dfb1470f2.tar.gz
yuzu-77bcdafc94927afeb4555be42d4b638dfb1470f2.tar.bz2
yuzu-77bcdafc94927afeb4555be42d4b638dfb1470f2.tar.lz
yuzu-77bcdafc94927afeb4555be42d4b638dfb1470f2.tar.xz
yuzu-77bcdafc94927afeb4555be42d4b638dfb1470f2.tar.zst
yuzu-77bcdafc94927afeb4555be42d4b638dfb1470f2.zip
Diffstat (limited to 'src/common/x64')
-rw-r--r--src/common/x64/emitter.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/x64/emitter.h b/src/common/x64/emitter.h
index 05a269859..0efc0d202 100644
--- a/src/common/x64/emitter.h
+++ b/src/common/x64/emitter.h
@@ -157,6 +157,8 @@ class XEmitter;
// RIP addressing does not benefit from micro op fusion on Core arch
struct OpArg
{
+ friend class XEmitter;
+
OpArg() {} // dummy op arg, used for storage
OpArg(u64 _offset, int _scale, X64Reg rmReg = RAX, X64Reg scaledReg = RAX)
{
@@ -176,9 +178,6 @@ struct OpArg
void WriteVex(XEmitter* emit, X64Reg regOp1, X64Reg regOp2, int L, int pp, int mmmmm, int W = 0) const;
void WriteRest(XEmitter *emit, int extraBytes=0, X64Reg operandReg=INVALID_REG, bool warn_64bit_offset = true) const;
void WriteSingleByteOp(XEmitter *emit, u8 op, X64Reg operandReg, int bits);
- // This one is public - must be written to
- u64 offset; // use RIP-relative as much as possible - 64-bit immediates are not available.
- u16 operandReg;
void WriteNormalOp(XEmitter *emit, bool toRM, NormalOp op, const OpArg &operand, int bits) const;
bool IsImm() const {return scale == SCALE_IMM8 || scale == SCALE_IMM16 || scale == SCALE_IMM32 || scale == SCALE_IMM64;}
@@ -240,6 +239,8 @@ private:
u8 scale;
u16 offsetOrBaseReg;
u16 indexReg;
+ u64 offset; // use RIP-relative as much as possible - 64-bit immediates are not available.
+ u16 operandReg;
};
inline OpArg M(const void *ptr) {return OpArg((u64)ptr, (int)SCALE_RIP);}