harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [Drlvm][Opt]Some Questions about LIR expressions
Date Mon, 29 Jan 2007 11:26:10 GMT
zouquiong,
I think that the error with types. Check counter-access for for edge profile
as example:
uint32* ptr = key == 0 ? edgeProfile->getEntryCounter() :
edgeProfile->getCounter(key );
    assert( ptr != NULL /*&& *ptr == 0 if compilation is locked*/);
    Opnd* baseOpnd = irManager.newImmOpnd(typeManager.getUnmanagedPtrType(
typeManager.getUIntPtrType()), (POINTER_SIZE_INT)ptr);
    Opnd* memOpnd = irManager.newMemOpnd(typeManager.getUIntPtrType(),
MemOpndKind_Heap, baseOpnd, NULL, NULL, NULL);
    const Mnemonic mn = Mnemonic_ADD;
    Inst* inst = irManager.newInst(mn, memOpnd,  irManager.newImmOpnd(
typeManager.getUInt32Type(), 1));

The address of the counter has Pointer but but UInt32 type.


On 1/28/07, zouqiong <ustczz@gmail.com> wrote:
>
> I add the following expression in InstCodeSelector::addElemIndex():
>
> Opnd* current_buffer = irManager.newImmOpnd(typeManager.getInt32Type(),
> (unsigned)&current_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
>
>


-- 
Mikhail Fursov

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message