This is the mail archive of the
mailing list for the GCC project.
Re: Target hook for ASM_FILE_END
On Thu, Jun 05, 2003 at 06:35:26PM -0700, Zack Weinberg wrote:
> Richard Henderson <email@example.com> writes:
> > On Thu, Jun 05, 2003 at 05:08:19PM -0700, Zack Weinberg wrote:
> >> + void (*file_end) PARAMS ((FILE *));
> > IMO we should not be passing asm_out_file around as a parameter.
> > The global variable is just fine.
> Here's a revised patch with that change. I would appreciate a close
> second look at the mips.c changes -- I'm not sure about the
> interaction with the file-switching gunk.
The file switching stuff was a hack to work with the MIPS assembler that
existed back on the DEC pmaxes and other early MIPS computers. Basically that
assembler was single pass, and GCC didn't emit static/global declarations until
the end of the file. So if a data item was capable of being put into the small
data area, the assembler would generate code assuming it was outside of that
area (using $1 to load the upper 16 bits of the address, and then doing the
load/store in the second instruction using $1 as the index register), since it
hadn't seen the appropriate global declaration yet. This was written before
gas became generally available. I wrote it 8+ years ago. I don't know if
anybody is still using GCC in such a situation (new compiler, old system, not