public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Shekhar Divekar <shekhar@cradle.com>
To: N V Krishna <nvk@cs.purdue.edu>
Cc: gcc@gnu.org
Subject: Re: rtl
Date: Fri, 04 Oct 2002 07:07:00 -0000	[thread overview]
Message-ID: <3D9D924A.6030102@cradle.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0210040144350.16972-100000@puma.cs.purdue.edu>

The size is taken care of during allocation of rtx.

Have a look at the rtx_alloc() for allocation of rtx
after some wrapping functions and macros the core 
code looks like (in ggc.h)

#define ggc_alloc_rtx(NSLOTS)						  \
  ((struct rtx_def *) ggc_alloc (sizeof (struct rtx_def)		  \
				 + ((NSLOTS) - 1) * sizeof (rtunion)))

The additional size allocated takes care of fld[]

The size NSLOTS is nothing but number of fields
which is calculated in rtl.c as follows

#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS)   sizeof FORMAT - 1 ,

const unsigned char rtx_length[NUM_RTX_CODE] = {
#include "rtl.def"
};


Correct me if I am wrong.

Regards
Shekhar







N V Krishna wrote:

>Hi,
>    In the file rtl.h I find in the definition of rtx, the field fld
>is an array of size 1, declared as :
>
>rtunion fld[1];
>
>However, I see that there are uses as :
>
>#define SET_DEST(RTX) ((RTX)->fld[0].rtx)
>#define SET_SRC(RTX) ((RTX)->fld[1].rtx)
>
>Am I missing something obvious?
>
>Warm regards
>Krishna
>  
>

-- 
Your favorite stores, helpful shopping tools and great gift ideas. 
Experience the convenience of buying online with Shop@Netscape! 
http://shopnow.netscape.com/


  reply	other threads:[~2002-10-04 13:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-04  1:36 rtl N V Krishna
2002-10-04  7:07 ` Shekhar Divekar [this message]
2002-10-04 12:00 ` rtl Mike Stump
2003-08-27 17:47 RTL SRUTHY C.N.
2003-08-27 18:08 ` RTL SRUTHY C.N.
2003-08-28  0:47 ` RTL Jim Wilson
2003-08-29 14:24 RTL SRUTHY C.N.
2003-08-29 14:41 ` RTL SRUTHY C.N.
2003-09-25  4:37 RTL Sruthy C.N
2003-09-25  4:38 ` RTL Sruthy C.N
2003-09-25  5:02 ` RTL Jim Wilson
2003-09-30 12:45   ` RTL Sruthy C.N
2003-10-06 23:27     ` RTL Jim Wilson
2003-09-30 13:12   ` RTL Sruthy C.N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D9D924A.6030102@cradle.com \
    --to=shekhar@cradle.com \
    --cc=gcc@gnu.org \
    --cc=nvk@cs.purdue.edu \
    --cc=shekhardivekar@netscape.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).