2009-09-08 12:08:10 +00:00
|
|
|
/* PCSX2 - PS2 Emulator for PCs
|
2010-05-03 14:08:02 +00:00
|
|
|
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
2010-04-25 00:31:27 +00:00
|
|
|
*
|
2009-09-08 12:08:10 +00:00
|
|
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with PCSX2.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2009-07-03 00:49:40 +00:00
|
|
|
/*
|
2009-09-08 12:08:10 +00:00
|
|
|
* ix86 core v0.6.2
|
|
|
|
* Authors: linuzappz <linuzappz@pcsx.net>
|
|
|
|
* alexey silinov
|
|
|
|
* goldfinger
|
|
|
|
* zerofrog(@gmail.com)
|
|
|
|
* cottonvibes(@gmail.com)
|
|
|
|
*/
|
2009-07-03 00:49:40 +00:00
|
|
|
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
// ix86 legacy emitter functions
|
|
|
|
//------------------------------------------------------------------
|
|
|
|
|
2021-09-01 20:31:46 +00:00
|
|
|
#include "common/emitter/legacy_internal.h"
|
2022-05-09 10:28:57 +00:00
|
|
|
#include "common/Console.h"
|
2022-05-18 13:27:23 +00:00
|
|
|
#include <cassert>
|
2009-07-03 00:49:40 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
emitterT void ModRM(uint mod, uint reg, uint rm)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
// Note: Following assertions are for legacy support only.
|
|
|
|
// The new emitter performs these sanity checks during operand construction, so these
|
|
|
|
// assertions can probably be removed once all legacy emitter code has been removed.
|
|
|
|
pxAssert(mod < 4);
|
|
|
|
pxAssert(reg < 8);
|
|
|
|
pxAssert(rm < 8);
|
|
|
|
xWrite8((mod << 6) | (reg << 3) | rm);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
emitterT void SibSB(uint ss, uint index, uint base)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
// Note: Following asserts are for legacy support only.
|
|
|
|
// The new emitter performs these sanity checks during operand construction, so these
|
|
|
|
// assertions can probably be removed once all legacy emitter code has been removed.
|
|
|
|
pxAssert(ss < 4);
|
|
|
|
pxAssert(index < 8);
|
|
|
|
pxAssert(base < 8);
|
|
|
|
xWrite8((ss << 6) | (index << 3) | base);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
using namespace x86Emitter;
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// From here on are instructions that have NOT been implemented in the new emitter.
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* J8Rel(int cc, int to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
xWrite8(cc);
|
|
|
|
xWrite8(to);
|
|
|
|
return (u8*)(x86Ptr - 1);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u16* J16Rel(int cc, u32 to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
xWrite16(0x0F66);
|
|
|
|
xWrite8(cc);
|
|
|
|
xWrite16(to);
|
|
|
|
return (u16*)(x86Ptr - 2);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* J32Rel(int cc, u32 to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
xWrite8(0x0F);
|
|
|
|
xWrite8(cc);
|
|
|
|
xWrite32(to);
|
|
|
|
return (u32*)(x86Ptr - 4);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT void x86SetPtr(u8* ptr)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
x86Ptr = ptr;
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Jump Label API (as rough as it might be)
|
|
|
|
//
|
|
|
|
// I don't auto-inline these because of the console logging in case of error, which tends
|
|
|
|
// to cause quite a bit of code bloat.
|
|
|
|
//
|
2021-09-06 18:28:26 +00:00
|
|
|
void x86SetJ8(u8* j8)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
u32 jump = (x86Ptr - j8) - 1;
|
2009-07-03 00:49:40 +00:00
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
if (jump > 0x7f)
|
|
|
|
{
|
|
|
|
Console.Error("j8 greater than 0x7f!!");
|
|
|
|
assert(0);
|
|
|
|
}
|
|
|
|
*j8 = (u8)jump;
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
void x86SetJ8A(u8* j8)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
u32 jump = (x86Ptr - j8) - 1;
|
2009-07-03 00:49:40 +00:00
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
if (jump > 0x7f)
|
|
|
|
{
|
|
|
|
Console.Error("j8 greater than 0x7f!!");
|
|
|
|
assert(0);
|
|
|
|
}
|
2009-07-03 00:49:40 +00:00
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
if (((uptr)x86Ptr & 0xf) > 4)
|
|
|
|
{
|
2009-07-03 00:49:40 +00:00
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
uptr newjump = jump + 16 - ((uptr)x86Ptr & 0xf);
|
2009-07-03 00:49:40 +00:00
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
if (newjump <= 0x7f)
|
|
|
|
{
|
|
|
|
jump = newjump;
|
|
|
|
while ((uptr)x86Ptr & 0xf)
|
|
|
|
*x86Ptr++ = 0x90;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*j8 = (u8)jump;
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT void x86SetJ32(u32* j32)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
*j32 = (x86Ptr - (u8*)j32) - 4;
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT void x86SetJ32A(u32* j32)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
while ((uptr)x86Ptr & 0xf)
|
|
|
|
*x86Ptr++ = 0x90;
|
|
|
|
x86SetJ32(j32);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/********************/
|
|
|
|
/* IX86 instructions */
|
|
|
|
/********************/
|
|
|
|
|
|
|
|
////////////////////////////////////
|
|
|
|
// jump instructions /
|
|
|
|
////////////////////////////////////
|
|
|
|
|
|
|
|
/* jmp rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JMP8(u8 to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
xWrite8(0xEB);
|
|
|
|
xWrite8(to);
|
|
|
|
return x86Ptr - 1;
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jmp rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JMP32(uptr to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
assert((sptr)to <= 0x7fffffff && (sptr)to >= -0x7fffffff);
|
|
|
|
xWrite8(0xE9);
|
|
|
|
xWrite32(to);
|
|
|
|
return (u32*)(x86Ptr - 4);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jp rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JP8(u8 to)
|
2016-11-12 15:28:37 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7A, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnp rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNP8(u8 to)
|
2016-11-12 15:28:37 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7B, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* je rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JE8(u8 to)
|
2016-11-12 15:28:37 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x74, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jz rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JZ8(u8 to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x74, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* js rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JS8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x78, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jns rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNS8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x79, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jg rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JG8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7F, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jge rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JGE8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7D, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jl rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JL8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7C, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ja rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JA8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x77, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JAE8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x73, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jb rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JB8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x72, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jbe rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JBE8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x76, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jle rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JLE8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7E, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jne rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNE8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x75, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnz rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNZ8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x75, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jng rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNG8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7E, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnge rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNGE8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7C, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnl rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNL8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7D, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnle rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNLE8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x7F, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jo rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JO8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x70, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jno rel8 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u8* JNO8(u8 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J8Rel(0x71, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
2009-07-03 20:12:33 +00:00
|
|
|
// jb rel32
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JB32(u32 to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x82, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* je rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JE32(u32 to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x84, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jz rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JZ32(u32 to)
|
2009-07-03 00:49:40 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x84, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* js rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JS32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x88, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jns rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNS32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x89, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jg rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JG32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8F, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jge rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JGE32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8D, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jl rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JL32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8C, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jle rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JLE32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8E, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* ja rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JA32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x87, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jae rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JAE32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x83, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jne rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNE32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x85, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnz rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNZ32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x85, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jng rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNG32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8E, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnge rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNGE32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8C, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnl rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNL32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8D, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jnle rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNLE32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x8F, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jo rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JO32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x80, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* jno rel32 */
|
2021-09-06 18:28:26 +00:00
|
|
|
emitterT u32* JNO32(u32 to)
|
2009-07-03 20:12:33 +00:00
|
|
|
{
|
2021-09-06 18:28:26 +00:00
|
|
|
return J32Rel(0x81, to);
|
2009-07-03 00:49:40 +00:00
|
|
|
}
|