Jan Hubicka - Re: [patch] for the lost size of a large array in x86-64 assembly output (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing 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]

We, at Apple, found the size for a 8GB array in x86-64 assembly output
is zero.

The patch is to make ASM_OUTPUT_ASM use the same format as
ASM_OUTPUT_LOCAL to print the size of a variable.

The following patch has been tested on x86 MacOS with "make all", "-- enable-languages=c,c++,objc,obj-c++", and regression tested with a top- level "make check-gcc" with no regression.

gcc/ChangeLog: * gcc/config/i386/darwin.h (ASM_OUTPUT_COMMON): Print the size of a variable as an unsigned HOST_WIDE_INT integer.

gcc/testsuite/ChangeLog: * gcc.target/i386/large-size-array-3.c: New.

The patch is OK with the && lp64 change Andrew suggested and I believe you can also drop /* { dg-options "-m64" } */ then. Please add -mcmodel=medium as we might want to start warning about overly sized arrays in small model since those leads to link time failures.

Thanks, Honza


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