I add the following expression in InstCodeSelector::addElemIndex():
Opnd* current_buffer = irManager.newImmOpnd(typeManager.getInt32Type(),
(unsigned)¤t_obj_acc_record_pointer);
Opnd * Ip_Opnd = irManager.newMemOpndAutoKind
(typeManager.getPrimitiveType(Type::UInt32),
current_buffer, irManager.newImmOpnd(typeManager.getInt32Type(), 8));
copyOpnd(Ip_Opnd, irManager.newImmOpnd(typeManager.getInt32Type(),
0x19820514));
It seems that the constraints of the Opnds are wrong. Is it?
current_obj_acc_record_pointer points to a buffer of type obj_acc_record
typedef struct {
uint32 base;
uint32 offset;
uint32 ip;
uint32 other_info;
}obj_acc_record;
--
Best Regards,
Qiong,Zou