Example #1
0
        protected SimOperand CreateOperand(SimRegister register)
        {
            SimOperand operand = null;

            lock (myLock)
            {
                if (!registerOperands.TryGetValue(register, out operand))
                {
                    operand = new SimOperand(register);
                    registerOperands.Add(register, operand);
                }
            }
            return(operand);
        }
Example #2
0
 public static SimOperand CreateMemoryAddressOperand(int size, SimRegister baseRegister, SimRegister index, int scale, int displacement)
 {
     return(SimOperand.CreateMemoryAddress(size, baseRegister, index, scale, displacement));
 }
Example #3
0
 public void Add(BaseOpcode opcode, byte size, SimOperand operand1, SimRegister register2, byte opcodeSize)
 {
     Add(new SimInstruction(opcode, size, operand1, CreateOperand(register2), opcodeSize));
 }
Example #4
0
 public void Add(BaseOpcode opcode, byte size, SimRegister register1, int immediate2, byte opcodeSize)
 {
     Add(new SimInstruction(opcode, size, CreateOperand(register1), CreateImmediate(immediate2), opcodeSize));
 }
Example #5
0
 public void Add(BaseOpcode opcode, byte size, SimRegister register1, SimRegister register2, SimRegister register3, SimRegister register4, byte opcodeSize)
 {
     Add(new SimInstruction(opcode, size, CreateOperand(register1), CreateOperand(register2), CreateOperand(register3), CreateOperand(register4), opcodeSize));
 }