Subject: [Jim Wilson ] Re: no GCC nested functions on NetBSD/pmax
To: None <port-pmax@NetBSD.ORG>
From: Gord Matzigkeit <gord@enci.ucalgary.ca>
List: port-pmax
Date: 04/01/1996 19:30:28
Hi, all!

The attached message answers my question about nested functions.  How
should I proceed?  Is this indeed a bug in the pmax port, or is
cacheflush under a different name?

Thanks,

--Gord

-- 
   Gord Matzigkeit    | Jaques Cousteau loved programming in assembler.
gord@enci.ucalgary.ca |  PGP mail preferred... finger -l me for my key.
Keyprint: D5 66 08 E0 4D F4 D7 7B 8A C8 8A 9C 7F 39 25 A7 - ID 339ABEB9

------- Start of forwarded message -------
From: Jim Wilson <wilson@cygnus.com>
Subject: Re: no GCC nested functions on NetBSD/pmax 
To: Gord Matzigkeit <gord@enci.ucalgary.ca>
Date: Fri, 29 Mar 1996 17:11:29 -0800
Message-Id: <199603300111.RAA02009@cygnus.com>
In-reply-to: Your message of "Fri, 29 Mar 1996 18:01:12 PST."
             <199603300101.SAA13095@b21.engg.ucalgary.ca.engg.ucalgary.ca> 
Lines: 21
Xref: enci.ucalgary.ca mail.misc:588

	/var/tmp/cc0130741.o: In function `main':
	./config/config.nested.c(.text+0xc8): undefined reference to `cacheflush'

Looks like a bug in the NetBSD MIPS port.  The OS is supposed to supply an OS
routine for flushing the instruction cache, and this routine is supposed to
be called cacheflush.

The gcc nested function implementation requires flushing the instruction
cache, and hence it must call cacheflush.  If I delete the call to cacheflush,
then nested functions won't work.

There are no user level instructions for flushing the I-cache, so it must
be an OS routine.  If NetBSD supplies a routine to flush the I-cache which
has a different name, then gcc could be modified to call that routine instead
of cacheflush.  However, there is no way to fix this problem in gcc if the
OS has no routine for flushing the I-cache.

I do not have access to a NetBSD/pmax machine, so I am unable to do anything
further.

Jim

------- End of forwarded message -------