The various _ptr helpers in asmjit are useless.
This commit is contained in:
parent
e6320dada5
commit
15cfbd3736
|
@ -1529,25 +1529,25 @@ void X64Emitter::WriteMemory(
|
||||||
GpVar tmp;
|
GpVar tmp;
|
||||||
switch (size) {
|
switch (size) {
|
||||||
case 1:
|
case 1:
|
||||||
c.mov(byte_ptr(real_address), value);
|
c.mov(byte_ptr(real_address), value.r8());
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
tmp = c.newGpVar();
|
tmp = c.newGpVar();
|
||||||
c.mov(tmp, value);
|
c.mov(tmp, value);
|
||||||
c.xchg(tmp.r8Lo(), tmp.r8Hi());
|
c.xchg(tmp.r8Lo(), tmp.r8Hi());
|
||||||
c.mov(word_ptr(real_address), tmp);
|
c.mov(word_ptr(real_address), tmp.r16());
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
tmp = c.newGpVar();
|
tmp = c.newGpVar();
|
||||||
c.mov(tmp, value);
|
c.mov(tmp, value);
|
||||||
c.bswap(tmp.r32());
|
c.bswap(tmp.r32());
|
||||||
c.mov(dword_ptr(real_address), tmp);
|
c.mov(dword_ptr(real_address), tmp.r32());
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
tmp = c.newGpVar();
|
tmp = c.newGpVar();
|
||||||
c.mov(tmp, value);
|
c.mov(tmp, value);
|
||||||
c.bswap(tmp.r64());
|
c.bswap(tmp.r64());
|
||||||
c.mov(qword_ptr(real_address), tmp);
|
c.mov(qword_ptr(real_address), tmp.r64());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
XEASSERTALWAYS();
|
XEASSERTALWAYS();
|
||||||
|
|
Loading…
Reference in New Issue