本文整理汇总了C#中OPERAND_SIZE类的典型用法代码示例。如果您正苦于以下问题:C# OPERAND_SIZE类的具体用法?C# OPERAND_SIZE怎么用?C# OPERAND_SIZE使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OPERAND_SIZE类属于命名空间,在下文中一共展示了OPERAND_SIZE类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: sq_v67q64
public static void sq_v67q64(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
if (mode == DISMODE.DISASSEMBLE_MODE_64)
{
sq_q(ref opsize, ref instr, idata, mode);
}
else
{
if (idata.prefixes[PREF_ADDRSIZE_INDEX] != 0xFF)
{
mode ^= (DISMODE.DISASSEMBLE_MODE_16 | DISMODE.DISASSEMBLE_MODE_32);
idata.is_addrsize_used = 1;
}
if (mode == DISMODE.DISASSEMBLE_MODE_16)
{
sq_w(ref opsize, ref instr, idata, mode);
}
else
{
sq_d(ref opsize, ref instr, idata, mode);
}
}
}
示例2: parse_operand
static UInt32 parse_operand(ulong origin_offset, ulong offset, INTERNAL_OPERAND iop, INSTRUCTION instr, int op_index, INTERNAL_DATA idata, DISMODE mode)
{
UInt32 res = 0;
OPERAND_SIZE opsize = new OPERAND_SIZE();
if (iop.type != TQ_NULL)
{
instr.ops[op_index].flags |= OPERAND_FLAG_PRESENT;
if (iop.size >= sq_handlers.Count())
{
idata.severe_err = ERRS.ERR_INTERNAL;
}
else
{
sq_handlers[iop.size](ref opsize, ref instr, idata, mode);
}
if (iop.size >= tq_handlers.Count())
{
idata.severe_err = ERRS.ERR_INTERNAL;
}
else
{
res = tq_handlers[iop.type](origin_offset, offset, ref instr, op_index, opsize, idata, mode);
}
}
return res;
}
示例3: post_proc_arpl_movsxd
/*************************
* Postprocessing routines.
**************************
*/
static UInt32 post_proc_arpl_movsxd(ulong origin_offset, ulong offset, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
UInt32 res;
res = 0;
if (mode == DISMODE.DISASSEMBLE_MODE_64)
{
OPERAND_SIZE opsize = new OPERAND_SIZE();
instr.id = ID_MOVSXD;
instr.groups = GRP_GEN | GRP_CONVER;
instr.tested_flags = 0;
instr.modified_flags = 0;
instr.set_flags = 0;
instr.cleared_flags = 0;
instr.flags &= (ushort)(INSTR_FLAG_MODRM | INSTR_FLAG_SIB);
instr.mnemonic = "movsxd";
byte[] bt = assembly.ReadBytes((ulong)instr.opcode_offset + 1, 4);
res = (UInt32)(
bt[0] +
bt[1]*256 +
bt[2]*256*256 +
bt[3]*256*256*256);
offset += res;
if ((instr.flags & INSTR_FLAG_MODRM)!=0)
{
res++;
offset++;
}
if ((instr.flags & INSTR_FLAG_SIB)!=0)
{
res++;
offset++;
}
instr.ops[0].value.imm.imm64 = 0;
instr.ops[1].value.imm.imm64 = 0;
instr.ops[0].flags = OPERAND_FLAG_PRESENT;
instr.ops[1].flags = OPERAND_FLAG_PRESENT;
sq_dqp(ref opsize, ref instr, idata, mode);
res += tq_G(origin_offset, offset, ref instr, 0, opsize, idata, mode);
sq_d(ref opsize, ref instr, idata, mode);
res += tq_E(origin_offset, offset, ref instr, 1, opsize, idata, mode);
}
return res;
}
示例4: tq_Y
public static UInt32 tq_Y(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
{
instr.ops[op_index].flags |= (byte)OP_TYPE.OPERAND_TYPE_MEM;
instr.ops[op_index].size = (ushort)opsize.size;
if (mode == DISMODE.DISASSEMBLE_MODE_64)
instr.ops[op_index].value.addr.seg = SREG_CODE_CS;
else
instr.ops[op_index].value.addr.seg = SREG_CODE_ES;
instr.ops[op_index].value.addr.mod = ADDR_MOD_BASE;
instr.ops[op_index].value.addr.bas = REG_CODE_DI;
return 0x0;
}
示例5: get_instruction_opsize
//Get instruction's size. Well, really this is size of implicit operand
// that influences on instruction's mnemonic.
static void get_instruction_opsize(MULTI_MNEMONIC multi_mnemonic, INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
OPERAND_SIZE opsize = new OPERAND_SIZE();
if (multi_mnemonic.size >= sq_handlers.Count())
{
idata.severe_err = ERRS.ERR_INTERNAL;
}
else
{
sq_handlers[multi_mnemonic.size](ref opsize, ref instr, idata, mode);
}
instr.opsize = (byte)opsize.size; //Possible sizes are 2/4/8.
}
示例6: tq_T
public static UInt32 tq_T(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
{
create_reg_operand(ref instr, op_index, REG_TYPE.REG_TYPE_TR, (byte)((instr.modrm >> 0x3) & 0x7), opsize.size);
return 0x0;
}
示例7: tq_W
public static UInt32 tq_W(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
{
UInt32 res;
if ((instr.modrm & 0xC0) == 0xC0)
{
create_xmmreg_operand(ref instr, op_index, (byte)(instr.modrm & 0x7), opsize.size, PREFIX_REX_B, ref idata, mode);
res = 0;
}
else
{
res = parse_mem_operand(origin_offset, offset, ref instr, op_index, opsize, idata, mode);
}
return res;
}
示例8: sq_wi
public static void sq_wi(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
opsize.size_in_stream = OP_SIZE.OPERAND_SIZE_16;
opsize.size = opsize.size_in_stream;
opsize.sign = 0;
}
示例9: sq_wvqp
public static void sq_wvqp(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
if ((instr.modrm & 0xC0) == 0xC0)
{
sq_vqp(ref opsize, ref instr, idata, mode);
}
else
{
sq_w(ref opsize, ref instr, idata, mode);
}
}
示例10: sq_vqp
public static void sq_vqp(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
if (mode == DISMODE.DISASSEMBLE_MODE_64)
{
opsize.size_in_stream = get_operand_size(instr, ref idata, mode);
opsize.size = opsize.size_in_stream;
opsize.sign = 0;
}
else
{
sq_v(ref opsize, ref instr, idata, mode);
}
}
示例11: sq_vs
public static void sq_vs(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
if (mode != DISMODE.DISASSEMBLE_MODE_64)
{
sq_v(ref opsize, ref instr, idata, mode);
}
else
{
opsize.size_in_stream = get_operand_size_16_32(ref idata, mode);
if (idata.prefixes[PREF_OPSIZE_INDEX] != 0xFF)
{
opsize.size = OP_SIZE.OPERAND_SIZE_16;
}
else
{
opsize.size = OP_SIZE.OPERAND_SIZE_64;
}
}
}
示例12: sq_vq64
public static void sq_vq64(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
if (mode == DISMODE.DISASSEMBLE_MODE_64)
{
sq_q(ref opsize, ref instr, idata, mode);
}
else
{
sq_v(ref opsize, ref instr, idata, mode);
}
}
示例13: sq_vds
public static void sq_vds(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
if (mode == DISMODE.DISASSEMBLE_MODE_64)
{
opsize.size_in_stream = OP_SIZE.OPERAND_SIZE_32;
opsize.size = OP_SIZE.OPERAND_SIZE_64;
opsize.sign = 1;
}
else
{
sq_v(ref opsize, ref instr, idata, mode);
}
}
示例14: sq_vd64
public static void sq_vd64(ref OPERAND_SIZE opsize, ref INSTRUCTION instr, INTERNAL_DATA idata, DISMODE mode)
{
if (mode != DISMODE.DISASSEMBLE_MODE_64)
{
sq_v(ref opsize, ref instr, idata, mode);
}
else
{
if (idata.prefixes[PREF_OPSIZE_INDEX] != 0xFF)
{
idata.is_opsize_used = 1;
sq_w(ref opsize, ref instr, idata, mode);
}
else
{
sq_q(ref opsize, ref instr, idata, mode);
}
}
}
示例15: tq_rSP
public static UInt32 tq_rSP(ulong origin_offset, ulong offset, ref INSTRUCTION instr, int op_index, OPERAND_SIZE opsize, INTERNAL_DATA idata, DISMODE mode)
{
create_genreg_operand(ref instr, op_index, REG_CODE_SP, opsize.size, PREFIX_REX_B, ref idata, mode);
return 0x0;
}