public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "SRUTHY C.N." <csy2p100@nitc.ac.in>
To: <gcc@gnu.org>, <gcc@gcc.gnu.org>
Subject: RTL
Date: Fri, 29 Aug 2003 14:24:00 -0000	[thread overview]
Message-ID: <2433.210.212.228.79.1062129915.webmail@ebox.nitc.ac.in> (raw)


Sir,
1:
      At first one of you have replied that int variable's declared will
take 4 byte alignment. Then in the "System V ABI documentation for
intel 386 " , it is given that aggregates like structures etc..take
the alignment of most strictly aligned component..When I declare 2
int and one file pointer they took totally 12 bytes then a structure
has declared in its declaration 3 int & 2 char variables are there
int i,j;        //8 bytes
FILE *fp;       //4 bytes
  struct node
    {int a;
     int b;
     char c;
     int d;
     char e;
    }nd;
  accordig to the ABI documentation (by considering tail & internal
padding) it should take 20 bytes. And it is assigned at offset -48 (int
a) to offset -32 (char e). In between 16 bytes has been skipped.Why is
this happening? if I remove one var (for ex: int b) it will start from
-32 to -20? why this alignment to multiple of 16?

   here target is pentium 3.

2:
  Is RTL representation  dependent on GCC version? In linux 9 gcc version
was 3.2.2 and in linux 7 GCC version was 2.96 and both system is using
same target  pentium 3. and there is slight variation in the RTL file
generated. is it due to change in gcc version or anything else?



                                                  Thanking you,
                                                             SRUTHY C.N.





WARNING: multiple messages have this Message-ID
From: "SRUTHY C.N." <csy2p100@nitc.ac.in>
To: <gcc@gnu.org>, <gcc@gcc.gnu.org>
Subject: RTL
Date: Fri, 29 Aug 2003 14:41:00 -0000	[thread overview]
Message-ID: <2433.210.212.228.79.1062129915.webmail@ebox.nitc.ac.in> (raw)
Message-ID: <20030829144100.IEJniRWDpASojgpnYaI_CJPITi6Mu7cvBhqi54mJ94k@z> (raw)


Sir,
1:
      At first one of you have replied that int variable's declared will
take 4 byte alignment. Then in the "System V ABI documentation for
intel 386 " , it is given that aggregates like structures etc..take
the alignment of most strictly aligned component..When I declare 2
int and one file pointer they took totally 12 bytes then a structure
has declared in its declaration 3 int & 2 char variables are there
int i,j;        //8 bytes
FILE *fp;       //4 bytes
  struct node
    {int a;
     int b;
     char c;
     int d;
     char e;
    }nd;
  accordig to the ABI documentation (by considering tail & internal
padding) it should take 20 bytes. And it is assigned at offset -48 (int
a) to offset -32 (char e). In between 16 bytes has been skipped.Why is
this happening? if I remove one var (for ex: int b) it will start from
-32 to -20? why this alignment to multiple of 16?

   here target is pentium 3.

2:
  Is RTL representation  dependent on GCC version? In linux 9 gcc version
was 3.2.2 and in linux 7 GCC version was 2.96 and both system is using
same target  pentium 3. and there is slight variation in the RTL file
generated. is it due to change in gcc version or anything else?



                                                  Thanking you,
                                                             SRUTHY C.N.





             reply	other threads:[~2003-08-29  4:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-29 14:24 SRUTHY C.N. [this message]
2003-08-29 14:41 ` RTL SRUTHY C.N.
  -- strict thread matches above, loose matches on Subject: below --
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
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
2002-10-04  1:36 rtl N V Krishna
2002-10-04  7:07 ` rtl Shekhar Divekar
2002-10-04 12:00 ` rtl Mike Stump

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=2433.210.212.228.79.1062129915.webmail@ebox.nitc.ac.in \
    --to=csy2p100@nitc.ac.in \
    --cc=gcc@gcc.gnu.org \
    --cc=gcc@gnu.org \
    /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).