mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-16 20:17:05 +03:00
[abi] Added support for pushw imm (X86/X64)
This commit is contained in:
@@ -377,7 +377,6 @@
|
||||
{"inst": "push R:r32" , "op": "50+r" , "arch": "X86"},
|
||||
{"inst": "push R:r64" , "op": "50+r" , "arch": "X64"},
|
||||
{"inst": "push ib" , "op": "6A ib"},
|
||||
{"inst": "push iw" , "op": "66 68 iw"},
|
||||
{"inst": "push id/ud" , "op": "68 id" , "arch": "X86"},
|
||||
{"inst": "push id" , "op": "68 id" , "arch": "X64"},
|
||||
{"inst": "push R:cs" , "op": "0E" , "arch": "X86"},
|
||||
@@ -389,6 +388,7 @@
|
||||
{"inst": "pushf" , "op": "66 9C" , "io": "OF=R SF=R ZF=R AF=R PF=R CF=R DF=R IF=R TF=R"},
|
||||
{"inst": "pushfd" , "op": "9C" , "arch": "X86", "io": "OF=R SF=R ZF=R AF=R PF=R CF=R DF=R IF=R TF=R"},
|
||||
{"inst": "pushfq" , "op": "9C" , "arch": "X64", "io": "OF=R SF=R ZF=R AF=R PF=R CF=R DF=R IF=R TF=R"},
|
||||
{"inst": "pushw iw" , "op": "66 68 iw"},
|
||||
{"inst": "rcl x:r8/m8, 1" , "op": "D0 /2" , "io": "CF=X OF=X", "altForm": true},
|
||||
{"inst": "rcl x:r8/m8, cl" , "op": "D2 /2" , "io": "CF=X OF=X"},
|
||||
{"inst": "rcl x:r8/m8, ib/ub" , "op": "M: C0 /2 ib" , "io": "CF=X OF=X"},
|
||||
|
||||
@@ -1899,6 +1899,15 @@ CaseX86M_GPB_MulDiv:
|
||||
}
|
||||
break;
|
||||
|
||||
case InstDB::kEncodingX86Pushw:
|
||||
if (isign3 == ENC_OPS1(Imm)) {
|
||||
immValue = o0.as<Imm>().value();
|
||||
immSize = 2;
|
||||
opcode = 0x68u | Opcode::kPP_66;
|
||||
goto EmitX86Op;
|
||||
}
|
||||
break;
|
||||
|
||||
case InstDB::kEncodingX86Push:
|
||||
if (isign3 == ENC_OPS1(Reg)) {
|
||||
if (Reg::isSReg(o0)) {
|
||||
|
||||
@@ -558,6 +558,7 @@ public:
|
||||
ASMJIT_INST_0x(pushf, Pushf) // ANY
|
||||
ASMJIT_INST_0x(pushfd, Pushfd) // X86
|
||||
ASMJIT_INST_0x(pushfq, Pushfq) // X64
|
||||
ASMJIT_INST_1x(pushw, Pushw, Imm) // ANY
|
||||
ASMJIT_INST_2x(rcl, Rcl, Gp, Gp_CL) // ANY
|
||||
ASMJIT_INST_2x(rcl, Rcl, Mem, Gp_CL) // ANY
|
||||
ASMJIT_INST_2x(rcl, Rcl, Gp, Imm) // ANY
|
||||
|
||||
@@ -793,6 +793,7 @@ namespace Inst {
|
||||
kIdPushf, //!< Instruction 'pushf'.
|
||||
kIdPushfd, //!< Instruction 'pushfd' (X86).
|
||||
kIdPushfq, //!< Instruction 'pushfq' (X64).
|
||||
kIdPushw, //!< Instruction 'pushw'.
|
||||
kIdPvalidate, //!< Instruction 'pvalidate' {SEV_SNP}.
|
||||
kIdPxor, //!< Instruction 'pxor' {MMX|SSE2}.
|
||||
kIdRcl, //!< Instruction 'rcl'.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -76,6 +76,7 @@ enum EncodingId : uint32_t {
|
||||
kEncodingX86Out, //!< X86 out.
|
||||
kEncodingX86Outs, //!< X86 out[b|w|d].
|
||||
kEncodingX86Push, //!< X86 push.
|
||||
kEncodingX86Pushw, //!< X86 pushw.
|
||||
kEncodingX86Pop, //!< X86 pop.
|
||||
kEncodingX86Ret, //!< X86 ret.
|
||||
kEncodingX86Rot, //!< X86 rcl, rcr, rol, ror, sal, sar, shl, shr.
|
||||
|
||||
@@ -915,6 +915,8 @@ static void ASMJIT_NOINLINE testX64AssemblerBase(AssemblerTester<x86::Assembler>
|
||||
TEST_INSTRUCTION("0FA0" , push(fs));
|
||||
TEST_INSTRUCTION("669C" , pushf());
|
||||
TEST_INSTRUCTION("9C" , pushfq());
|
||||
TEST_INSTRUCTION("66680100" , pushw(1));
|
||||
TEST_INSTRUCTION("66683412" , pushw(0x1234));
|
||||
TEST_INSTRUCTION("D2D1" , rcl(cl, cl));
|
||||
TEST_INSTRUCTION("D0D1" , rcl(cl, 1));
|
||||
TEST_INSTRUCTION("D2D5" , rcl(ch, cl));
|
||||
|
||||
@@ -710,6 +710,8 @@ static void ASMJIT_NOINLINE testX86AssemblerBase(AssemblerTester<x86::Assembler>
|
||||
TEST_INSTRUCTION("60" , pushad());
|
||||
TEST_INSTRUCTION("669C" , pushf());
|
||||
TEST_INSTRUCTION("9C" , pushfd());
|
||||
TEST_INSTRUCTION("66680100" , pushw(1));
|
||||
TEST_INSTRUCTION("66683412" , pushw(0x1234));
|
||||
TEST_INSTRUCTION("D2D1" , rcl(cl, cl));
|
||||
TEST_INSTRUCTION("D0D1" , rcl(cl, 1));
|
||||
TEST_INSTRUCTION("D2D5" , rcl(ch, cl));
|
||||
|
||||
Reference in New Issue
Block a user