public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RTL
@ 2003-08-29 14:24 SRUTHY C.N.
  2003-08-29 14:41 ` RTL SRUTHY C.N.
  0 siblings, 1 reply; 14+ messages in thread
From: SRUTHY C.N. @ 2003-08-29 14:24 UTC (permalink / raw)
  To: gcc, gcc


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.





^ permalink raw reply	[flat|nested] 14+ messages in thread
* RTL
@ 2003-09-25  4:37 Sruthy C.N
  2003-09-25  4:38 ` RTL Sruthy C.N
  2003-09-25  5:02 ` RTL Jim Wilson
  0 siblings, 2 replies; 14+ messages in thread
From: Sruthy C.N @ 2003-09-25  4:37 UTC (permalink / raw)
  To: gcc, gcc

Sir,
       In the RTL file (gcc version 3.2.2) there is some instructions(insn
6,8,10,12) which do some manipulations on esp..what is it doing?
why it is not there in RTL file of lower versions like 2.96 ..?
(note 2 0 6 NOTE_INSN_DELETED)

(insn 6 2 8 (parallel[
            (set (reg/f:SI 7 esp)
                (and:SI (reg/f:SI 7 esp)
                    (const_int -16 [0xfffffff0])))
            (clobber (reg:CC 17 flags))
        ] ) -1 (nil)
    (nil))

(insn 8 6 10 (set (reg:SI 59)
        (const_int 0 [0x0])) -1 (nil)
    (expr_list:REG_EQUAL (const_int 0 [0x0])
        (nil)))

(insn 10 8 12 (parallel[
            (set (reg/f:SI 7 esp)
                (minus:SI (reg/f:SI 7 esp)
                    (reg:SI 59)))
            (clobber (reg:CC 17 flags))
        ] ) -1 (nil)
    (nil))

(insn 12 10 3 (set (reg/f:SI 60)
        (reg/f:SI 55 virtual-stack-dynamic)) -1 (nil)
    (nil))

(note 3 12 4 NOTE_INSN_FUNCTION_BEG)

        If we consider the assembly program corresponding to this there is
no such instructions corresponding to this..why? please send me
the reply.



                                    Thanking you,
                                              SRUTHY C.N.




^ permalink raw reply	[flat|nested] 14+ messages in thread
* RTL
@ 2003-08-27 17:47 SRUTHY C.N.
  2003-08-27 18:08 ` RTL SRUTHY C.N.
  2003-08-28  0:47 ` RTL Jim Wilson
  0 siblings, 2 replies; 14+ messages in thread
From: SRUTHY C.N. @ 2003-08-27 17:47 UTC (permalink / raw)
  To: gcc, gcc

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.




^ permalink raw reply	[flat|nested] 14+ messages in thread
* rtl
@ 2002-10-04  1:36 N V Krishna
  2002-10-04  7:07 ` rtl Shekhar Divekar
  2002-10-04 12:00 ` rtl Mike Stump
  0 siblings, 2 replies; 14+ messages in thread
From: N V Krishna @ 2002-10-04  1:36 UTC (permalink / raw)
  To: gcc

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
-- 
Homepage:http://www.cs.purdue.edu/homes/nvk


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2003-10-06 23:27 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-29 14:24 RTL SRUTHY C.N.
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

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).