diff --git a/MCInst.c b/MCInst.c index ddaee450..b880f7b1 100644 --- a/MCInst.c +++ b/MCInst.c @@ -136,16 +136,6 @@ void MCOperand_setFPImm(MCOperand *op, double Val) op->FPImmVal = Val; } -MCOperand *MCOperand_CreateReg(unsigned Reg) -{ - MCOperand *op = cs_mem_malloc(sizeof(*op)); - - op->Kind = kRegister; - op->RegVal = Reg; - - return op; -} - MCOperand *MCOperand_CreateReg1(MCInst *mcInst, unsigned Reg) { MCOperand *op = &(mcInst->Operands[MCINST_CACHE]); @@ -165,16 +155,6 @@ void MCOperand_CreateReg0(MCInst *mcInst, unsigned Reg) op->RegVal = Reg; } -MCOperand *MCOperand_CreateImm(int64_t Val) -{ - MCOperand *op = cs_mem_malloc(sizeof(*op)); - - op->Kind = kImmediate; - op->ImmVal = Val; - - return op; -} - MCOperand *MCOperand_CreateImm1(MCInst *mcInst, int64_t Val) { MCOperand *op = &(mcInst->Operands[MCINST_CACHE]); @@ -193,13 +173,3 @@ void MCOperand_CreateImm0(MCInst *mcInst, int64_t Val) op->Kind = kImmediate; op->ImmVal = Val; } - -MCOperand *MCOperand_CreateFPImm(double Val) -{ - MCOperand *op = cs_mem_malloc(sizeof(*op)); - - op->Kind = kFPImmediate; - op->FPImmVal = Val; - - return op; -} diff --git a/MCInst.h b/MCInst.h index c0a55745..6b8f9f47 100644 --- a/MCInst.h +++ b/MCInst.h @@ -75,12 +75,6 @@ const MCInst *MCOperand_getInst(const MCOperand *op); void MCOperand_setInst(MCOperand *op, const MCInst *Val); -MCOperand *MCOperand_CreateReg(unsigned Reg); - -MCOperand *MCOperand_CreateImm(int64_t Val); - -MCOperand *MCOperand_CreateFPImm(double Val); - // create Reg operand in the next slot void MCOperand_CreateReg0(MCInst *inst, unsigned Reg); @@ -130,8 +124,6 @@ MCOperand *MCInst_getOperand(MCInst *inst, unsigned i); unsigned MCInst_getNumOperands(const MCInst *inst); -int MCInst_addOperand(MCInst *inst, MCOperand *Op); - // This addOperand2 function doesnt free Op void MCInst_addOperand2(MCInst *inst, MCOperand *Op);