Expr Constructor Question Part 2

Weihaw Chuang weihawchuang@hotmail.com
Sat Mar 13 01:51:00 GMT 2004


Hi,
I would like to force a struct to a temporary on stack.  This is so I can 
use a special x86 opcode (bounds) that needs to access data from memory 
rather than registers.

Basically I think I want to force a constructor (struct) to reside in 
memory, in a temporary.  Is there some analog that already exists to do 
this?  If not any suggestions?

If I understand how gcc works correctly (and please correct me where I'm 
wrong), constructors act very much like containers for structs (and arrays). 
   Some constructors created for DECLs are used to allocate stack or 
constant data section memory.  However it seems that many constructors dont 
get materialized into memory.  For example COMPONENT_REF works on 
constructors, but these constructors dont necessarily exist in memory, 
though the fields might.

Store_constructors seems to do some things I need.  However I am unclear how 
the "target" parameter works... i.e.
static void
store_constructor (exp, target, align, cleared, size)
    tree exp;
    rtx target;
    unsigned int align;
    int cleared;
    HOST_WIDE_INT size;

FYI the earlier hacking involving assignments of multiple pointers works, 
after much hacking.  This question involves extending bounds to other cases, 
and unfortunately there are many of these.

-Wei

_________________________________________________________________
Get a FREE online computer virus scan from McAfee when you click here. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



More information about the Gcc mailing list