This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix dealing with large (>2GB) static data initalizers


A couple of comments on your patch:

1.  You're still not taking full advantage of the possible range.  Why
    not use `unsigned HOST_WIDE_INT' and HOST_WIDE_INT_PRINT_UNSIGNED
    throughout instead of the signed counterparts?

----------------------------------------------------------------------

2.  In elfos.h:

*************** Boston, MA 02111-1307, USA.  */
*** 171,176 ****
      {									\
        fprintf ((FILE), "%s", COMMON_ASM_OP);				\
        assemble_name ((FILE), (NAME));					\
!       fprintf ((FILE), ",%u,%u\n", (SIZE), (ALIGN) / BITS_PER_UNIT);	\
      }									\
    while (0)
  
--- 173,181 ----
      {									\
        fprintf ((FILE), "%s", COMMON_ASM_OP);				\
        assemble_name ((FILE), (NAME));					\
!       fprintf ((FILE), HOST_WIDE_INT_PRINT_DEC, (SIZE));		\
!       fprintf ((FILE), ",%u\n", (ALIGN) / BITS_PER_UNIT);		\
      }									\
    while (0)
  
Careful, you seem to have missed the leading comma.

----------------------------------------------------------------------

3.  What's with the backquotes around the \n in the call to putc
below?  You did the same in several more places following this one.

diff -Nrc3p config.old/alpha/alpha.h config/alpha/alpha.h
*** config.old/alpha/alpha.h	Mon May  5 22:51:31 2003
--- config/alpha/alpha.h	Tue May  6 11:00:59 2003
*************** do {						\
*** 1622,1628 ****
  /* This is how to advance the location counter by SIZE bytes.  */
  
  #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
!   fprintf (FILE, "\t.space %d\n", (SIZE))
  
  /* This says how to output an assembler line
     to define a global common symbol.  */
--- 1622,1630 ----
  /* This is how to advance the location counter by SIZE bytes.  */
  
  #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
!   (fputs ("\t.space ", (FILE)),				\
!    fprintf ((FILE), HOST_WIDE_INT_PRINT_DEC, (SIZE)),	\
!    putc (`\n`, (FILE)))
  
----------------------------------------------------------------------

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]